Tweak UI of profile tab layout
- Change color & shape of indicator. - Add margin around tab layout. - Remove divider below the tab layout. Bug: 188589806 Bug: 188589053 Test: manual visual Change-Id: I644a4aeb951daa6eb601229fa5f1096dcbdc86ca
This commit is contained in:
24
res/drawable/tabs_indicator_background.xml
Normal file
24
res/drawable/tabs_indicator_background.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2021 The Android Open Source Project
|
||||
|
||||
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.
|
||||
-->
|
||||
<shape
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<solid android:color="?android:attr/textColorSecondaryInverse"/>
|
||||
<corners android:radius="8dp"/>
|
||||
<size android:height="4dp"/>
|
||||
</shape>
|
@@ -19,6 +19,7 @@
|
||||
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/container_material"
|
||||
android:orientation="vertical"
|
||||
@@ -66,19 +67,20 @@
|
||||
android:background="@android:color/transparent"
|
||||
android:id="@+id/tabs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layoutDirection="ltr"
|
||||
app:tabMaxWidth="0dp"
|
||||
app:tabGravity="fill"
|
||||
app:tabMode="fixed"
|
||||
app:tabIndicatorColor="@*android:color/accent_device_default"
|
||||
app:tabIndicator="@drawable/tabs_indicator_background"
|
||||
app:tabIndicatorColor="?androidprv:attr/colorAccentPrimaryVariant"
|
||||
app:tabSelectedTextColor="@*android:color/accent_device_default"
|
||||
app:tabTextAppearance="@style/TextAppearance.Tab"
|
||||
app:tabTextColor="?android:attr/textColorSecondary"/>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="?android:attr/listDivider"/>
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/view_pager"
|
||||
|
Reference in New Issue
Block a user