view_toolbar_action: Switch to actual toolbar everywhere
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
@@ -42,10 +42,7 @@ class AboutFragment : BaseFragment<FragmentAboutBinding>() {
|
|||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
|
||||||
// Toolbar
|
// Toolbar
|
||||||
binding.layoutToolbarAction.txtTitle.text = getString(R.string.title_about)
|
binding.toolbar.setNavigationOnClickListener { findNavController().navigateUp() }
|
||||||
binding.layoutToolbarAction.imgActionPrimary.setOnClickListener {
|
|
||||||
findNavController().navigateUp()
|
|
||||||
}
|
|
||||||
|
|
||||||
// About Details
|
// About Details
|
||||||
binding.imgIcon.load(R.mipmap.ic_launcher)
|
binding.imgIcon.load(R.mipmap.ic_launcher)
|
||||||
|
|||||||
@@ -47,10 +47,7 @@ class AccountFragment : BaseFragment<FragmentAccountBinding>() {
|
|||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
|
||||||
// Toolbar
|
// Toolbar
|
||||||
binding.layoutToolbarAction.txtTitle.text = getString(R.string.title_account_manager)
|
binding.toolbar.setNavigationOnClickListener { findNavController().navigateUp() }
|
||||||
binding.layoutToolbarAction.imgActionPrimary.setOnClickListener {
|
|
||||||
findNavController().navigateUp()
|
|
||||||
}
|
|
||||||
|
|
||||||
// Chips
|
// Chips
|
||||||
view.context.apply {
|
view.context.apply {
|
||||||
|
|||||||
@@ -60,9 +60,7 @@ class DetailsMoreFragment : BaseFragment<FragmentDetailsMoreBinding>() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Toolbar
|
// Toolbar
|
||||||
binding.layoutToolbarActionMore.toolbar.setOnClickListener {
|
binding.toolbar.setOnClickListener { findNavController().navigateUp() }
|
||||||
findNavController().navigateUp()
|
|
||||||
}
|
|
||||||
|
|
||||||
inflateDescription(args.app)
|
inflateDescription(args.app)
|
||||||
inflateFiles(args.app)
|
inflateFiles(args.app)
|
||||||
@@ -95,7 +93,7 @@ class DetailsMoreFragment : BaseFragment<FragmentDetailsMoreBinding>() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun inflateDescription(app: App) {
|
private fun inflateDescription(app: App) {
|
||||||
binding.layoutToolbarActionMore.txtTitle.text = app.displayName
|
binding.toolbar.title = app.displayName
|
||||||
binding.txtDescription.text = HtmlCompat.fromHtml(
|
binding.txtDescription.text = HtmlCompat.fromHtml(
|
||||||
app.description,
|
app.description,
|
||||||
HtmlCompat.FROM_HTML_MODE_COMPACT
|
HtmlCompat.FROM_HTML_MODE_COMPACT
|
||||||
|
|||||||
@@ -58,11 +58,9 @@ class DetailsReviewFragment : BaseFragment<FragmentDetailsReviewBinding>() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Toolbar
|
// Toolbar
|
||||||
binding.layoutToolbarActionReview.apply {
|
binding.toolbar.apply {
|
||||||
txtTitle.text = args.displayName
|
title = args.displayName
|
||||||
toolbar.setOnClickListener {
|
setNavigationOnClickListener { findNavController().navigateUp() }
|
||||||
findNavController().navigateUp()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
viewModel.liveData.observe(viewLifecycleOwner) {
|
viewModel.liveData.observe(viewLifecycleOwner) {
|
||||||
|
|||||||
@@ -50,10 +50,9 @@ class DevProfileFragment : BaseFragment<FragmentDevProfileBinding>(),
|
|||||||
val developerCarouselController = DeveloperCarouselController(this)
|
val developerCarouselController = DeveloperCarouselController(this)
|
||||||
|
|
||||||
// Toolbar
|
// Toolbar
|
||||||
binding.layoutToolbarAction.apply {
|
binding.toolbar.apply {
|
||||||
txtTitle.text =
|
title = if (args.title.isNullOrBlank()) getString(R.string.details_dev_profile) else args.title
|
||||||
if (args.title.isNullOrBlank()) getString(R.string.details_dev_profile) else args.title
|
setNavigationOnClickListener { findNavController().navigateUp() }
|
||||||
toolbar.setOnClickListener { findNavController().navigateUp() }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// RecyclerView
|
// RecyclerView
|
||||||
@@ -78,7 +77,7 @@ class DevProfileFragment : BaseFragment<FragmentDevProfileBinding>(),
|
|||||||
|
|
||||||
is ViewState.Success<*> -> {
|
is ViewState.Success<*> -> {
|
||||||
(it.data as DevStream).apply {
|
(it.data as DevStream).apply {
|
||||||
binding.layoutToolbarAction.txtTitle.text = title
|
binding.toolbar.title = title
|
||||||
binding.txtDevName.text = title
|
binding.txtDevName.text = title
|
||||||
binding.txtDevDescription.text = description
|
binding.txtDevDescription.text = description
|
||||||
binding.imgIcon.load(imgUrl)
|
binding.imgIcon.load(imgUrl)
|
||||||
|
|||||||
@@ -27,9 +27,14 @@
|
|||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
tools:context=".view.ui.about.AboutFragment">
|
tools:context=".view.ui.about.AboutFragment">
|
||||||
|
|
||||||
<include
|
<androidx.appcompat.widget.Toolbar
|
||||||
android:id="@+id/layout_toolbar_action"
|
android:id="@+id/toolbar"
|
||||||
layout="@layout/view_toolbar_action" />
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:minHeight="?attr/actionBarSize"
|
||||||
|
android:theme="?attr/actionBarTheme"
|
||||||
|
app:navigationIcon="@drawable/ic_arrow_back"
|
||||||
|
app:title="@string/title_about" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
@@ -27,9 +27,14 @@
|
|||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
tools:context=".view.ui.account.AccountFragment">
|
tools:context=".view.ui.account.AccountFragment">
|
||||||
|
|
||||||
<include
|
<androidx.appcompat.widget.Toolbar
|
||||||
android:id="@+id/layout_toolbar_action"
|
android:id="@+id/toolbar"
|
||||||
layout="@layout/view_toolbar_action" />
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:minHeight="?attr/actionBarSize"
|
||||||
|
android:theme="?attr/actionBarTheme"
|
||||||
|
app:navigationIcon="@drawable/ic_arrow_back"
|
||||||
|
app:title="@string/title_account_manager" />
|
||||||
|
|
||||||
<HorizontalScrollView
|
<HorizontalScrollView
|
||||||
android:id="@+id/chip_layout"
|
android:id="@+id/chip_layout"
|
||||||
@@ -140,4 +145,4 @@
|
|||||||
app:btnStateText="@string/action_logout" />
|
app:btnStateText="@string/action_logout" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -26,9 +26,14 @@
|
|||||||
android:weightSum="3"
|
android:weightSum="3"
|
||||||
tools:context=".view.ui.about.AboutFragment">
|
tools:context=".view.ui.about.AboutFragment">
|
||||||
|
|
||||||
<include
|
<androidx.appcompat.widget.Toolbar
|
||||||
android:id="@+id/layout_toolbar_action"
|
android:id="@+id/toolbar"
|
||||||
layout="@layout/view_toolbar_action" />
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:minHeight="?attr/actionBarSize"
|
||||||
|
android:theme="?attr/actionBarTheme"
|
||||||
|
app:navigationIcon="@drawable/ic_arrow_back"
|
||||||
|
app:title="@string/title_about" />
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
@@ -28,9 +28,14 @@
|
|||||||
android:weightSum="2"
|
android:weightSum="2"
|
||||||
tools:context=".view.ui.account.AccountFragment">
|
tools:context=".view.ui.account.AccountFragment">
|
||||||
|
|
||||||
<include
|
<androidx.appcompat.widget.Toolbar
|
||||||
android:id="@+id/layout_toolbar_action"
|
android:id="@+id/toolbar"
|
||||||
layout="@layout/view_toolbar_action" />
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:minHeight="?attr/actionBarSize"
|
||||||
|
android:theme="?attr/actionBarTheme"
|
||||||
|
app:navigationIcon="@drawable/ic_arrow_back"
|
||||||
|
app:title="@string/title_account_manager" />
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -131,4 +136,4 @@
|
|||||||
app:btnStateIcon="@drawable/ic_logout"
|
app:btnStateIcon="@drawable/ic_logout"
|
||||||
app:btnStateText="@string/action_logout" />
|
app:btnStateText="@string/action_logout" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -25,9 +25,13 @@
|
|||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
tools:context=".view.ui.details.DetailsMoreFragment">
|
tools:context=".view.ui.details.DetailsMoreFragment">
|
||||||
|
|
||||||
<include
|
<androidx.appcompat.widget.Toolbar
|
||||||
android:id="@+id/layout_toolbar_action_more"
|
android:id="@+id/toolbar"
|
||||||
layout="@layout/view_toolbar_action" />
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:minHeight="?attr/actionBarSize"
|
||||||
|
android:theme="?attr/actionBarTheme"
|
||||||
|
app:navigationIcon="@drawable/ic_arrow_back" />
|
||||||
|
|
||||||
<androidx.core.widget.NestedScrollView
|
<androidx.core.widget.NestedScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -100,4 +104,4 @@
|
|||||||
tools:listitem="@layout/view_file" />
|
tools:listitem="@layout/view_file" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.core.widget.NestedScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -25,9 +25,13 @@
|
|||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
tools:context=".view.ui.details.DetailsReviewFragment">
|
tools:context=".view.ui.details.DetailsReviewFragment">
|
||||||
|
|
||||||
<include
|
<androidx.appcompat.widget.Toolbar
|
||||||
android:id="@+id/layout_toolbar_action_review"
|
android:id="@+id/toolbar"
|
||||||
layout="@layout/view_toolbar_action" />
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:minHeight="?attr/actionBarSize"
|
||||||
|
android:theme="?attr/actionBarTheme"
|
||||||
|
app:navigationIcon="@drawable/ic_arrow_back" />
|
||||||
|
|
||||||
<HorizontalScrollView
|
<HorizontalScrollView
|
||||||
android:id="@+id/sort_view"
|
android:id="@+id/sort_view"
|
||||||
@@ -124,4 +128,4 @@
|
|||||||
app:itemSpacing="@dimen/margin_normal"
|
app:itemSpacing="@dimen/margin_normal"
|
||||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
tools:listitem="@layout/view_review" />
|
tools:listitem="@layout/view_review" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -27,10 +27,13 @@
|
|||||||
android:showDividers="middle"
|
android:showDividers="middle"
|
||||||
tools:context=".view.ui.details.DevProfileFragment">
|
tools:context=".view.ui.details.DevProfileFragment">
|
||||||
|
|
||||||
<include
|
<androidx.appcompat.widget.Toolbar
|
||||||
android:id="@+id/layout_toolbar_action"
|
android:id="@+id/toolbar"
|
||||||
layout="@layout/view_toolbar_action" />
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:minHeight="?attr/actionBarSize"
|
||||||
|
android:theme="?attr/actionBarTheme"
|
||||||
|
app:navigationIcon="@drawable/ic_arrow_back" />
|
||||||
|
|
||||||
<ViewFlipper
|
<ViewFlipper
|
||||||
android:id="@+id/view_flipper"
|
android:id="@+id/view_flipper"
|
||||||
@@ -98,4 +101,4 @@
|
|||||||
android:layout_centerInParent="true" />
|
android:layout_centerInParent="true" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</ViewFlipper>
|
</ViewFlipper>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -1,52 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?><!--
|
|
||||||
~ Aurora Store
|
|
||||||
~ Copyright (C) 2021, Rahul Kumar Patel <whyorean@gmail.com>
|
|
||||||
~
|
|
||||||
~ Aurora Store 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 2 of the License, or
|
|
||||||
~ (at your option) any later version.
|
|
||||||
~
|
|
||||||
~ Aurora Store 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 Aurora Store. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
~
|
|
||||||
-->
|
|
||||||
|
|
||||||
<RelativeLayout 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/toolbar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="?actionBarSize"
|
|
||||||
android:paddingStart="@dimen/padding_medium"
|
|
||||||
android:paddingEnd="@dimen/padding_medium">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
|
||||||
android:id="@+id/img_action_primary"
|
|
||||||
android:layout_width="@dimen/icon_size_default"
|
|
||||||
android:layout_height="@dimen/icon_size_default"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_marginEnd="@dimen/margin_small"
|
|
||||||
android:background="?selectableItemBackgroundBorderless"
|
|
||||||
android:contentDescription="@string/action_back"
|
|
||||||
app:srcCompat="@drawable/ic_arrow_back"
|
|
||||||
app:tint="?colorControlNormal" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/txt_title"
|
|
||||||
style="@style/AuroraTextStyle.Subtitle.Alt"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="42dp"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_toEndOf="@id/img_action_primary"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:paddingStart="@dimen/padding_large"
|
|
||||||
android:paddingEnd="@dimen/padding_normal"
|
|
||||||
android:singleLine="true"
|
|
||||||
tools:text="Title" />
|
|
||||||
</RelativeLayout>
|
|
||||||
Reference in New Issue
Block a user