Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/stefan-niedermann/nextcloud-notes.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Niedermann <info@niedermann.it>2021-03-03 21:57:24 +0300
committerNiedermann IT-Dienstleistungen <stefan-niedermann@users.noreply.github.com>2021-03-08 00:11:22 +0300
commit71f4b5da16bb51a408a2630b289f848fa10e5766 (patch)
treecd62b4162310f6fb209edbf1c742de441f38a476 /app/src/main/res
parent00f06e930b64dbc262ba50c726b7c5d1581c53bf (diff)
https://github.com/nextcloud/news-android/issues/930
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/drawable/widget_background.xml10
-rw-r--r--app/src/main/res/layout/widget_entry.xml2
-rw-r--r--app/src/main/res/layout/widget_entry_dark.xml39
-rw-r--r--app/src/main/res/layout/widget_note_list.xml4
-rw-r--r--app/src/main/res/layout/widget_note_list_dark.xml77
-rw-r--r--app/src/main/res/layout/widget_single_note.xml4
-rw-r--r--app/src/main/res/layout/widget_single_note_content.xml2
-rw-r--r--app/src/main/res/layout/widget_single_note_content_dark.xml8
-rw-r--r--app/src/main/res/layout/widget_single_note_dark.xml24
-rw-r--r--app/src/main/res/values-night/colors.xml3
-rw-r--r--app/src/main/res/values/colors.xml13
-rw-r--r--app/src/main/res/values/dimens.xml3
12 files changed, 24 insertions, 165 deletions
diff --git a/app/src/main/res/drawable/widget_background.xml b/app/src/main/res/drawable/widget_background.xml
new file mode 100644
index 00000000..1d348b58
--- /dev/null
+++ b/app/src/main/res/drawable/widget_background.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+ <solid android:color="@color/widget_background" />
+ <corners android:radius="@dimen/widget_outer_radius" />
+ <padding
+ android:bottom="0dp"
+ android:left="0dp"
+ android:right="0dp"
+ android:top="0dp" />
+</shape> \ No newline at end of file
diff --git a/app/src/main/res/layout/widget_entry.xml b/app/src/main/res/layout/widget_entry.xml
index 81687c72..6a673822 100644
--- a/app/src/main/res/layout/widget_entry.xml
+++ b/app/src/main/res/layout/widget_entry.xml
@@ -32,7 +32,7 @@
android:lines="1"
android:paddingStart="@dimen/widget_note_list_inner_padding"
android:paddingEnd="@dimen/widget_note_list_outer_padding"
- android:textColor="@color/widget_fg_default"
+ android:textColor="@color/widget_foreground"
tools:text="@tools:sample/lorem/random" />
</LinearLayout>
diff --git a/app/src/main/res/layout/widget_entry_dark.xml b/app/src/main/res/layout/widget_entry_dark.xml
deleted file mode 100644
index 30b12171..00000000
--- a/app/src/main/res/layout/widget_entry_dark.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- xmlns:tools="http://schemas.android.com/tools"
- android:id="@+id/widget_note_list_entry_dark"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:paddingStart="@dimen/spacer_1hx"
- android:paddingTop="@dimen/spacer_1x"
- android:paddingEnd="@dimen/spacer_1hx"
- android:paddingBottom="@dimen/spacer_1x"
- tools:background="@color/widget_background_dark_theme">
-
- <ImageView
- android:id="@+id/widget_entry_fav_icon_dark"
- android:layout_width="@dimen/widget_note_list_fav_icon_width"
- android:layout_height="@dimen/widget_note_list_fav_icon_height"
- android:layout_gravity="center_vertical"
- android:contentDescription="@string/widget_entry_fav_contentDescription"
- android:foregroundGravity="center_vertical"
- android:paddingStart="@dimen/widget_note_list_inner_padding"
- android:paddingEnd="@dimen/widget_note_list_outer_padding"
- app:srcCompat="@drawable/ic_star_yellow_24dp" />
-
- <TextView
- android:id="@+id/widget_entry_content_tv_dark"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_gravity="center_vertical"
- android:layout_weight="1"
- android:ellipsize="end"
- android:lines="1"
- android:paddingStart="@dimen/widget_note_list_inner_padding"
- android:paddingEnd="@dimen/widget_note_list_outer_padding"
- android:textColor="@color/fg_default_dark_theme"
- tools:text="@tools:sample/lorem/random" />
-
-</LinearLayout>
diff --git a/app/src/main/res/layout/widget_note_list.xml b/app/src/main/res/layout/widget_note_list.xml
index 3ac7d474..0e66cef4 100644
--- a/app/src/main/res/layout/widget_note_list.xml
+++ b/app/src/main/res/layout/widget_note_list.xml
@@ -3,7 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@color/widget_background"
+ android:background="@drawable/widget_background"
android:orientation="vertical">
<!-- Widget header -->
@@ -38,7 +38,7 @@
android:paddingStart="@dimen/widget_note_list_hdr_padding"
android:paddingEnd="@dimen/widget_note_list_hdr_padding"
android:singleLine="true"
- android:textColor="@color/widget_fg_contrast"
+ android:textColor="@android:color/white"
android:textSize="18sp"
tools:text="@tools:sample/lorem/random" />
diff --git a/app/src/main/res/layout/widget_note_list_dark.xml b/app/src/main/res/layout/widget_note_list_dark.xml
deleted file mode 100644
index 79f81b05..00000000
--- a/app/src/main/res/layout/widget_note_list_dark.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@color/widget_background_dark_theme"
- android:orientation="vertical"
- tools:background="@null">
-
- <!-- Widget header -->
- <RelativeLayout
- android:id="@+id/widget_note_header_dark"
- android:layout_width="match_parent"
- android:layout_height="@dimen/widget_note_list_header_height"
- android:background="@drawable/ic_launcher_background"
- android:padding="@dimen/widget_note_list_hdr_padding">
-
- <ImageView
- android:id="@+id/widget_note_header_icon_dark"
- android:layout_width="@dimen/widget_note_list_icon_width"
- android:layout_height="match_parent"
- android:layout_alignParentStart="true"
- android:layout_alignParentBottom="true"
- android:contentDescription="@string/widget_app_launcher_contentDescription"
- android:paddingStart="@dimen/widget_note_list_outer_padding"
- android:paddingEnd="@dimen/widget_note_list_inner_padding"
- android:scaleX="2"
- android:scaleY="2"
- android:src="@drawable/ic_launcher_foreground" />
-
- <TextView
- android:id="@+id/widget_note_list_title_tv_dark"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_toStartOf="@id/widget_note_list_create_icon_dark"
- android:layout_toEndOf="@id/widget_note_header_icon_dark"
- android:ellipsize="middle"
- android:gravity="center_vertical"
- android:paddingStart="@dimen/widget_note_list_outer_padding"
- android:paddingEnd="@dimen/widget_note_list_inner_padding"
- android:singleLine="true"
- android:textColor="@color/widget_fg_contrast"
- android:textSize="18sp"
- tools:text="@tools:sample/lorem/random" />
-
- <ImageView
- android:id="@+id/widget_note_list_create_icon_dark"
- android:layout_width="@dimen/widget_note_list_icon_width"
- android:layout_height="match_parent"
- android:layout_alignParentEnd="true"
- android:contentDescription="@string/widget_create_note"
- android:paddingStart="@dimen/widget_note_list_inner_padding"
- android:paddingEnd="@dimen/widget_note_list_outer_padding"
- android:src="@drawable/ic_add_white_24dp" />
-
- </RelativeLayout>
- <!-- End header -->
-
- <ListView
- android:id="@+id/note_list_widget_lv_dark"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:divider="@color/fg_default_low_dark_theme"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="@color/fg_default_dark_theme"
- tools:listitem="@layout/widget_entry_dark" />
-
- <TextView
- android:id="@+id/widget_note_list_placeholder_tv_dark"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:gravity="center"
- android:text="@string/widget_note_list_placeholder"
- android:textColor="@color/fg_default_dark_theme"
- tools:visibility="gone" />
-
-</LinearLayout>
diff --git a/app/src/main/res/layout/widget_single_note.xml b/app/src/main/res/layout/widget_single_note.xml
index 5f240c5b..518d234d 100644
--- a/app/src/main/res/layout/widget_single_note.xml
+++ b/app/src/main/res/layout/widget_single_note.xml
@@ -3,7 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@color/widget_background">
+ android:background="@drawable/widget_background">
<ListView
android:id="@+id/single_note_widget_lv"
@@ -20,6 +20,6 @@
android:padding="@dimen/widget_single_note_padding"
android:text="@string/widget_single_note_placeholder_tv"
android:textAlignment="center"
- android:textColor="@color/fg_default_high_dark_theme" />
+ android:textColor="@color/widget_foreground" />
</RelativeLayout>
diff --git a/app/src/main/res/layout/widget_single_note_content.xml b/app/src/main/res/layout/widget_single_note_content.xml
index 52c926cf..9ff51b60 100644
--- a/app/src/main/res/layout/widget_single_note_content.xml
+++ b/app/src/main/res/layout/widget_single_note_content.xml
@@ -4,5 +4,5 @@
android:id="@+id/single_note_content_tv"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:textColor="@color/widget_fg_default"
+ android:textColor="@color/widget_foreground"
tools:text="@tools:sample/lorem/random" />
diff --git a/app/src/main/res/layout/widget_single_note_content_dark.xml b/app/src/main/res/layout/widget_single_note_content_dark.xml
deleted file mode 100644
index 44420733..00000000
--- a/app/src/main/res/layout/widget_single_note_content_dark.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<TextView xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:id="@+id/single_note_content_tv_dark"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:textColor="@color/fg_default_dark_theme"
- tools:text="@tools:sample/lorem/random" />
diff --git a/app/src/main/res/layout/widget_single_note_dark.xml b/app/src/main/res/layout/widget_single_note_dark.xml
deleted file mode 100644
index 9ede2e1d..00000000
--- a/app/src/main/res/layout/widget_single_note_dark.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@color/widget_background_dark_theme">
-
- <ListView
- android:id="@+id/single_note_widget_lv_dark"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:padding="@dimen/widget_single_note_padding" />
-
- <TextView
- android:id="@+id/widget_single_note_placeholder_tv_dark"
- android:background="@color/widget_background_dark_theme"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:gravity="center"
- android:text="@string/widget_single_note_placeholder_tv"
- android:textColor="@color/fg_default_high_dark_theme"
- android:textAlignment="center"
- android:padding="@dimen/widget_single_note_padding" />
-
-</RelativeLayout>
diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml
index 8d0dd92d..2717e0cb 100644
--- a/app/src/main/res/values-night/colors.xml
+++ b/app/src/main/res/values-night/colors.xml
@@ -20,4 +20,7 @@
<color name="appbar">#212121</color>
<color name="category_background">@color/defaultBrand</color>
+
+ <color name="widget_background">#dd000000</color>
+ <color name="widget_foreground">#d8d8d8</color>
</resources> \ No newline at end of file
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index ec0e6db4..1e1a5c3a 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -22,20 +22,11 @@
<color name="icon_color_default">#757575</color>
- <color name="widget_background">#dfffffff</color>
- <color name="widget_fg_default">#000000</color>
- <color name="widget_fg_contrast">#ffffff</color>
-
<color name="category_background">@color/bg_normal</color>
<color name="category_border">@color/defaultBrand</color>
<color name="appbar">@android:color/white</color>
- <!-- Dark Theme -->
- <!-- Defined here until appwidgets can use night/colors -->
- <color name="fg_default_dark_theme">#eeeeee</color>
- <color name="fg_default_low_dark_theme">#666666</color>
- <color name="fg_default_high_dark_theme">#cccccc</color>
-
- <color name="widget_background_dark_theme">#bf222222</color>
+ <color name="widget_background">#ddffffff</color>
+ <color name="widget_foreground">#222222</color>
</resources>
diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml
index f869a3a4..2f4b64e8 100644
--- a/app/src/main/res/values/dimens.xml
+++ b/app/src/main/res/values/dimens.xml
@@ -29,6 +29,9 @@
<dimen name="note_font_size_large">22sp</dimen>
<!-- Widgets -->
+ <dimen name="widget_outer_radius">@dimen/spacer_1x</dimen>
+ <dimen name="widget_inner_radius">@dimen/spacer_1hx</dimen>
+
<dimen name="widget_margin">@dimen/spacer_1x</dimen>
<dimen name="widget_single_note_padding">10dp</dimen>