This commit is contained in:
machiav3lli 2022-05-03 03:32:05 +02:00
parent 96a133dbec
commit f9de21de0b
7 changed files with 31 additions and 45 deletions

View File

@ -2,7 +2,11 @@ package com.looker.droidify.ui.compose.components
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.requiredSize
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text

View File

@ -1,11 +1,24 @@
package com.looker.droidify.ui.compose.components
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Favorite
import androidx.compose.material.icons.filled.FavoriteBorder
import androidx.compose.material3.*
import androidx.compose.material3.ButtonDefaults.buttonColors
import androidx.compose.material3.FilledTonalButton
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf

View File

@ -4,7 +4,11 @@ import androidx.compose.animation.AnimatedVisibility
import androidx.compose.animation.animateColorAsState
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.combinedClickable
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Done
import androidx.compose.material3.Icon

View File

@ -87,11 +87,11 @@ class ExploreFragment : MainNavFragmentX() {
ExpandableSearchAction(
query = searchQuery.orEmpty(),
onClose = {
viewModel.setSearchQuery("")
viewModel.searchQuery.postValue("")
},
onQueryChanged = { query ->
if (isResumed && query != searchQuery)
viewModel.setSearchQuery(query)
viewModel.searchQuery.postValue(query)
}
)
TopBarAction(icon = Icons.Rounded.Sync) {

View File

@ -106,11 +106,11 @@ class InstalledFragment : MainNavFragmentX() {
ExpandableSearchAction(
query = searchQuery.orEmpty(),
onClose = {
viewModel.setSearchQuery("")
viewModel.searchQuery.postValue("")
},
onQueryChanged = { query ->
if (isResumed && query != searchQuery)
viewModel.setSearchQuery(query)
viewModel.searchQuery.postValue(query)
}
)
TopBarAction(icon = Icons.Rounded.Sync) {

View File

@ -98,11 +98,11 @@ class LatestFragment : MainNavFragmentX() {
ExpandableSearchAction(
query = searchQuery.orEmpty(),
onClose = {
viewModel.setSearchQuery("")
viewModel.searchQuery.postValue("")
},
onQueryChanged = { query ->
if (isResumed && query != searchQuery)
viewModel.setSearchQuery(query)
viewModel.searchQuery.postValue(query)
}
)
TopBarAction(icon = Icons.Rounded.Sync) {

View File

@ -1,35 +0,0 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ OAndBackupX: open-source apps backup and restore app.
~ Copyright (C) 2020 Antonios Hazim
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU Affero General Public License as
~ published by the Free Software Foundation, either version 3 of the
~ License, or (at your option) any later version.
~
~ This program 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 Affero General Public License for more details.
~
~ 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">
<data>
</data>
<com.google.android.material.circularreveal.CircularRevealFrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<androidx.compose.ui.platform.ComposeView
android:id="@+id/composeView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</com.google.android.material.circularreveal.CircularRevealFrameLayout>
</layout>