diff options
author | Stefan Niedermann <info@niedermann.it> | 2020-06-01 18:57:32 +0300 |
---|---|---|
committer | Stefan Niedermann <info@niedermann.it> | 2020-06-01 18:57:32 +0300 |
commit | e1ba4569d002c918f88a16f35772397026a305f0 (patch) | |
tree | 21d0fff71875cfe85255cafd070ffba01a128211 /app/src/main/res/layout | |
parent | 77d9d4ffb4db1ca55e4cb8cbdf7007899dac9e11 (diff) |
Make toolbars the same background color as the main content
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r-- | app/src/main/res/layout/activity_about.xml | 38 | ||||
-rw-r--r-- | app/src/main/res/layout/activity_edit.xml | 24 | ||||
-rw-r--r-- | app/src/main/res/layout/activity_exception.xml | 6 | ||||
-rw-r--r-- | app/src/main/res/layout/activity_notes_list_view.xml | 24 | ||||
-rw-r--r-- | app/src/main/res/layout/activity_preferences.xml | 25 | ||||
-rw-r--r-- | app/src/main/res/layout/drawer_layout.xml | 27 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_note_edit.xml | 2 |
7 files changed, 84 insertions, 62 deletions
diff --git a/app/src/main/res/layout/activity_about.xml b/app/src/main/res/layout/activity_about.xml index 7582ef75..10444a88 100644 --- a/app/src/main/res/layout/activity_about.xml +++ b/app/src/main/res/layout/activity_about.xml @@ -1,30 +1,36 @@ <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="match_parent" 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" android:orientation="vertical"> - <androidx.appcompat.widget.Toolbar - android:id="@+id/toolbar" + <com.google.android.material.appbar.AppBarLayout android:layout_width="match_parent" - android:layout_height="?attr/actionBarSize" - android:background="?attr/colorPrimary" - app:contentInsetStartWithNavigation="0dp" - app:elevation="4dp" - app:navigationIcon="@drawable/ic_arrow_back_grey600_24dp" - app:titleMarginStart="0dp" - tools:title="@string/simple_about" /> + android:layout_height="wrap_content"> - <com.google.android.material.tabs.TabLayout - android:id="@+id/tabs" - android:layout_width="match_parent" - android:layout_height="wrap_content" /> + <androidx.appcompat.widget.Toolbar + 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_grey600_24dp" + app:titleMarginStart="0dp" + tools:title="@string/simple_about" /> + + <com.google.android.material.tabs.TabLayout + android:id="@+id/tabs" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="?attr/colorPrimary" /> + </com.google.android.material.appbar.AppBarLayout> <androidx.viewpager.widget.ViewPager android:id="@+id/pager" android:layout_width="match_parent" - android:layout_height="wrap_content" /> + android:layout_height="wrap_content" + android:background="?attr/colorPrimary" /> </LinearLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/activity_edit.xml b/app/src/main/res/layout/activity_edit.xml index d089db72..2c884af4 100644 --- a/app/src/main/res/layout/activity_edit.xml +++ b/app/src/main/res/layout/activity_edit.xml @@ -1,21 +1,25 @@ <?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"> - <androidx.appcompat.widget.Toolbar - android:id="@+id/toolbar" + <com.google.android.material.appbar.AppBarLayout android:layout_width="match_parent" - android:layout_height="?attr/actionBarSize" - android:background="?attr/colorPrimary" - app:contentInsetStartWithNavigation="0dp" - app:elevation="4dp" - app:navigationIcon="@drawable/ic_arrow_back_grey600_24dp" - app:titleMarginStart="0dp" - tools:title="Edit Sample note" /> + android:layout_height="wrap_content"> + + <androidx.appcompat.widget.Toolbar + 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_grey600_24dp" + app:titleMarginStart="0dp" + tools:title="Edit Sample note" /> + </com.google.android.material.appbar.AppBarLayout> <androidx.fragment.app.FragmentContainerView android:id="@+id/fragment_container_view" diff --git a/app/src/main/res/layout/activity_exception.xml b/app/src/main/res/layout/activity_exception.xml index 89d270b1..5ed3c605 100644 --- a/app/src/main/res/layout/activity_exception.xml +++ b/app/src/main/res/layout/activity_exception.xml @@ -4,6 +4,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" + android:background="?attr/colorPrimary" android:orientation="vertical"> <androidx.appcompat.widget.Toolbar @@ -55,7 +56,8 @@ android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_weight=".5" - android:text="@string/simple_close" /> + android:text="@string/simple_close" + android:textColor="@color/defaultBrand" /> <Button android:id="@+id/copy" @@ -65,7 +67,7 @@ android:layout_marginTop="6dp" android:layout_marginBottom="6dp" android:layout_weight=".5" - android:background="@color/primary" + android:background="@color/defaultBrand" android:foreground="?attr/selectableItemBackground" android:text="@string/simple_copy" android:textColor="@color/fg_contrast" diff --git a/app/src/main/res/layout/activity_notes_list_view.xml b/app/src/main/res/layout/activity_notes_list_view.xml index cc1e7ca6..c1f5302d 100644 --- a/app/src/main/res/layout/activity_notes_list_view.xml +++ b/app/src/main/res/layout/activity_notes_list_view.xml @@ -11,16 +11,20 @@ android:layout_height="match_parent" android:orientation="vertical"> - <androidx.appcompat.widget.Toolbar - android:id="@+id/toolbar" + <com.google.android.material.appbar.AppBarLayout android:layout_width="match_parent" - android:layout_height="?attr/actionBarSize" - android:background="?attr/colorPrimary" - app:contentInsetStartWithNavigation="0dp" - app:elevation="4dp" - app:titleMarginStart="0dp" - tools:navigationIcon="@drawable/ic_arrow_back_grey600_24dp" - tools:title="@string/app_name" /> + android:layout_height="wrap_content"> + + <androidx.appcompat.widget.Toolbar + android:id="@+id/toolbar" + android:layout_width="match_parent" + android:layout_height="?attr/actionBarSize" + android:background="?attr/colorPrimary" + app:contentInsetStartWithNavigation="0dp" + app:titleMarginStart="0dp" + tools:navigationIcon="@drawable/ic_arrow_back_grey600_24dp" + tools:title="@string/app_name" /> + </com.google.android.material.appbar.AppBarLayout> <androidx.swiperefreshlayout.widget.SwipeRefreshLayout android:id="@+id/swiperefreshlayout" @@ -60,6 +64,6 @@ android:id="@+id/fab_create" style="@style/fab" android:title="@string/action_create" - app:backgroundTint="@color/primary" + app:backgroundTint="@color/defaultBrand" app:srcCompat="@drawable/ic_add_white_24dp" /> </androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/activity_preferences.xml b/app/src/main/res/layout/activity_preferences.xml index 2b4c4f4d..10b8089e 100644 --- a/app/src/main/res/layout/activity_preferences.xml +++ b/app/src/main/res/layout/activity_preferences.xml @@ -5,20 +5,25 @@ android:layout_height="match_parent" android:orientation="vertical"> - <androidx.appcompat.widget.Toolbar - android:id="@+id/toolbar" + <com.google.android.material.appbar.AppBarLayout android:layout_width="match_parent" - android:layout_height="?attr/actionBarSize" - android:background="?attr/colorPrimary" - app:contentInsetStartWithNavigation="0dp" - app:elevation="4dp" - app:navigationIcon="@drawable/ic_arrow_back_grey600_24dp" - app:title="@string/action_settings" - app:titleMarginStart="0dp" /> + android:layout_height="wrap_content"> + + <androidx.appcompat.widget.Toolbar + 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_grey600_24dp" + app:title="@string/action_settings" + app:titleMarginStart="0dp" /> + </com.google.android.material.appbar.AppBarLayout> <androidx.fragment.app.FragmentContainerView android:id="@+id/fragment_container_view" android:layout_width="match_parent" - android:layout_height="match_parent" /> + android:layout_height="match_parent" + android:background="?attr/colorPrimary" /> </LinearLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/drawer_layout.xml b/app/src/main/res/layout/drawer_layout.xml index cf1f0d7b..5f04008e 100644 --- a/app/src/main/res/layout/drawer_layout.xml +++ b/app/src/main/res/layout/drawer_layout.xml @@ -41,6 +41,7 @@ android:id="@+id/header_view_background" android:layout_width="match_parent" android:layout_height="164dp" + android:background="@color/defaultBrand" android:contentDescription="@null" android:scaleType="centerCrop" app:srcCompat="@drawable/background" /> @@ -61,9 +62,9 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/current_account_image" - android:layout_marginTop="6dp" android:layout_marginStart="@dimen/header_padding" android:layout_marginLeft="@dimen/header_padding" + android:layout_marginTop="6dp" android:layout_marginEnd="@dimen/header_padding" android:layout_marginRight="@dimen/header_padding" android:ellipsize="end" @@ -81,34 +82,34 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@+id/app_name" + android:layout_alignParentStart="true" + android:layout_alignParentLeft="true" android:layout_marginStart="@dimen/header_padding" android:layout_marginLeft="@dimen/header_padding" android:layout_marginEnd="@dimen/widget_margin" android:layout_marginRight="@dimen/widget_margin" + android:layout_toStartOf="@id/account_arrow" + android:layout_toLeftOf="@id/account_arrow" android:ellipsize="end" android:maxLines="1" android:shadowColor="@android:color/black" - android:layout_alignParentStart="true" - android:layout_toStartOf="@id/account_arrow" android:shadowDx="0.5" android:shadowDy="0" android:shadowRadius="2" android:textColor="@android:color/white" android:textSize="12sp" - tools:text="user@nextcloud.example.comuser@nextcloud.example.comuser@nextcloud.example.com" - android:layout_alignParentLeft="true" - android:layout_toLeftOf="@id/account_arrow" /> + tools:text="user@nextcloud.example.comuser@nextcloud.example.comuser@nextcloud.example.com" /> <androidx.appcompat.widget.AppCompatImageView + android:id="@+id/account_arrow" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:id="@+id/account_arrow" - app:srcCompat="@drawable/ic_arrow_drop_down_white_24dp" - android:layout_alignParentEnd="true" android:layout_alignBottom="@+id/account" - android:layout_marginEnd="@dimen/header_padding" + android:layout_alignParentEnd="true" android:layout_alignParentRight="true" - android:layout_marginRight="@dimen/header_padding" /> + android:layout_marginEnd="@dimen/header_padding" + android:layout_marginRight="@dimen/header_padding" + app:srcCompat="@drawable/ic_arrow_drop_down_white_24dp" /> </RelativeLayout> <LinearLayout @@ -140,10 +141,10 @@ android:id="@+id/accountChooser" android:layout_width="match_parent" android:layout_height="wrap_content" + android:orientation="vertical" android:paddingTop="8dp" android:paddingBottom="8dp" - android:orientation="vertical" - android:visibility="gone"/> + android:visibility="gone" /> </LinearLayout> </androidx.core.widget.NestedScrollView> diff --git a/app/src/main/res/layout/fragment_note_edit.xml b/app/src/main/res/layout/fragment_note_edit.xml index 954351b0..2d5a49ec 100644 --- a/app/src/main/res/layout/fragment_note_edit.xml +++ b/app/src/main/res/layout/fragment_note_edit.xml @@ -17,7 +17,7 @@ android:id="@+id/editContent" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@null" + android:background="?attr/colorPrimary" android:ems="10" android:gravity="top" android:inputType="textMultiLine|textCapSentences" |