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
path: root/app/src
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
parent00f06e930b64dbc262ba50c726b7c5d1581c53bf (diff)
https://github.com/nextcloud/news-android/issues/930
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/it/niedermann/owncloud/notes/widget/notelist/NoteListWidget.java59
-rw-r--r--app/src/main/java/it/niedermann/owncloud/notes/widget/notelist/NoteListWidgetFactory.java26
-rw-r--r--app/src/main/java/it/niedermann/owncloud/notes/widget/singlenote/SingleNoteWidget.java23
-rw-r--r--app/src/main/java/it/niedermann/owncloud/notes/widget/singlenote/SingleNoteWidgetFactory.java14
-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
16 files changed, 60 insertions, 251 deletions
diff --git a/app/src/main/java/it/niedermann/owncloud/notes/widget/notelist/NoteListWidget.java b/app/src/main/java/it/niedermann/owncloud/notes/widget/notelist/NoteListWidget.java
index 188910e8..e3f36162 100644
--- a/app/src/main/java/it/niedermann/owncloud/notes/widget/notelist/NoteListWidget.java
+++ b/app/src/main/java/it/niedermann/owncloud/notes/widget/notelist/NoteListWidget.java
@@ -80,48 +80,25 @@ public class NoteListWidget extends AppWidgetProvider {
Log.v(TAG, "-- data - " + data);
- if (NotesApplication.isDarkThemeActive(context, darkTheme)) {
- views = new RemoteViews(context.getPackageName(), R.layout.widget_note_list_dark);
- views.setTextViewText(R.id.widget_note_list_title_tv_dark, getWidgetTitle(context, data.getMode(), category));
- views.setOnClickPendingIntent(R.id.widget_note_header_icon_dark, openAppI);
- views.setOnClickPendingIntent(R.id.widget_note_list_title_tv_dark, openAppI);
- views.setOnClickPendingIntent(R.id.widget_note_list_create_icon_dark, newNoteI);
- views.setPendingIntentTemplate(R.id.note_list_widget_lv_dark, templatePI);
- views.setRemoteAdapter(R.id.note_list_widget_lv_dark, serviceIntent);
- views.setEmptyView(R.id.note_list_widget_lv_dark, R.id.widget_note_list_placeholder_tv_dark);
- awm.notifyAppWidgetViewDataChanged(appWidgetId, R.id.note_list_widget_lv_dark);
- if (BrandingUtil.isBrandingEnabled(context)) {
- views.setInt(R.id.widget_note_header_dark, "setBackgroundColor", localAccount.getColor());
- views.setInt(R.id.widget_note_header_icon_dark, "setColorFilter", localAccount.getTextColor());
- views.setInt(R.id.widget_note_list_create_icon_dark, "setColorFilter", localAccount.getTextColor());
- views.setTextColor(R.id.widget_note_list_title_tv_dark, localAccount.getTextColor());
- } else {
- views.setInt(R.id.widget_note_header_dark, "setBackgroundColor", ContextCompat.getColor(context, R.color.defaultBrand));
- views.setInt(R.id.widget_note_header_icon_dark, "setColorFilter", Color.WHITE);
- views.setInt(R.id.widget_note_list_create_icon_dark, "setColorFilter", Color.WHITE);
- views.setTextColor(R.id.widget_note_list_title_tv_dark, Color.WHITE);
- }
+ views = new RemoteViews(context.getPackageName(), R.layout.widget_note_list);
+ views.setTextViewText(R.id.widget_note_list_title_tv, getWidgetTitle(context, data.getMode(), category));
+ views.setOnClickPendingIntent(R.id.widget_note_header_icon, openAppI);
+ views.setOnClickPendingIntent(R.id.widget_note_list_title_tv, openAppI);
+ views.setOnClickPendingIntent(R.id.widget_note_list_create_icon, newNoteI);
+ views.setPendingIntentTemplate(R.id.note_list_widget_lv, templatePI);
+ views.setRemoteAdapter(R.id.note_list_widget_lv, serviceIntent);
+ views.setEmptyView(R.id.note_list_widget_lv, R.id.widget_note_list_placeholder_tv);
+ awm.notifyAppWidgetViewDataChanged(appWidgetId, R.id.note_list_widget_lv);
+ if (BrandingUtil.isBrandingEnabled(context)) {
+ views.setInt(R.id.widget_note_header, "setBackgroundColor", localAccount.getColor());
+ views.setInt(R.id.widget_note_header_icon, "setColorFilter", localAccount.getTextColor());
+ views.setInt(R.id.widget_note_list_create_icon, "setColorFilter", localAccount.getTextColor());
+ views.setTextColor(R.id.widget_note_list_title_tv, localAccount.getTextColor());
} else {
- views = new RemoteViews(context.getPackageName(), R.layout.widget_note_list);
- views.setTextViewText(R.id.widget_note_list_title_tv, getWidgetTitle(context, data.getMode(), category));
- views.setOnClickPendingIntent(R.id.widget_note_header_icon, openAppI);
- views.setOnClickPendingIntent(R.id.widget_note_list_title_tv, openAppI);
- views.setOnClickPendingIntent(R.id.widget_note_list_create_icon, newNoteI);
- views.setPendingIntentTemplate(R.id.note_list_widget_lv, templatePI);
- views.setRemoteAdapter(R.id.note_list_widget_lv, serviceIntent);
- views.setEmptyView(R.id.note_list_widget_lv, R.id.widget_note_list_placeholder_tv);
- awm.notifyAppWidgetViewDataChanged(appWidgetId, R.id.note_list_widget_lv);
- if (BrandingUtil.isBrandingEnabled(context)) {
- views.setInt(R.id.widget_note_header, "setBackgroundColor", localAccount.getColor());
- views.setInt(R.id.widget_note_header_icon, "setColorFilter", localAccount.getTextColor());
- views.setInt(R.id.widget_note_list_create_icon, "setColorFilter", localAccount.getTextColor());
- views.setTextColor(R.id.widget_note_list_title_tv, localAccount.getTextColor());
- } else {
- views.setInt(R.id.widget_note_header, "setBackgroundColor", ContextCompat.getColor(context, R.color.defaultBrand));
- views.setInt(R.id.widget_note_header_icon, "setColorFilter", Color.WHITE);
- views.setInt(R.id.widget_note_list_create_icon, "setColorFilter", Color.WHITE);
- views.setTextColor(R.id.widget_note_list_title_tv, Color.WHITE);
- }
+ views.setInt(R.id.widget_note_header, "setBackgroundColor", ContextCompat.getColor(context, R.color.defaultBrand));
+ views.setInt(R.id.widget_note_header_icon, "setColorFilter", Color.WHITE);
+ views.setInt(R.id.widget_note_list_create_icon, "setColorFilter", Color.WHITE);
+ views.setTextColor(R.id.widget_note_list_title_tv, Color.WHITE);
}
awm.updateAppWidget(appWidgetId, views);
diff --git a/app/src/main/java/it/niedermann/owncloud/notes/widget/notelist/NoteListWidgetFactory.java b/app/src/main/java/it/niedermann/owncloud/notes/widget/notelist/NoteListWidgetFactory.java
index 5fde5010..f4179d97 100644
--- a/app/src/main/java/it/niedermann/owncloud/notes/widget/notelist/NoteListWidgetFactory.java
+++ b/app/src/main/java/it/niedermann/owncloud/notes/widget/notelist/NoteListWidgetFactory.java
@@ -27,7 +27,6 @@ public class NoteListWidgetFactory implements RemoteViewsService.RemoteViewsFact
private final Context context;
private final NoteListsWidgetData data;
- private final boolean darkTheme;
private NotesDatabase db;
private List<DBNote> dbNotes;
@@ -38,8 +37,6 @@ public class NoteListWidgetFactory implements RemoteViewsService.RemoteViewsFact
db = NotesDatabase.getInstance(context);
data = db.getNoteListWidgetData(appWidgetId);
-
- darkTheme = NotesApplication.isDarkThemeActive(context, DarkModeSetting.fromModeID(data.getThemeMode()));
}
@Override
@@ -99,27 +96,18 @@ public class NoteListWidgetFactory implements RemoteViewsService.RemoteViewsFact
DBNote note = dbNotes.get(position);
final Intent fillInIntent = new Intent();
final Bundle extras = new Bundle();
-
extras.putLong(EditNoteActivity.PARAM_NOTE_ID, note.getId());
extras.putLong(EditNoteActivity.PARAM_ACCOUNT_ID, note.getAccountId());
+
fillInIntent.putExtras(extras);
fillInIntent.setData(Uri.parse(fillInIntent.toUri(Intent.URI_INTENT_SCHEME)));
- if (darkTheme) {
- note_content = new RemoteViews(context.getPackageName(), R.layout.widget_entry_dark);
- note_content.setOnClickFillInIntent(R.id.widget_note_list_entry_dark, fillInIntent);
- note_content.setTextViewText(R.id.widget_entry_content_tv_dark, note.getTitle());
- note_content.setImageViewResource(R.id.widget_entry_fav_icon_dark, note.isFavorite()
- ? R.drawable.ic_star_yellow_24dp
- : R.drawable.ic_star_grey_ccc_24dp);
- } else {
- note_content = new RemoteViews(context.getPackageName(), R.layout.widget_entry);
- note_content.setOnClickFillInIntent(R.id.widget_note_list_entry, fillInIntent);
- note_content.setTextViewText(R.id.widget_entry_content_tv, note.getTitle());
- note_content.setImageViewResource(R.id.widget_entry_fav_icon, note.isFavorite()
- ? R.drawable.ic_star_yellow_24dp
- : R.drawable.ic_star_grey_ccc_24dp);
- }
+ note_content = new RemoteViews(context.getPackageName(), R.layout.widget_entry);
+ note_content.setOnClickFillInIntent(R.id.widget_note_list_entry, fillInIntent);
+ note_content.setTextViewText(R.id.widget_entry_content_tv, note.getTitle());
+ note_content.setImageViewResource(R.id.widget_entry_fav_icon, note.isFavorite()
+ ? R.drawable.ic_star_yellow_24dp
+ : R.drawable.ic_star_grey_ccc_24dp);
return note_content;
diff --git a/app/src/main/java/it/niedermann/owncloud/notes/widget/singlenote/SingleNoteWidget.java b/app/src/main/java/it/niedermann/owncloud/notes/widget/singlenote/SingleNoteWidget.java
index 777cd25e..e5010f3b 100644
--- a/app/src/main/java/it/niedermann/owncloud/notes/widget/singlenote/SingleNoteWidget.java
+++ b/app/src/main/java/it/niedermann/owncloud/notes/widget/singlenote/SingleNoteWidget.java
@@ -36,25 +36,16 @@ public class SingleNoteWidget extends AppWidgetProvider {
final PendingIntent templatePendingIntent = PendingIntent.getActivity(context, appWidgetId, templateIntent,
PendingIntent.FLAG_UPDATE_CURRENT);
- Intent serviceIntent = new Intent(context, SingleNoteWidgetService.class);
+ final Intent serviceIntent = new Intent(context, SingleNoteWidgetService.class);
serviceIntent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);
serviceIntent.setData(Uri.parse(serviceIntent.toUri(Intent.URI_INTENT_SCHEME)));
- RemoteViews views;
-
- if (NotesApplication.isDarkThemeActive(context, DarkModeSetting.fromModeID(data.getThemeMode()))) {
- views = new RemoteViews(context.getPackageName(), R.layout.widget_single_note_dark);
- views.setPendingIntentTemplate(R.id.single_note_widget_lv_dark, templatePendingIntent);
- views.setRemoteAdapter(R.id.single_note_widget_lv_dark, serviceIntent);
- views.setEmptyView(R.id.single_note_widget_lv_dark, R.id.widget_single_note_placeholder_tv_dark);
- awm.notifyAppWidgetViewDataChanged(appWidgetId, R.id.single_note_widget_lv_dark);
- } else {
- views = new RemoteViews(context.getPackageName(), R.layout.widget_single_note);
- views.setPendingIntentTemplate(R.id.single_note_widget_lv, templatePendingIntent);
- views.setRemoteAdapter(R.id.single_note_widget_lv, serviceIntent);
- views.setEmptyView(R.id.single_note_widget_lv, R.id.widget_single_note_placeholder_tv);
- awm.notifyAppWidgetViewDataChanged(appWidgetId, R.id.single_note_widget_lv);
- }
+ final RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget_single_note);
+ views.setPendingIntentTemplate(R.id.single_note_widget_lv, templatePendingIntent);
+ views.setRemoteAdapter(R.id.single_note_widget_lv, serviceIntent);
+ views.setEmptyView(R.id.single_note_widget_lv, R.id.widget_single_note_placeholder_tv);
+
+ awm.notifyAppWidgetViewDataChanged(appWidgetId, R.id.single_note_widget_lv);
awm.updateAppWidget(appWidgetId, views);
} catch (NoSuchElementException e) {
Log.i(TAG, "onUpdate has been triggered before the user finished configuring the widget");
diff --git a/app/src/main/java/it/niedermann/owncloud/notes/widget/singlenote/SingleNoteWidgetFactory.java b/app/src/main/java/it/niedermann/owncloud/notes/widget/singlenote/SingleNoteWidgetFactory.java
index 54182475..c78803c2 100644
--- a/app/src/main/java/it/niedermann/owncloud/notes/widget/singlenote/SingleNoteWidgetFactory.java
+++ b/app/src/main/java/it/niedermann/owncloud/notes/widget/singlenote/SingleNoteWidgetFactory.java
@@ -98,16 +98,10 @@ public class SingleNoteWidgetFactory implements RemoteViewsService.RemoteViewsFa
extras.putLong(EditNoteActivity.PARAM_NOTE_ID, note.getId());
extras.putLong(EditNoteActivity.PARAM_ACCOUNT_ID, note.getAccountId());
fillInIntent.putExtras(extras);
- if (darkModeActive) {
- note_content = new RemoteViews(context.getPackageName(), R.layout.widget_single_note_content_dark);
- note_content.setOnClickFillInIntent(R.id.single_note_content_tv_dark, fillInIntent);
- note_content.setTextViewText(R.id.single_note_content_tv_dark, MarkdownUtil.renderForRemoteView(context, note.getContent()));
-
- } else {
- note_content = new RemoteViews(context.getPackageName(), R.layout.widget_single_note_content);
- note_content.setOnClickFillInIntent(R.id.single_note_content_tv, fillInIntent);
- note_content.setTextViewText(R.id.single_note_content_tv, MarkdownUtil.renderForRemoteView(context, note.getContent()));
- }
+
+ note_content = new RemoteViews(context.getPackageName(), R.layout.widget_single_note_content);
+ note_content.setOnClickFillInIntent(R.id.single_note_content_tv, fillInIntent);
+ note_content.setTextViewText(R.id.single_note_content_tv, MarkdownUtil.renderForRemoteView(context, note.getContent()));
return note_content;
}
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>