mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-04-23 19:32:16 +00:00
Remove: Installed layout views
This commit is contained in:
parent
e170bfe905
commit
2edccc38e5
@ -50,45 +50,6 @@ class InstalledFragment : MainNavFragmentX() {
|
||||
redrawPage(it)
|
||||
}
|
||||
viewModel.secondaryProducts.observe(viewLifecycleOwner) {
|
||||
binding.updatedBar.visibility = if (it.isNotEmpty()) View.VISIBLE else View.GONE
|
||||
binding.secondaryComposeRecycler.setContent {
|
||||
AppTheme(
|
||||
darkTheme = when (Preferences[Preferences.Key.Theme]) {
|
||||
is Preferences.Theme.System -> isSystemInDarkTheme()
|
||||
is Preferences.Theme.AmoledSystem -> isSystemInDarkTheme()
|
||||
else -> isDarkTheme
|
||||
}
|
||||
) {
|
||||
MdcTheme {
|
||||
ProductsHorizontalRecycler(it, repositories) { item ->
|
||||
AppSheetX(item.packageName)
|
||||
.showNow(parentFragmentManager, "Product ${item.packageName}")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
binding.buttonUpdated.setOnClickListener {
|
||||
binding.secondaryComposeRecycler.visibility =
|
||||
when (binding.secondaryComposeRecycler.visibility) {
|
||||
View.VISIBLE -> {
|
||||
binding.buttonUpdated.setCompoundDrawablesRelativeWithIntrinsicBounds(
|
||||
0, 0, R.drawable.ic_arrow_down, 0
|
||||
)
|
||||
View.GONE
|
||||
}
|
||||
else -> {
|
||||
binding.buttonUpdated.setCompoundDrawablesRelativeWithIntrinsicBounds(
|
||||
0, 0, R.drawable.ic_arrow_up, 0
|
||||
)
|
||||
View.VISIBLE
|
||||
}
|
||||
}
|
||||
}
|
||||
binding.buttonUpdateAll.setOnClickListener {
|
||||
viewModel.secondaryProducts.value?.let {
|
||||
mainActivityX.syncConnection.binder?.updateApps(it.map(Product::toItem))
|
||||
}
|
||||
}
|
||||
mainActivityX.menuSetup.observe(viewLifecycleOwner) {
|
||||
if (it != null) {
|
||||
|
@ -15,105 +15,21 @@
|
||||
~ You should have received a copy of the GNU Affero General Public License
|
||||
~ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
<com.google.android.material.circularreveal.CircularRevealFrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/updatedBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="@dimen/shape_margin_large"
|
||||
android:layout_marginVertical="@dimen/shape_margin_small"
|
||||
android:paddingTop="2dp"
|
||||
app:layout_constraintBottom_toTopOf="@id/modeBar"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/buttonUpdated"
|
||||
style="@style/Widget.Material3.Button.ElevatedButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableEnd="@drawable/ic_arrow_up"
|
||||
android:drawableTint="?attr/colorPrimary"
|
||||
android:paddingHorizontal="@dimen/shape_margin_medium"
|
||||
android:text="@string/updates"
|
||||
android:textAlignment="viewStart"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/buttonUpdateAll"
|
||||
app:layout_constraintHorizontal_chainStyle="spread_inside"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/buttonUpdateAll"
|
||||
style="@style/Widget.Material3.Chip.Assist.Elevated"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/shape_margin_medium"
|
||||
android:text="@string/update_all"
|
||||
app:chipIcon="@drawable/ic_download"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/buttonUpdated"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.compose.ui.platform.ComposeView
|
||||
android:id="@+id/secondaryComposeRecycler"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/modeBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="@dimen/shape_margin_large"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/buttonBlocklist"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="@dimen/shape_margin_small"
|
||||
android:text="@string/installed_applications"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/buttonSortFilter"
|
||||
app:layout_constraintHorizontal_chainStyle="spread_inside"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/buttonSortFilter"
|
||||
style="@style/Widget.Material3.Chip.Assist.Elevated"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/shape_margin_medium"
|
||||
android:text="@string/sort_filter"
|
||||
app:chipIcon="@drawable/ic_sort"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/buttonBlocklist"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.compose.ui.platform.ComposeView
|
||||
android:id="@+id/primaryComposeRecycler"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
</LinearLayout>
|
||||
android:layout_height="match_parent" />
|
||||
</com.google.android.material.circularreveal.CircularRevealFrameLayout>
|
||||
</layout>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user