diff options
author | Andy Scherzinger <info@andy-scherzinger.de> | 2021-03-30 01:35:40 +0300 |
---|---|---|
committer | Andy Scherzinger <info@andy-scherzinger.de> | 2021-04-07 15:52:43 +0300 |
commit | a1251859156cc346ff95f1094ed3697def91dcae (patch) | |
tree | 2c65527c04580eae3ebc0536f82a566caf91da44 /app/src/main/res | |
parent | 2158a809fa09cc703e830463ca21235bd4b01a30 (diff) |
Introduce SearchBar/Toolbar dark/light design
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Diffstat (limited to 'app/src/main/res')
25 files changed, 421 insertions, 50 deletions
diff --git a/app/src/main/res/animator/appbar_elevation_off.xml b/app/src/main/res/animator/appbar_elevation_off.xml new file mode 100644 index 000000000..cb24f4936 --- /dev/null +++ b/app/src/main/res/animator/appbar_elevation_off.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + tools:ignore="PrivateResource"> + <item> + <objectAnimator + android:propertyName="elevation" + android:valueTo="0dp" + android:valueType="floatType" /> + </item> +</selector> diff --git a/app/src/main/res/animator/appbar_elevation_on.xml b/app/src/main/res/animator/appbar_elevation_on.xml new file mode 100644 index 000000000..6bd52cf3b --- /dev/null +++ b/app/src/main/res/animator/appbar_elevation_on.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + tools:ignore="PrivateResource"> + <item> + <objectAnimator + android:propertyName="elevation" + android:valueTo="@dimen/design_appbar_elevation" + android:valueType="floatType" /> + </item> +</selector> diff --git a/app/src/main/res/drawable-night/ic_close_search.xml b/app/src/main/res/drawable-night/ic_close_search.xml new file mode 100644 index 000000000..4a6ccaf6d --- /dev/null +++ b/app/src/main/res/drawable-night/ic_close_search.xml @@ -0,0 +1,23 @@ +<!-- + @author Google LLC + Copyright (C) 2018 Google LLC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:width="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path android:fillColor="#FFFFFF" android:pathData="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_close_search.xml b/app/src/main/res/drawable/ic_close_search.xml new file mode 100644 index 000000000..ec5d46b00 --- /dev/null +++ b/app/src/main/res/drawable/ic_close_search.xml @@ -0,0 +1,23 @@ +<!-- + @author Google LLC + Copyright (C) 2018 Google LLC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:width="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path android:fillColor="#666666" android:pathData="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" /> +</vector> diff --git a/app/src/main/res/drawable/ic_menu.xml b/app/src/main/res/drawable/ic_menu.xml new file mode 100644 index 000000000..6d9343b31 --- /dev/null +++ b/app/src/main/res/drawable/ic_menu.xml @@ -0,0 +1,9 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24.0" + android:viewportHeight="24.0"> + <path + android:fillColor="#FF000000" + android:pathData="M3,18h18v-2L3,16v2zM3,13h18v-2L3,11v2zM3,6v2h18L21,6L3,6z"/> +</vector> diff --git a/app/src/main/res/drawable/ic_search_grey.xml b/app/src/main/res/drawable/ic_search_grey.xml new file mode 100644 index 000000000..2302badec --- /dev/null +++ b/app/src/main/res/drawable/ic_search_grey.xml @@ -0,0 +1,23 @@ +<!-- + @author Google LLC + Copyright (C) 2018 Google LLC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:width="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path android:fillColor="#757575" android:pathData="M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z" /> +</vector> diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 93822f260..7b110651c 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -2,7 +2,9 @@ ~ Nextcloud Talk application ~ ~ @author Mario Danic - ~ Copyright (C) 2017-2019 Mario Danic <mario@lovelyhq.com> + ~ @author Andy Scherzinger + ~ Copyright (C) 2021 Andy Scherzinger <info@andy-scherzinger.de> + ~ Copyright (C) 2017-2020 Mario Danic <mario@lovelyhq.com> ~ ~ This program is free software: you can redistribute it and/or modify ~ it under the terms of the GNU General Public License as published by @@ -21,28 +23,59 @@ <androidx.coordinatorlayout.widget.CoordinatorLayout 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/mainActivityCoordinatorLayout" android:layout_width="match_parent" android:layout_height="match_parent" + android:animateLayoutChanges="true" tools:context=".activities.MainActivity"> - <com.bluelinelabs.conductor.ChangeHandlerFrameLayout - android:id="@+id/controller_container" - android:layout_width="match_parent" - android:layout_height="match_parent" - app:layout_behavior="@string/appbar_scrolling_view_behavior" /> - <com.google.android.material.appbar.AppBarLayout + android:id="@+id/appBar" android:layout_width="match_parent" - android:layout_height="wrap_content"> + android:layout_height="wrap_content" + android:background="@color/bg_default" + android:elevation="0dp" + android:clipChildren="true" + android:clipToPadding="false" + android:windowContentOverlay="@null" + app:elevation="0dp"> + + <include + layout="@layout/search_layout" + app:layout_behavior="@string/appbar_scrolling_view_behavior" /> <com.google.android.material.appbar.MaterialToolbar android:id="@+id/toolbar" android:layout_width="match_parent" - android:layout_height="?android:attr/actionBarSize" - android:theme="@style/ThemeOverlay.MaterialComponents.Dark.ActionBar" - app:contentInsetStart="24dp" - app:contentInsetStartWithNavigation="0dp" - app:popupTheme="@style/appActionBarPopupMenu" /> + android:layout_height="?attr/actionBarSize" + android:background="@color/appbar" + android:theme="?attr/actionBarPopupTheme" + app:contentInsetStartWithNavigation="16dp" + app:layout_scrollFlags="enterAlwaysCollapsed|noScroll" + app:navigationIconTint="@color/fontAppbar" + app:popupTheme="@style/appActionBarPopupMenu" + app:titleTextColor="@color/fontAppbar" + tools:title="@string/nc_app_name"> + + <ProgressBar + android:id="@+id/toolbarProgressBar" + android:layout_width="32dp" + android:layout_height="32dp" + android:layout_gravity="center_vertical|end" + android:layout_marginEnd="8dp" + android:visibility="gone" + android:indeterminateTint="@color/white" + android:scaleType="fitCenter" /> + + </com.google.android.material.appbar.MaterialToolbar> + </com.google.android.material.appbar.AppBarLayout> + <com.bluelinelabs.conductor.ChangeHandlerFrameLayout + android:id="@+id/controller_container" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@color/bg_default" + app:layout_behavior="@string/appbar_scrolling_view_behavior" /> + </androidx.coordinatorlayout.widget.CoordinatorLayout> diff --git a/app/src/main/res/layout/controller_account_verification.xml b/app/src/main/res/layout/controller_account_verification.xml index a38bf7863..54e781d65 100644 --- a/app/src/main/res/layout/controller_account_verification.xml +++ b/app/src/main/res/layout/controller_account_verification.xml @@ -22,7 +22,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="@color/nc_white_color" + android:background="@color/bg_default" android:keepScreenOn="true"> <ProgressBar @@ -53,6 +53,7 @@ android:layout_marginRight="@dimen/activity_horizontal_margin" android:textAlignment="center" android:textSize="18sp" + android:textColor="@color/fg_default" tools:text="Verifying..." /> </RelativeLayout> diff --git a/app/src/main/res/layout/controller_browser.xml b/app/src/main/res/layout/controller_browser.xml index 09a5f89a7..399d64d82 100644 --- a/app/src/main/res/layout/controller_browser.xml +++ b/app/src/main/res/layout/controller_browser.xml @@ -39,6 +39,8 @@ android:layout_width="match_parent" android:layout_height="64dp" android:background="@color/bg_default" + app:itemTextColor="@color/fg_default" + app:itemIconTint="@color/fg_default" app:menu="@menu/file_browser_path" /> <com.google.android.material.bottomnavigation.BottomNavigationView @@ -47,6 +49,8 @@ android:layout_height="64dp" android:layout_alignParentBottom="true" android:background="@color/bg_default" + app:itemTextColor="@color/fg_default" + app:itemIconTint="@color/fg_default" app:menu="@menu/file_browser_bottom" /> <include diff --git a/app/src/main/res/layout/controller_call.xml b/app/src/main/res/layout/controller_call.xml index 4eb6938a9..79f6a4c43 100644 --- a/app/src/main/res/layout/controller_call.xml +++ b/app/src/main/res/layout/controller_call.xml @@ -27,6 +27,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" + android:fitsSystemWindows="true" tools:context=".activities.MagicCallActivity"> <LinearLayout diff --git a/app/src/main/res/layout/controller_call_menu.xml b/app/src/main/res/layout/controller_call_menu.xml index 21c711e62..85c8d822e 100644 --- a/app/src/main/res/layout/controller_call_menu.xml +++ b/app/src/main/res/layout/controller_call_menu.xml @@ -22,7 +22,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@color/nc_white_color"> + android:background="@color/bg_default"> <androidx.recyclerview.widget.RecyclerView android:id="@+id/recycler_view" diff --git a/app/src/main/res/layout/controller_chat.xml b/app/src/main/res/layout/controller_chat.xml index ba843d2ee..3aa0e8875 100644 --- a/app/src/main/res/layout/controller_chat.xml +++ b/app/src/main/res/layout/controller_chat.xml @@ -25,7 +25,8 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:keepScreenOn="true" - android:animateLayoutChanges="true"> + android:animateLayoutChanges="true" + android:background="@color/bg_default"> <include layout="@layout/lobby_view" android:visibility="gone" diff --git a/app/src/main/res/layout/controller_entry_menu.xml b/app/src/main/res/layout/controller_entry_menu.xml index ab2d19b91..09ad76d90 100644 --- a/app/src/main/res/layout/controller_entry_menu.xml +++ b/app/src/main/res/layout/controller_entry_menu.xml @@ -35,7 +35,7 @@ android:layout_marginEnd="8dp" android:layout_marginBottom="12dp" android:alpha="0.7" - android:background="#0000" + android:background="@color/bg_default" android:enabled="false" android:text="@string/nc_proceed" android:textColor="@color/colorPrimary" /> diff --git a/app/src/main/res/layout/controller_generic_rv.xml b/app/src/main/res/layout/controller_generic_rv.xml index 7bd0ad51e..7bedcaae3 100644 --- a/app/src/main/res/layout/controller_generic_rv.xml +++ b/app/src/main/res/layout/controller_generic_rv.xml @@ -19,6 +19,7 @@ --> <androidx.coordinatorlayout.widget.CoordinatorLayout 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/generic_rv_layout" android:layout_width="match_parent" @@ -33,15 +34,17 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - <androidx.recyclerview.widget.RecyclerView - android:id="@+id/recycler_view" - android:layout_width="match_parent" - android:layout_height="match_parent" - tools:listitem="@layout/rv_item_conversation" /> - </FrameLayout> </androidx.swiperefreshlayout.widget.SwipeRefreshLayout> <include layout="@layout/fast_scroller" /> + + <androidx.recyclerview.widget.RecyclerView + android:id="@+id/recycler_view" + android:layout_width="match_parent" + android:layout_height="match_parent" + app:layout_anchor="@+id/swipe_refresh_layout" + app:layout_anchorGravity="center" + tools:listitem="@layout/rv_item_conversation" /> </androidx.coordinatorlayout.widget.CoordinatorLayout> diff --git a/app/src/main/res/layout/controller_locked.xml b/app/src/main/res/layout/controller_locked.xml index 933709361..cdd1c5d17 100644 --- a/app/src/main/res/layout/controller_locked.xml +++ b/app/src/main/res/layout/controller_locked.xml @@ -49,5 +49,5 @@ android:padding="16dp" android:text="@string/nc_locked" android:textAlignment="center" - android:textColor="@color/white" /> + android:textColor="@color/fg_inverse" /> </RelativeLayout> diff --git a/app/src/main/res/layout/controller_operations_menu.xml b/app/src/main/res/layout/controller_operations_menu.xml index f825fdacb..ce17af3ca 100644 --- a/app/src/main/res/layout/controller_operations_menu.xml +++ b/app/src/main/res/layout/controller_operations_menu.xml @@ -21,7 +21,7 @@ <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@color/nc_white_color"> + android:background="@color/bg_default"> <ImageView android:id="@+id/result_image_view" @@ -70,7 +70,7 @@ android:layout_alignParentEnd="true" android:layout_marginEnd="8dp" android:layout_marginBottom="12dp" - android:background="#0000" + android:background="@color/bg_inverse" android:text="@string/nc_ok" android:textColor="@color/colorPrimary" android:visibility="gone" /> @@ -84,7 +84,7 @@ android:layout_marginEnd="8dp" android:layout_marginBottom="12dp" android:layout_toStartOf="@id/ok_button" - android:background="#0000" + android:background="@color/bg_inverse" android:text="@string/nc_join_via_web" android:textColor="@color/nc_darkGreen" android:visibility="gone" /> diff --git a/app/src/main/res/layout/rv_item_app.xml b/app/src/main/res/layout/rv_item_app.xml index ef72a3e7c..ce5270ef9 100644 --- a/app/src/main/res/layout/rv_item_app.xml +++ b/app/src/main/res/layout/rv_item_app.xml @@ -22,7 +22,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@color/white" + android:background="@color/bg_default" android:paddingTop="16dp" android:paddingBottom="16dp"> @@ -46,7 +46,7 @@ android:layout_toEndOf="@id/icon_image_view" android:focusable="false" android:focusableInTouchMode="false" - android:textColor="@color/black" + android:textColor="@color/fg_default" android:textSize="16sp" tools:text="Start a new conversation" /> diff --git a/app/src/main/res/layout/rv_item_browser_file.xml b/app/src/main/res/layout/rv_item_browser_file.xml index 0734d74ef..32ad6be52 100644 --- a/app/src/main/res/layout/rv_item_browser_file.xml +++ b/app/src/main/res/layout/rv_item_browser_file.xml @@ -43,7 +43,7 @@ android:layout_below="@id/file_icon" android:layout_alignEnd="@id/file_icon" android:src="@drawable/ic_star_black_24dp" - android:tint="@color/grey_600" /> + app:tint="@color/grey_600" /> <ImageView android:id="@+id/fileEncryptedImageView" diff --git a/app/src/main/res/layout/search_layout.xml b/app/src/main/res/layout/search_layout.xml new file mode 100644 index 000000000..7a91e026f --- /dev/null +++ b/app/src/main/res/layout/search_layout.xml @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + ~ /* + ~ * Nextcloud Talk application + ~ * + ~ * @author Mario Danic + ~ * @author Andy Scherzinger + ~ * Copyright (C) 2021 Andy Scherzinger <info@andy-scherzinger.de> + ~ * Copyright (C) 2017-2020 Mario Danic <mario@lovelyhq.com> + ~ * + ~ * This program is free software: you can redistribute it and/or modify + ~ * it under the terms of the GNU General Public License as published by + ~ * the Free Software Foundation, either version 3 of the License, or + ~ * at your option) any later version. + ~ * + ~ * This program is distributed in the hope that it will be useful, + ~ * but WITHOUT ANY WARRANTY; without even the implied warranty of + ~ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ~ * GNU General Public License for more details. + ~ * + ~ * You should have received a copy of the GNU General Public License + ~ * along with this program. If not, see <http://www.gnu.org/licenses/>. + ~ */ + --> + +<merge 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"> + + <com.google.android.material.card.MaterialCardView + android:id="@+id/home_toolbar" + android:layout_width="match_parent" + android:layout_height="50dp" + android:layout_marginStart="16dp" + android:layout_marginTop="5dp" + android:layout_marginEnd="16dp" + android:layout_marginBottom="1dp" + android:visibility="gone" + app:cardCornerRadius="8dp" + app:cardElevation="2dp" + app:strokeWidth="0dp" + tools:visibility="visible"> + + <androidx.constraintlayout.widget.ConstraintLayout + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <com.google.android.material.button.MaterialButton + android:id="@+id/menu_button" + style="@style/Widget.AppTheme.Button.IconButton" + android:layout_width="3dp" + android:layout_height="1dp" + android:layout_marginStart="5dp" + android:contentDescription="@string/nc_action_open_main_menu" + android:visibility="gone" + app:cornerRadius="@dimen/button_corner_radius" + app:icon="@drawable/ic_menu" + app:iconTint="@color/fontAppbar" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + <com.google.android.material.textview.MaterialTextView + android:id="@+id/search_text" + android:layout_width="0dp" + android:layout_height="48dp" + android:layout_marginStart="13dp" + android:layout_marginEnd="18dp" + android:ellipsize="end" + android:gravity="start|center_vertical" + android:lines="1" + android:textColor="@color/fontSecondaryAppbar" + android:textSize="16sp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintLeft_toRightOf="@id/menu_button" + app:layout_constraintRight_toLeftOf="@id/rightContainer" + app:layout_constraintTop_toTopOf="parent" + tools:text="Search in Nextcloud" /> + + <FrameLayout + android:id="@+id/rightContainer" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:layout_alignParentEnd="true" + android:minWidth="48dp" + android:layout_centerVertical="true" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toTopOf="parent"> + + <com.google.android.material.button.MaterialButton + android:id="@+id/switch_account_button" + style="@style/Widget.AppTheme.Button.IconButton" + android:layout_width="48dp" + android:layout_height="48dp" + android:layout_gravity="center" + android:scaleType="fitCenter" + android:transitionName="userAvatar.transitionTag" + app:cornerRadius="@dimen/button_corner_radius" + app:iconSize="@dimen/avatar_size_app_bar" + tools:visibility="gone" /> + + <ProgressBar + android:id="@+id/searchProgressBar" + android:layout_width="32dp" + android:layout_height="32dp" + android:padding="4dp" + android:layout_gravity="center" + android:indeterminate="true" + android:indeterminateTint="@color/colorPrimary" + android:scaleType="fitCenter" + android:visibility="gone" /> + + </FrameLayout> + + </androidx.constraintlayout.widget.ConstraintLayout> + + </com.google.android.material.card.MaterialCardView> +</merge>
\ No newline at end of file diff --git a/app/src/main/res/menu/menu_conversation_plus_filter.xml b/app/src/main/res/menu/menu_conversation_plus_filter.xml index a1924e010..828b7202a 100644 --- a/app/src/main/res/menu/menu_conversation_plus_filter.xml +++ b/app/src/main/res/menu/menu_conversation_plus_filter.xml @@ -28,13 +28,6 @@ android:icon="@drawable/ic_search_white_24dp" app:showAsAction="collapseActionView|always" android:animateLayoutChanges="true" - app:actionViewClass="androidx.appcompat.widget.SearchView" - /> - - <item android:id="@+id/action_settings" - android:title="@string/nc_settings" - android:icon="@drawable/ic_settings_white_24dp" - app:showAsAction="ifRoom"/> - + app:actionViewClass="androidx.appcompat.widget.SearchView" /> </menu> diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml index 466a70ac2..ce6b5b4f3 100644 --- a/app/src/main/res/values-night/colors.xml +++ b/app/src/main/res/values-night/colors.xml @@ -24,10 +24,28 @@ --> <resources> + <bool name="is_night">true</bool> + <bool name="status_bar_light">false</bool> + + <color name="colorPrimary">#0082C9</color> + <color name="colorPrimaryDark">#006AA3</color> + <color name="colorAccent">#007CC2</color> + + <!-- App bar --> + <color name="appbar">#1E1E1E</color> + <color name="fontAppbar">#FFFFFF</color> + <color name="conversation_item_header">#deffffff</color> <color name="bg_default">#121212</color> <color name="bg_alt">#121212</color> + <color name="bg_inverse">@color/grey950</color> + + <color name="fg_default">#FFFFFF</color> + <color name="fg_inverse">#121212</color> + <color name="fg_contrast">#717171</color> + <color name="fg_chat_message_sent">@color/fg_default</color> + <color name="nc_darkGreen">#00AA00</color> <color name="conversation_unread_bubble">#373737</color> diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index c674ac8af..51595cbf2 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -22,9 +22,20 @@ --> <resources> + <bool name="is_night">false</bool> + <bool name="status_bar_light">true</bool> + <color name="colorPrimary">#0082C9</color> + <color name="colorPrimaryDark">#006AA3</color> + <color name="colorAccent">#007CC2</color> <color name="textColorOnPrimaryBackground">#ffffff</color> <!-- white/black depending on primary color --> + <!-- App bar --> + <color name="appbar">@android:color/white</color> + <color name="fontAppbar">#666666</color> + <color name="fontSecondaryAppbar">#A5A5A5</color> + <color name="actionbar_shadow">#222222</color> + <!-- Text color of sent messages --> <color name="nc_outcoming_text_default">#FFFFFF</color> <!-- Text color of received messages --> @@ -48,10 +59,14 @@ <!-- Emoji list in chat window --> <color name="emoji_icons">#61000000</color> + <color name="fg_default">#666666</color> <color name="fg_inverse">#FFFFFF</color> + <color name="fg_contrast">#656565</color> + <color name="fg_chat_message_sent">@color/fg_default</color> <color name="bg_default">#FFFFFF</color> <color name="bg_alt">@color/white60</color> + <color name="bg_inverse">@color/grey950</color> <color name="bg_dark_mention_chips">#333333</color> <color name="bg_message_list_incoming_bubble">#EFEFEF</color> diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index 60c27fda3..f97047a89 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -30,6 +30,7 @@ <dimen name="margin_between_elements">8dp</dimen> <dimen name="double_margin_between_elements">16dp</dimen> <dimen name="avatar_size">40dp</dimen> + <dimen name="avatar_size_app_bar">30dp</dimen> <dimen name="avatar_size_big">96dp</dimen> <dimen name="avatar_size_very_big">@dimen/avatar_fetching_size_very_big</dimen> <dimen name="avatar_fetching_size_very_big">180dp</dimen> @@ -42,4 +43,5 @@ <dimen name="large_preview_dimension">80dp</dimen> <dimen name="corner_radius">16dp</dimen> + <dimen name="button_corner_radius">24dp</dimen> </resources> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 5965ab8b1..5c1138899 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -307,7 +307,6 @@ <string name="nc_file_browser_reshare_forbidden">You are not allowed to re-share this file</string> <!-- Lobby --> - <string name="nc_webinar">Webinar</string> <string name="nc_lobby">Lobby</string> <string name="nc_start_time">Start time</string> @@ -358,8 +357,12 @@ <string name="nc_phone_book_integration_chat_via">Chat via %s</string> <string name="nc_phone_book_integration_account_not_found">Account not found</string> + <!-- App Bar --> + <string name="appbar_search_in">Search in %s</string> + <!-- Non-translatable strings --> <string name="path_password_strike_through" translatable="false" tools:override="true">M3.27,4.27L19.74,20.74</string> <string name="tooManyUnreadMessages" translatable="false">999+</string> + <string name="nc_action_open_main_menu">Open main menu</string> </resources> diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index f27cfa3ed..04d8ae42d 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -4,7 +4,7 @@ ~ @author Mario Danic ~ @author Andy Scherzinger ~ Copyright (C) 2021 Andy Scherzinger <info@andy-scherzinger.de> - ~ Copyright (C) 2017-2019 Mario Danic <mario@lovelyhq.com> + ~ Copyright (C) 2017-2020 Mario Danic <mario@lovelyhq.com> ~ ~ This program is free software: you can redistribute it and/or modify ~ it under the terms of the GNU General Public License as published by @@ -26,15 +26,16 @@ <style name="AppTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar.Bridge"> <!-- Customize your theme here. --> <item name="colorPrimary">@color/colorPrimary</item> - <item name="colorPrimaryDark">@color/colorPrimary</item> + <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorPrimary</item> - <item name="android:windowBackground">@color/bg_default</item> <item name="android:panelFullBackground">@color/colorPrimary</item> <item name="android:itemBackground">@color/nc_outcoming_text_default</item> <item name="android:textColor">@color/nc_incoming_text_default</item> <item name="android:popupMenuStyle">@style/appActionBarPopupMenu</item> <item name="actionOverflowMenuStyle">@style/appActionBarPopupMenu</item> - <item name="actionBarStyle">@style/appActionBarStyle</item> + <item name="actionBarPopupTheme">@style/appActionBarPopupMenu</item> + <item name="searchViewStyle">@style/SearchView</item> + <item name="textInputStyle">@style/TextInputLayout</item> </style> <style name="ErrorAppearance" parent="@android:style/TextAppearance"> @@ -55,7 +56,7 @@ </style> <style name="ChipMentionTextAppearance" parent="TextAppearance.MaterialComponents.Chip"> - <item name="android:textColor">@color/colorPrimary</item> + <item name="android:textColor">@color/colorAccent</item> </style> <style name="ChipUnreadMessagesTextAppearance" parent="TextAppearance.MaterialComponents.Chip"> @@ -64,19 +65,95 @@ </style> <style name="appActionBarStyle" parent="@style/Widget.MaterialComponents.ActionBar.Solid"> - <item name="android:colorPrimary">@color/fg_inverse</item> - <item name="android:textColor">@color/fg_inverse</item> + <item name="colorControlNormal">@color/fontAppbar</item> + <item name="android:colorPrimary">@color/appbar</item> + <item name="android:colorAccent">@color/appbar</item> + <item name="android:textColor">@color/fontAppbar</item> + <item name="android:textColorSecondary">@color/fontAppbar</item> + <item name="searchViewStyle">@style/SearchView</item> </style> <style name="Toolbar_TextAppearance" parent="TextAppearance.AppCompat.Widget.ActionBar.Title"> - <item name="android:colorPrimary">@color/fg_inverse</item> - <item name="android:textColor">@color/fg_inverse</item> + <item name="android:colorPrimary">@color/fontAppbar</item> + <item name="android:textColor">@color/fontAppbar</item> + <item name="android:textColorPrimary">@color/fontAppbar</item> </style> <style name="appActionBarPopupMenu" parent="@style/Widget.AppCompat.PopupMenu.Overflow"> <item name="android:colorPrimary">@color/fg_inverse</item> - <item name="android:background">@color/bg_alt</item> - <item name="android:textColor">@color/nc_incoming_text_default</item> + <item name="android:textColorSecondary">@color/fontAppbar</item> + <item name="android:background">@color/appbar</item> + <item name="android:textColor">@color/conversation_item_header</item> + <item name="iconTint">@color/fontAppbar</item> + </style> + + <style name="SearchView" parent="Widget.AppCompat.SearchView"> + <!-- Close button icon --> + <item name="closeIcon">@drawable/ic_close_search</item> + <!-- Search button icon --> + <item name="searchIcon">@drawable/ic_search_grey</item> + <!-- Layout for query suggestion rows // unused for now, staying with the standard layout --> + <!--<item name="suggestionRowLayout">...</item>--> + <item name="submitBackground">@color/appbar</item> + <item name="queryBackground">@color/appbar</item> + <item name="searchHintIcon">@null</item> + </style> + + <style name="circleImageView" parent=""> + <item name="cornerFamily">rounded</item> + <item name="cornerSize">50%</item> + </style> + + <style name="Widget.AppTheme.Button.IconButton" parent="Widget.MaterialComponents.Button.TextButton"> + <item name="android:minWidth">0dp</item> + <item name="android:insetLeft">0dp</item> + <item name="android:insetTop">0dp</item> + <item name="android:insetRight">0dp</item> + <item name="android:insetBottom">0dp</item> + <item name="iconGravity">textStart</item> + <item name="iconPadding">0dp</item> </style> + <style name="TextInputLayout" parent="Widget.MaterialComponents.TextInputLayout.FilledBox"> + <item name="colorControlActivated">@color/fg_default</item> + <item name="colorControlHighlight">@color/fg_default</item> + <item name="boxBackgroundColor">@color/bg_default</item> + <item name="hintTextColor">@color/fg_default</item> + <item name="helperTextTextColor">@color/fg_default</item> + <item name="boxStrokeColor">@color/fg_default</item> + </style> + + <style name="Widget.App.Login.TextInputLayout" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox"> + <item name="colorControlActivated">@color/white</item> + <item name="colorControlHighlight">@color/white</item> + <item name="materialThemeOverlay">@style/ThemeOverlay.App.Login.TextInputLayout</item> + <item name="shapeAppearance">@style/ShapeAppearance.MaterialComponents.SmallComponent</item> + <item name="hintTextColor">@color/white</item> + <item name="helperTextTextColor">@color/white</item> + </style> + + <style name="ThemeOverlay.App.Login.TextInputLayout" parent=""> + <item name="colorPrimary">@color/white</item> + <item name="colorOnSurface">@color/white</item> + <item name="colorError">@color/nc_darkRed</item> + <item name="textAppearanceSubtitle1">@style/TextAppearance.MaterialComponents.Subtitle1</item> + <item name="textAppearanceCaption">@style/TextAppearance.MaterialComponents.Caption</item> + <item name="editTextStyle">@style/Widget.MaterialComponents.TextInputEditText.OutlinedBox</item> + </style> + + <style name="TextInputLayoutLogin" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox"> + <item name="boxStrokeColor">@color/white</item> + <item name="boxStrokeErrorColor">@color/white</item> + <item name="hintTextAppearance">@style/HintTextLogin</item> + <item name="errorTextAppearance">@style/HintTextLogin</item> + <item name="android:colorPrimary">@color/white</item> + <!-- Theme attributes --> + <item name="android:textColorHint">#80FFFFFF</item> + <item name="colorControlNormal">@color/white</item> + <item name="colorControlActivated">@color/white</item> + </style> + + <style name="HintTextLogin" parent="TextAppearance.AppCompat"> + <item name="android:textColor">@color/white</item> + </style> </resources> |