MainActivity: Top bar status indicator adjustments (#7329)

* Move to inside app bar for tablet ui layout so it can be hidden
with the app bar at once
* Remove the redundant parent view
* Add text appearance style
This commit is contained in:
Ivan Iskandar 2022-06-18 23:12:22 +07:00 committed by GitHub
parent 28e7009b49
commit 4c3af7bf36
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 40 additions and 65 deletions

View file

@ -26,49 +26,40 @@
android:layout_height="?attr/actionBarSize"
android:theme="?attr/actionBarTheme" />
</com.google.android.material.appbar.TachiyomiAppBarLayout>
<com.google.android.material.tabs.TabLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<FrameLayout
<TextView
android:id="@+id/downloaded_only"
android:layout_width="0dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorTertiary"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/side_nav"
app:layout_constraintTop_toBottomOf="@+id/appbar"
tools:visibility="visible">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:padding="4dp"
android:text="@string/label_downloaded_only"
android:textColor="?attr/colorOnTertiary" />
</FrameLayout>
<FrameLayout
android:id="@+id/incognito_mode"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:textAlignment="center"
android:textAppearance="?attr/textAppearanceLabelMedium"
android:textColor="?attr/colorOnTertiary"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/side_nav"
app:layout_constraintTop_toBottomOf="@+id/downloaded_only"
tools:visibility="visible">
tools:visibility="visible" />
<TextView
android:layout_width="wrap_content"
android:id="@+id/incognito_mode"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="?attr/colorPrimary"
android:gravity="center"
android:padding="4dp"
android:text="@string/pref_incognito_mode"
android:textColor="?attr/colorOnPrimary" />
android:textAlignment="center"
android:textAppearance="?attr/textAppearanceLabelMedium"
android:textColor="?attr/colorOnPrimary"
android:visibility="gone"
tools:visibility="visible" />
</FrameLayout>
</com.google.android.material.appbar.TachiyomiAppBarLayout>
<com.google.android.material.navigationrail.NavigationRailView
android:id="@+id/side_nav"
@ -79,14 +70,6 @@
app:layout_constraintStart_toStartOf="parent"
app:menu="@menu/main_nav" />
<com.google.android.material.tabs.TabLayout
android:id="@+id/tabs"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/side_nav"
app:layout_constraintTop_toBottomOf="@+id/incognito_mode" />
<eu.kanade.tachiyomi.widget.TachiyomiChangeHandlerFrameLayout
android:id="@+id/controller_container"
android:layout_width="0dp"
@ -94,7 +77,7 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/side_nav"
app:layout_constraintTop_toBottomOf="@+id/tabs" />
app:layout_constraintTop_toBottomOf="@+id/appbar" />
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -32,41 +32,33 @@
android:layout_height="wrap_content"
android:visibility="gone" />
<FrameLayout
<TextView
android:id="@+id/downloaded_only"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorTertiary"
android:visibility="gone"
tools:visibility="visible">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:padding="4dp"
android:text="@string/label_downloaded_only"
android:textColor="?attr/colorOnTertiary" />
android:textAlignment="center"
android:textAppearance="?attr/textAppearanceLabelMedium"
android:textColor="?attr/colorOnTertiary"
android:visibility="gone"
tools:visibility="visible" />
</FrameLayout>
<FrameLayout
<TextView
android:id="@+id/incognito_mode"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:visibility="gone"
tools:visibility="visible">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:padding="4dp"
android:text="@string/pref_incognito_mode"
android:textColor="?attr/colorOnPrimary" />
</FrameLayout>
android:textAlignment="center"
android:textAppearance="?attr/textAppearanceLabelMedium"
android:textColor="?attr/colorOnPrimary"
android:visibility="gone"
tools:visibility="visible" />
</com.google.android.material.appbar.TachiyomiAppBarLayout>