diff options
author | Stefan Niedermann <info@niedermann.it> | 2020-07-04 20:03:34 +0300 |
---|---|---|
committer | Stefan Niedermann <info@niedermann.it> | 2020-07-04 20:03:34 +0300 |
commit | 4c7076ca1d5e16918d5074bfb0ce6619d592f3db (patch) | |
tree | 51ba4c1522ddcd63513bcaec272ac3cc4ba3a347 /app/src/main/res | |
parent | bb5dcb191e00d6bfcbe14c543feeed963e12ff25 (diff) | |
parent | f302d4ac2de08138064bf1b8aa3863fd3b05a1d0 (diff) |
Merge branch 'master' into 561_search_users
# Conflicts:
# app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/SyncManager.java
Diffstat (limited to 'app/src/main/res')
38 files changed, 177 insertions, 103 deletions
diff --git a/app/src/main/res/drawable/ic_arrow_back_white_24dp.xml b/app/src/main/res/drawable/ic_arrow_back_white_24dp.xml index cc2b6f531..17d6150d8 100644 --- a/app/src/main/res/drawable/ic_arrow_back_white_24dp.xml +++ b/app/src/main/res/drawable/ic_arrow_back_white_24dp.xml @@ -1,5 +1,5 @@ <vector android:autoMirrored="true" android:height="24dp" - android:tint="#FFFFFF" android:viewportHeight="24.0" + android:tint="@color/accent" android:viewportHeight="24.0" android:viewportWidth="24.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> - <path android:fillColor="#FF000000" android:pathData="M20,11H7.83l5.59,-5.59L12,4l-8,8 8,8 1.41,-1.41L7.83,13H20v-2z"/> + <path android:fillColor="@color/accent" android:pathData="M20,11H7.83l5.59,-5.59L12,4l-8,8 8,8 1.41,-1.41L7.83,13H20v-2z"/> </vector> diff --git a/app/src/main/res/drawable/ic_baseline_account_circle_24.xml b/app/src/main/res/drawable/ic_baseline_account_circle_24.xml index 0945faff9..2cb60dcfb 100644 --- a/app/src/main/res/drawable/ic_baseline_account_circle_24.xml +++ b/app/src/main/res/drawable/ic_baseline_account_circle_24.xml @@ -1,5 +1,5 @@ -<vector android:autoMirrored="true" android:height="24dp" - android:tint="#FFFFFF" android:viewportHeight="24" +<vector android:height="24dp" + android:tint="@color/accent" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> - <path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,5c1.66,0 3,1.34 3,3s-1.34,3 -3,3 -3,-1.34 -3,-3 1.34,-3 3,-3zM12,19.2c-2.5,0 -4.71,-1.28 -6,-3.22 0.03,-1.99 4,-3.08 6,-3.08 1.99,0 5.97,1.09 6,3.08 -1.29,1.94 -3.5,3.22 -6,3.22z"/> + <path android:fillColor="@color/accent" android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,5c1.66,0 3,1.34 3,3s-1.34,3 -3,3 -3,-1.34 -3,-3 1.34,-3 3,-3zM12,19.2c-2.5,0 -4.71,-1.28 -6,-3.22 0.03,-1.99 4,-3.08 6,-3.08 1.99,0 5.97,1.09 6,3.08 -1.29,1.94 -3.5,3.22 -6,3.22z"/> </vector> diff --git a/app/src/main/res/drawable/ic_check_white_24dp.xml b/app/src/main/res/drawable/ic_check_white_24dp.xml index 65eff3fd3..47dd2131a 100644 --- a/app/src/main/res/drawable/ic_check_white_24dp.xml +++ b/app/src/main/res/drawable/ic_check_white_24dp.xml @@ -1,5 +1,5 @@ <vector android:height="24dp" - android:tint="#FFFFFF" android:viewportHeight="24.0" + android:tint="@android:color/white" android:viewportHeight="24.0" android:viewportWidth="24.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> <path android:fillColor="#FF000000" android:pathData="M9,16.17L4.83,12l-1.42,1.41L9,19 21,7l-1.41,-1.41z"/> </vector> diff --git a/app/src/main/res/drawable/ic_close_white_24dp.xml b/app/src/main/res/drawable/ic_close_white_24dp.xml index 8f4d17880..1c878294b 100644 --- a/app/src/main/res/drawable/ic_close_white_24dp.xml +++ b/app/src/main/res/drawable/ic_close_white_24dp.xml @@ -1,5 +1,5 @@ <vector android:autoMirrored="true" android:height="24dp" - android:tint="#FFFFFF" android:viewportHeight="24.0" + android:tint="@color/accent" android:viewportHeight="24.0" android:viewportWidth="24.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> <path android:fillColor="#FF000000" android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/> </vector> diff --git a/app/src/main/res/drawable/selected.xml b/app/src/main/res/drawable/selected.xml index cb301fd84..f28dd14cd 100644 --- a/app/src/main/res/drawable/selected.xml +++ b/app/src/main/res/drawable/selected.xml @@ -4,7 +4,7 @@ <layer-list> <item> <shape android:shape="oval"> - <solid android:color="@android:color/holo_green_light" /> + <solid android:color="@color/defaultBrand" /> <stroke android:width="1dp" android:color="@android:color/white" /> </shape> </item> diff --git a/app/src/main/res/drawable/splash_screen.xml b/app/src/main/res/drawable/splash_screen.xml index 14234ed34..d22531b3f 100644 --- a/app/src/main/res/drawable/splash_screen.xml +++ b/app/src/main/res/drawable/splash_screen.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> - <item android:drawable="@color/primary" /> + <item android:drawable="@color/defaultBrand" /> <item> <bitmap diff --git a/app/src/main/res/layout/activity_about.xml b/app/src/main/res/layout/activity_about.xml index 739c9c33f..67c7a900c 100644 --- a/app/src/main/res/layout/activity_about.xml +++ b/app/src/main/res/layout/activity_about.xml @@ -1,9 +1,9 @@ <?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:layout_width="match_parent" android:layout_height="match_parent" - xmlns:tools="http://schemas.android.com/tools" android:orientation="vertical"> <com.google.android.material.appbar.AppBarLayout @@ -15,15 +15,16 @@ android:layout_width="match_parent" android:layout_height="?android:actionBarSize" app:navigationIcon="@drawable/ic_arrow_back_white_24dp" - app:titleTextColor="@android:color/white" tools:title="@string/about" /> <com.google.android.material.tabs.TabLayout android:id="@+id/tab_layout" android:layout_width="match_parent" android:layout_height="wrap_content" - android:theme="@style/ThemeOverlay.AppCompat.Dark" - app:tabIndicatorColor="@color/accent" /> + app:tabBackground="?attr/colorPrimary" + app:tabIndicatorColor="@color/defaultBrand" + app:tabMode="fixed" + app:tabTextColor="?attr/colorAccent" /> </com.google.android.material.appbar.AppBarLayout> <androidx.viewpager2.widget.ViewPager2 diff --git a/app/src/main/res/layout/activity_archived.xml b/app/src/main/res/layout/activity_archived.xml index fd03521fd..6dd7024dc 100644 --- a/app/src/main/res/layout/activity_archived.xml +++ b/app/src/main/res/layout/activity_archived.xml @@ -15,7 +15,6 @@ android:layout_width="match_parent" android:layout_height="?android:actionBarSize" app:navigationIcon="@drawable/ic_arrow_back_white_24dp" - app:titleTextColor="@android:color/white" tools:title="@string/archived_cards" /> </com.google.android.material.appbar.AppBarLayout> diff --git a/app/src/main/res/layout/activity_attachments.xml b/app/src/main/res/layout/activity_attachments.xml index 2e9f68414..5a820f9d3 100644 --- a/app/src/main/res/layout/activity_attachments.xml +++ b/app/src/main/res/layout/activity_attachments.xml @@ -16,7 +16,6 @@ android:layout_width="match_parent" android:layout_height="wrap_content" app:navigationIcon="@drawable/ic_arrow_back_white_24dp" - app:titleTextColor="@android:color/white" tools:title="@string/attachments" /> </com.google.android.material.appbar.AppBarLayout> diff --git a/app/src/main/res/layout/activity_edit.xml b/app/src/main/res/layout/activity_edit.xml index 16f310fb8..4d59b296f 100644 --- a/app/src/main/res/layout/activity_edit.xml +++ b/app/src/main/res/layout/activity_edit.xml @@ -16,16 +16,15 @@ android:layout_height="wrap_content" app:navigationIcon="@drawable/ic_close_white_24dp"> - <EditText - android:id="@+id/title" - android:layout_width="match_parent" - android:layout_height="wrap_content" - app:theme="@style/EditTextOnPrimaryBackground" - android:layout_marginEnd="16dp" - android:importantForAutofill="no" - android:inputType="textMultiLine" - android:maxLines="5" - tools:text="@tools:sample/lorem" /> + <EditText + android:id="@+id/title" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginEnd="16dp" + android:importantForAutofill="no" + android:inputType="textMultiLine" + android:maxLines="5" + tools:text="@tools:sample/lorem" /> </androidx.appcompat.widget.Toolbar> @@ -34,10 +33,12 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/ThemeOverlay.AppCompat.Dark" + app:tabBackground="?attr/colorPrimary" app:tabGravity="center" - app:tabIconTint="@android:color/white" - app:tabIndicatorColor="@color/accent" - app:tabMode="fixed" /> + app:tabIconTint="?attr/colorAccent" + app:tabIndicatorColor="@color/defaultBrand" + app:tabMode="fixed" + app:tabTextColor="?attr/colorAccent" /> </com.google.android.material.appbar.AppBarLayout> <androidx.viewpager2.widget.ViewPager2 diff --git a/app/src/main/res/layout/activity_exception.xml b/app/src/main/res/layout/activity_exception.xml index 782b401e8..881c8fa85 100644 --- a/app/src/main/res/layout/activity_exception.xml +++ b/app/src/main/res/layout/activity_exception.xml @@ -14,7 +14,6 @@ android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?android:actionBarSize" - app:titleTextColor="@android:color/white" tools:title="@string/simple_exception" /> </com.google.android.material.appbar.AppBarLayout> @@ -36,23 +35,53 @@ </LinearLayout> - <HorizontalScrollView + <ScrollView android:layout_width="match_parent" android:layout_height="0dp" - android:layout_marginStart="@dimen/spacer_2x" - android:layout_marginEnd="@dimen/spacer_2x" - android:layout_weight="1" - android:background="@color/bg_highlighted"> + android:layout_weight="1"> - <TextView - android:id="@+id/stacktrace" - android:layout_width="wrap_content" + <LinearLayout + android:layout_width="match_parent" android:layout_height="wrap_content" - android:padding="@dimen/spacer_1x" - android:textIsSelectable="true" - android:typeface="monospace" - tools:text="@string/android_get_accounts_permission_not_granted_exception_message" /> - </HorizontalScrollView> + android:orientation="vertical"> + + <androidx.recyclerview.widget.RecyclerView + android:id="@+id/tips" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:paddingStart="@dimen/spacer_2x" + android:paddingEnd="@dimen/spacer_2x" + app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" + tools:itemCount="2" + tools:listitem="@layout/item_tip" /> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:padding="@dimen/spacer_2x" + android:text="@string/error_dialog_we_need_info" + android:textAppearance="?attr/textAppearanceBody2" /> + + <HorizontalScrollView + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_marginStart="@dimen/spacer_2x" + android:layout_marginEnd="@dimen/spacer_2x" + android:layout_weight="1" + android:background="@color/bg_highlighted"> + + <TextView + android:id="@+id/stacktrace" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:padding="@dimen/spacer_1x" + android:textIsSelectable="true" + android:typeface="monospace" + tools:text="@string/android_get_accounts_permission_not_granted_exception_message" /> + </HorizontalScrollView> + </LinearLayout> + </ScrollView> <LinearLayout android:layout_width="match_parent" @@ -69,7 +98,8 @@ android:layout_height="wrap_content" android:layout_marginEnd="@dimen/spacer_1x" android:layout_weight=".5" - android:text="@string/simple_close" /> + android:text="@string/simple_close" + android:textColor="@color/defaultBrand" /> <com.google.android.material.button.MaterialButton android:id="@+id/copy" @@ -78,7 +108,8 @@ android:layout_height="wrap_content" android:layout_marginStart="@dimen/spacer_1x" android:layout_weight=".5" - android:text="@string/simple_copy" /> + android:text="@string/simple_copy" + app:backgroundTint="@color/defaultBrand" /> </LinearLayout> </LinearLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/activity_import_account.xml b/app/src/main/res/layout/activity_import_account.xml index b4294db7b..088c26426 100644 --- a/app/src/main/res/layout/activity_import_account.xml +++ b/app/src/main/res/layout/activity_import_account.xml @@ -48,7 +48,8 @@ android:paddingTop="24dp" android:paddingEnd="32dp" android:paddingBottom="24dp" - android:text="@string/choose_account" /> + android:text="@string/choose_account" + app:backgroundTint="@color/defaultBrand" /> <TextView android:id="@+id/status" @@ -70,6 +71,7 @@ android:layout_below="@id/add_button" android:layout_centerHorizontal="true" android:layout_marginTop="32dp" + android:indeterminateTint="@color/defaultBrand" android:visibility="gone" /> <Button @@ -81,6 +83,7 @@ android:layout_centerHorizontal="true" android:layout_marginTop="16dp" android:text="@string/simple_update" + android:textColor="@color/defaultBrand" android:visibility="gone" tools:visibility="visible" /> </RelativeLayout> diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index d3b024d98..5413b6219 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -5,6 +5,7 @@ android:id="@+id/drawer_layout" android:layout_width="match_parent" android:layout_height="match_parent" + android:background="@color/bg_card_wrapper" android:fitsSystemWindows="true"> <androidx.coordinatorlayout.widget.CoordinatorLayout @@ -107,9 +108,6 @@ android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" - android:background="?attr/colorPrimary" - android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" - app:titleTextColor="@android:color/white" tools:title="Deck"> <ImageView @@ -132,6 +130,7 @@ android:background="?attr/selectableItemBackgroundBorderless" android:contentDescription="@string/simple_filter" android:padding="12dp" + android:tint="?attr/colorAccent" android:tooltipText="@string/simple_filter" android:translationX="6dp" app:srcCompat="@drawable/ic_filter_list_white_24dp" @@ -145,6 +144,7 @@ android:background="?attr/selectableItemBackgroundBorderless" android:contentDescription="@string/action_archived_cards" android:padding="12dp" + android:tint="?attr/colorAccent" android:tooltipText="@string/action_archived_cards" android:translationX="12dp" android:visibility="gone" @@ -163,19 +163,20 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" + app:tabBackground="?attr/colorPrimary" app:tabGravity="center" - app:tabIndicatorColor="@color/accent" + app:tabIndicatorColor="@color/defaultBrand" app:tabMode="fixed" - app:tabTextColor="@android:color/white" /> + app:tabTextColor="?attr/colorAccent" /> <androidx.appcompat.widget.AppCompatImageButton android:id="@+id/list_menu_button" android:layout_width="48dp" android:layout_height="match_parent" - android:background="@android:color/transparent" + android:background="?attr/colorPrimary" android:contentDescription="@string/add_list" android:foreground="?attr/selectableItemBackgroundBorderless" - android:tint="@android:color/white" + android:tint="?attr/colorAccent" android:tooltipText="@string/manage_list" app:srcCompat="@drawable/ic_menu" tools:ignore="UnusedAttribute" /> @@ -190,7 +191,7 @@ android:layout_gravity="bottom|end" android:layout_margin="@dimen/fab_margin" android:contentDescription="@string/add_card" - app:backgroundTint="@color/primary" + app:backgroundTint="@color/defaultBrand" app:srcCompat="@drawable/ic_add_white_24dp" /> </androidx.coordinatorlayout.widget.CoordinatorLayout> @@ -202,6 +203,7 @@ android:layout_gravity="start" android:fitsSystemWindows="false" android:theme="@style/NavigationView" + android:background="?attr/colorPrimary" app:headerLayout="@layout/nav_header_main" /> </androidx.drawerlayout.widget.DrawerLayout> diff --git a/app/src/main/res/layout/activity_manage_accounts.xml b/app/src/main/res/layout/activity_manage_accounts.xml index 4cd084a88..bbf1b75c4 100644 --- a/app/src/main/res/layout/activity_manage_accounts.xml +++ b/app/src/main/res/layout/activity_manage_accounts.xml @@ -14,12 +14,10 @@ android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" - android:background="?attr/colorPrimary" app:contentInsetStartWithNavigation="0dp" app:navigationIcon="@drawable/ic_arrow_back_white_24dp" app:title="@string/manage_accounts" - app:titleMarginStart="0dp" - app:titleTextColor="@android:color/white" /> + app:titleMarginStart="0dp" /> </com.google.android.material.appbar.AppBarLayout> <androidx.recyclerview.widget.RecyclerView diff --git a/app/src/main/res/layout/activity_prepare_create.xml b/app/src/main/res/layout/activity_prepare_create.xml index f4aff7cb8..1128f04f4 100644 --- a/app/src/main/res/layout/activity_prepare_create.xml +++ b/app/src/main/res/layout/activity_prepare_create.xml @@ -15,8 +15,7 @@ android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?android:actionBarSize" - app:title="@string/add_card" - app:titleTextColor="@android:color/white" /> + app:title="@string/add_card" /> </com.google.android.material.appbar.AppBarLayout> <ScrollView @@ -73,7 +72,8 @@ android:layout_height="wrap_content" android:layout_marginEnd="@dimen/spacer_1x" android:layout_weight=".5" - android:text="@android:string/cancel" /> + android:text="@android:string/cancel" + android:textColor="@color/defaultBrand" /> <com.google.android.material.button.MaterialButton android:id="@+id/submit" @@ -82,6 +82,7 @@ android:layout_height="wrap_content" android:layout_marginStart="@dimen/spacer_1x" android:layout_weight=".5" - android:text="@string/simple_add" /> + android:text="@string/simple_add" + app:backgroundTint="@color/defaultBrand" /> </LinearLayout> </RelativeLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/activity_push_notification.xml b/app/src/main/res/layout/activity_push_notification.xml index 6fb41be3a..eb14f38d1 100644 --- a/app/src/main/res/layout/activity_push_notification.xml +++ b/app/src/main/res/layout/activity_push_notification.xml @@ -21,8 +21,7 @@ android:layout_width="match_parent" android:layout_height="?android:actionBarSize" app:navigationIcon="@drawable/ic_arrow_back_white_24dp" - app:title="@string/app_name" - app:titleTextColor="@android:color/white" /> + app:title="@string/app_name" /> </com.google.android.material.appbar.AppBarLayout> <ProgressBar diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index e5c8b0214..07f7a62fe 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -15,8 +15,7 @@ android:layout_width="match_parent" android:layout_height="?android:actionBarSize" app:navigationIcon="@drawable/ic_arrow_back_white_24dp" - app:title="@string/simple_settings" - app:titleTextColor="@android:color/white" /> + app:title="@string/simple_settings" /> </com.google.android.material.appbar.AppBarLayout> </LinearLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/dialog_board_manage_labels.xml b/app/src/main/res/layout/dialog_board_manage_labels.xml index 0792d8094..ccd4481bc 100644 --- a/app/src/main/res/layout/dialog_board_manage_labels.xml +++ b/app/src/main/res/layout/dialog_board_manage_labels.xml @@ -29,7 +29,7 @@ android:layout_height="wrap_content" android:layout_gravity="center" android:contentDescription="@string/add_comment" - android:tint="@android:color/white" + app:backgroundTint="@color/defaultBrand" app:fabSize="mini" app:srcCompat="@drawable/ic_send_white_24dp" /> </LinearLayout> diff --git a/app/src/main/res/layout/dialog_filter.xml b/app/src/main/res/layout/dialog_filter.xml index e7d9ebd6a..8741e7e36 100644 --- a/app/src/main/res/layout/dialog_filter.xml +++ b/app/src/main/res/layout/dialog_filter.xml @@ -9,7 +9,10 @@ android:id="@+id/tab_layout" android:layout_width="match_parent" android:layout_height="wrap_content" + app:tabIndicatorColor="@color/defaultBrand" app:tabInlineLabel="true" + app:tabMode="fixed" + app:tabTextColor="?attr/colorAccent" app:tabUnboundedRipple="true" /> <androidx.viewpager2.widget.ViewPager2 diff --git a/app/src/main/res/layout/fragment_about_license_tab.xml b/app/src/main/res/layout/fragment_about_license_tab.xml index aac8e79a0..e6730390b 100644 --- a/app/src/main/res/layout/fragment_about_license_tab.xml +++ b/app/src/main/res/layout/fragment_about_license_tab.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent"> @@ -26,7 +27,8 @@ style="@style/Widget.MaterialComponents.Button" android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="@string/about_app_license_button" /> + android:text="@string/about_app_license_button" + app:backgroundTint="@color/defaultBrand" /> <TextView style="?android:attr/listSeparatorTextViewStyle" diff --git a/app/src/main/res/layout/fragment_card_edit_tab_attachments.xml b/app/src/main/res/layout/fragment_card_edit_tab_attachments.xml index b2e5df74a..5aa23961d 100644 --- a/app/src/main/res/layout/fragment_card_edit_tab_attachments.xml +++ b/app/src/main/res/layout/fragment_card_edit_tab_attachments.xml @@ -32,7 +32,7 @@ android:layout_gravity="bottom|end" android:layout_margin="@dimen/fab_margin" android:visibility="gone" - app:backgroundTint="@color/primary" + app:backgroundTint="@color/defaultBrand" app:srcCompat="@drawable/ic_file_upload_white_24dp" tools:visibility="visible" /> </androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/fragment_card_edit_tab_comments.xml b/app/src/main/res/layout/fragment_card_edit_tab_comments.xml index da76e2a50..3350480cb 100644 --- a/app/src/main/res/layout/fragment_card_edit_tab_comments.xml +++ b/app/src/main/res/layout/fragment_card_edit_tab_comments.xml @@ -114,7 +114,7 @@ android:layout_height="wrap_content" android:layout_gravity="center" android:contentDescription="@string/add_comment" - android:tint="@android:color/white" + app:backgroundTint="@color/defaultBrand" app:fabSize="mini" app:srcCompat="@drawable/ic_send_white_24dp" /> </LinearLayout> diff --git a/app/src/main/res/layout/item_autocomplete_label.xml b/app/src/main/res/layout/item_autocomplete_label.xml index adfa5bd93..49b98db0b 100644 --- a/app/src/main/res/layout/item_autocomplete_label.xml +++ b/app/src/main/res/layout/item_autocomplete_label.xml @@ -1,5 +1,6 @@ <?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:layout_width="match_parent" android:layout_height="wrap_content" @@ -12,11 +13,15 @@ android:id="@+id/label" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_marginTop="@dimen/spacer_1x" + android:layout_marginBottom="@dimen/spacer_1x" android:clickable="false" android:ellipsize="middle" android:focusable="false" + android:padding="@dimen/spacer_1x" + app:ensureMinTouchTargetSize="false" tools:backgroundTint="@color/board_default_color" - tools:text="@tools:sample/lorem" + tools:text="@tools:sample/cities" tools:textColor="@android:color/white" /> </LinearLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/item_card.xml b/app/src/main/res/layout/item_card.xml index a3ae195fc..c0457f5e4 100644 --- a/app/src/main/res/layout/item_card.xml +++ b/app/src/main/res/layout/item_card.xml @@ -9,6 +9,7 @@ android:layout_marginTop="@dimen/spacer_1x" android:layout_marginEnd="@dimen/spacer_2x" android:layout_marginBottom="@dimen/spacer_1x" + app:cardBackgroundColor="@color/bg_card" android:focusable="true"> <LinearLayout @@ -32,6 +33,7 @@ android:layout_marginTop="4sp" android:layout_weight="1" android:textSize="18sp" + android:textColor="?attr/colorAccent" tools:ignore="RtlSymmetry" tools:text="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut l" /> @@ -146,6 +148,7 @@ android:background="?attr/selectableItemBackgroundBorderless" android:contentDescription="@string/label_menu" android:padding="@dimen/spacer_1hx" + android:tint="?attr/colorAccent" app:srcCompat="@drawable/ic_menu" /> </LinearLayout> </LinearLayout> diff --git a/app/src/main/res/layout/item_comment.xml b/app/src/main/res/layout/item_comment.xml index 9769f681d..754e989fe 100644 --- a/app/src/main/res/layout/item_comment.xml +++ b/app/src/main/res/layout/item_comment.xml @@ -22,7 +22,7 @@ android:id="@+id/parentBorder" android:layout_width="2dp" android:layout_height="match_parent" - android:background="@color/primary" /> + android:background="?attr/colorPrimary" /> <TextView android:id="@+id/parent" diff --git a/app/src/main/res/layout/item_manage_label.xml b/app/src/main/res/layout/item_manage_label.xml index fc5c86a07..7bc7a7194 100644 --- a/app/src/main/res/layout/item_manage_label.xml +++ b/app/src/main/res/layout/item_manage_label.xml @@ -17,7 +17,12 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" + android:layout_marginStart="@dimen/spacer_1hx" + android:layout_marginTop="@dimen/spacer_1x" + android:layout_marginEnd="@dimen/spacer_1hx" + android:layout_marginBottom="@dimen/spacer_1x" android:ellipsize="middle" + app:ensureMinTouchTargetSize="false" tools:text="@tools:sample/cities" /> </LinearLayout> diff --git a/app/src/main/res/layout/item_tip.xml b/app/src/main/res/layout/item_tip.xml index 96df0e431..2177d013c 100644 --- a/app/src/main/res/layout/item_tip.xml +++ b/app/src/main/res/layout/item_tip.xml @@ -27,6 +27,7 @@ android:layout_height="wrap_content" android:layout_marginStart="40dp" android:layout_marginEnd="@dimen/spacer_1x" + android:textColor="@color/defaultBrand" android:visibility="visible" tools:text="@string/error_action_open_deck_info" tools:visibility="visible" /> diff --git a/app/src/main/res/layout/nav_header_main.xml b/app/src/main/res/layout/nav_header_main.xml index 6f65fba00..34d7cdc7a 100644 --- a/app/src/main/res/layout/nav_header_main.xml +++ b/app/src/main/res/layout/nav_header_main.xml @@ -4,7 +4,7 @@ android:id="@+id/header_view" android:layout_width="match_parent" android:layout_height="@dimen/drawer_header_height" - android:background="@color/primary"> + android:background="@color/defaultBrand"> <androidx.appcompat.widget.AppCompatImageView android:id="@+id/logo" @@ -14,6 +14,7 @@ android:layout_margin="@dimen/spacer_2x" android:gravity="center" android:padding="@dimen/spacer_1hx" + android:tint="@android:color/white" app:srcCompat="@drawable/ic_app_logo" /> <TextView diff --git a/app/src/main/res/values-night/booleans.xml b/app/src/main/res/values-night/booleans.xml new file mode 100644 index 000000000..41cc6feb9 --- /dev/null +++ b/app/src/main/res/values-night/booleans.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <bool name="isDayMode">false</bool> +</resources> diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml index 06862fe83..fb270e106 100644 --- a/app/src/main/res/values-night/colors.xml +++ b/app/src/main/res/values-night/colors.xml @@ -1,9 +1,12 @@ <?xml version="1.0" encoding="utf-8"?> <resources> + <color name="primary">@android:color/black</color> + <color name="accent">@android:color/white</color> <color name="fg_secondary">#666</color> <color name="bg_highlighted">#2a2a2a</color> <color name="bg_info_box">#222222</color> - <color name="avatars_overlapping_border_color">#424242</color> + <color name="bg_card">#121212</color> + <color name="bg_card_wrapper">@color/primary</color> <color name="widget_background">#cc212121</color> <color name="widget_foreground">#ccf5f5f5</color> diff --git a/app/src/main/res/values-v23/styles.xml b/app/src/main/res/values-v23/styles.xml new file mode 100644 index 000000000..88e43bf09 --- /dev/null +++ b/app/src/main/res/values-v23/styles.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <style name="AppTheme" parent="BaseTheme"> + <item name="android:windowLightStatusBar">@bool/isDayMode</item> + <item name="android:statusBarColor">?attr/colorPrimary</item> + </style> +</resources>
\ No newline at end of file diff --git a/app/src/main/res/values-v27/styles.xml b/app/src/main/res/values-v27/styles.xml new file mode 100644 index 000000000..15ac19bf3 --- /dev/null +++ b/app/src/main/res/values-v27/styles.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + + <style name="AppTheme" parent="BaseTheme"> + <item name="android:windowLightStatusBar">@bool/isDayMode</item> + <item name="android:statusBarColor">?attr/colorPrimary</item> + <item name="android:navigationBarColor">?attr/colorPrimary</item> + <item name="android:windowLightNavigationBar">@bool/isDayMode</item> + </style> + + <style name="SplashTheme" parent="Theme.AppCompat.NoActionBar"> + <item name="android:windowBackground">@drawable/splash_screen</item> + <item name="colorPrimaryDark">@color/defaultBrand</item> + <item name="android:navigationBarColor">@color/defaultBrand</item> + <item name="android:windowLightNavigationBar">true</item> + </style> +</resources>
\ No newline at end of file diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml index 02124655d..715f8b814 100644 --- a/app/src/main/res/values/attrs.xml +++ b/app/src/main/res/values/attrs.xml @@ -8,6 +8,4 @@ <attr name="description" format="string" /> <attr name="image" format="reference" /> </declare-styleable> - <attr name="toolbarEditTextColor" format="reference" /> - <attr name="toolbarEditTextHighlightColor" format="reference" /> </resources>
\ No newline at end of file diff --git a/app/src/main/res/values/booleans.xml b/app/src/main/res/values/booleans.xml new file mode 100644 index 000000000..c47017c70 --- /dev/null +++ b/app/src/main/res/values/booleans.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <bool name="isDayMode">true</bool> +</resources> diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index d295b8fae..120fcac27 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -1,7 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <resources> - <color name="primary">#0082c9</color> - <color name="accent">#ffffff</color> + <color name="primary">@android:color/white</color> + <color name="accent">#000000</color> + <color name="defaultBrand">#0082C9</color> <color name="toolbarEditTextHighlightColor">#55ffffff</color> <color name="danger">#d40000</color> <color name="fg_accent">#fff</color> @@ -10,8 +11,8 @@ <color name="bg_highlighted">#eee</color> <color name="grey600">#757575</color> <color name="bg_info_box">#dddddd</color> - - <color name="avatars_overlapping_border_color">#ffffff</color> + <color name="bg_card">@android:color/white</color> + <color name="bg_card_wrapper">#fafafa</color> <color name="dark_fg_primary">#e5e5e5</color> diff --git a/app/src/main/res/values/setup.xml b/app/src/main/res/values/setup.xml index fb917ffb7..247bb0697 100644 --- a/app/src/main/res/values/setup.xml +++ b/app/src/main/res/values/setup.xml @@ -4,7 +4,6 @@ <string name="shared_preference_last_background_sync" translatable="false">it.niedermann.nextcloud.deck.last_background_sync</string> <string name="shared_preference_theme_main" translatable="false">it.niedermann.nextcloud.deck.theme_main</string> - <string name="shared_preference_theme_text" translatable="false">it.niedermann.nextcloud.deck.theme_text</string> <string name="pref_key_wifi_only" translatable="false">wifiOnly</string> <string name="pref_key_dark_theme" translatable="false">darkTheme</string> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 2d0867b74..51cd41e20 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -256,6 +256,7 @@ <string name="error_dialog_version_not_parsable">We could not determine the version of the server side Deck app. Please make sure it is installed and enabled.</string> <string name="error_dialog_capabilities_not_parsable">We could not fetch the capabilities of your server. Please make sure your server is running well and other client apps are able to access Nextcloud.</string> <string name="error_dialog_attachment_upload_failed">An attachment could not be uploaded. Please try to share it on another way and let us know about this bug.</string> + <string name="error_dialog_tip_disable_battery_optimizations">Please disable all battery optimizations for Nextcloud and the Deck app.</string> <string name="error_action_open_deck_info">Open App info</string> <string name="error_action_open_network">Network settings</string> <string name="error_action_server_logs">Server logs</string> @@ -276,4 +277,5 @@ <item quantity="other">%1$d errors while uploading</item> </plurals> <string name="simple_report">Report</string> + <string name="error_action_open_battery_settings">Battery settings</string> </resources> diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index d6121c306..f0bff78fe 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -1,37 +1,23 @@ -<resources xmlns:tools="http://schemas.android.com/tools"> +<resources> - <!-- Default is a light theme with the dark blue brand --> - <style name="AppTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar.Bridge"> + <style name="BaseTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar.Bridge"> <item name="colorPrimary">@color/primary</item> <item name="colorPrimaryDark">@color/primary</item> - <item name="colorAccent">@color/primary</item> - <item name="toolbarEditTextColor">@android:color/white</item> - <item name="toolbarEditTextHighlightColor">@color/toolbarEditTextHighlightColor</item> - <item name="android:windowContentOverlay">@null</item> - <item name="android:elevation" tools:targetApi="lollipop">@null</item> - </style> - - <!-- This is a light theme with a bright brand color like yellow --> - <style name="AppThemeLightBrand" parent="AppTheme"> - <item name="toolbarEditTextColor">@android:color/black</item> + <item name="colorAccent">@color/accent</item> + <item name="toolbarStyle">@style/toolbarStyle</item> + <item name="android:windowBackground">?attr/colorPrimary</item> </style> - <!-- This styles an EditText which is on a primary background like in the toolbar --> - <style name="EditTextOnPrimaryBackground" parent="ThemeOverlay.MaterialComponents.Dark"> - <item name="android:textColor">?toolbarEditTextColor</item> - <item name="android:textColorHighlight">?toolbarEditTextHighlightColor</item> - <item name="colorControlNormal">?toolbarEditTextColor</item> - <item name="colorControlActivated">?toolbarEditTextColor</item> - <item name="colorControlHighlight">?toolbarEditTextColor</item> + <style name="toolbarStyle" parent="@style/Widget.AppCompat.Toolbar"> + <item name="android:background">?attr/colorPrimary</item> </style> - <style name="DarkTextView" parent="Widget.AppCompat.TextView"> - <item name="android:textColor">@color/dark_fg_primary</item> - </style> + <!-- Default is a light theme with the dark blue brand --> + <style name="AppTheme" parent="BaseTheme" /> <style name="SplashTheme" parent="Theme.AppCompat.NoActionBar"> <item name="android:windowBackground">@drawable/splash_screen</item> - <item name="colorPrimaryDark">@color/primary</item> + <item name="colorPrimaryDark">@color/defaultBrand</item> </style> <style name="NavigationView"> |