mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-04-24 11:52:13 +00:00
Add: Wire show/hide for updates button
This commit is contained in:
parent
e7295d90d6
commit
3a9b207073
@ -7,6 +7,7 @@ import android.view.ViewGroup
|
||||
import androidx.compose.foundation.isSystemInDarkTheme
|
||||
import androidx.compose.material.Scaffold
|
||||
import com.google.android.material.composethemeadapter.MdcTheme
|
||||
import com.looker.droidify.R
|
||||
import com.looker.droidify.content.Preferences
|
||||
import com.looker.droidify.database.entity.Repository
|
||||
import com.looker.droidify.databinding.FragmentInstalledXBinding
|
||||
@ -79,5 +80,22 @@ class InstalledFragment : MainNavFragmentX() {
|
||||
}
|
||||
}
|
||||
}
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
10
src/main/res/drawable/ic_arrow_up.xml
Normal file
10
src/main/res/drawable/ic_arrow_up.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/colorOnSurface"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M8.12,14.71L12,10.83l3.88,3.88c0.39,0.39 1.02,0.39 1.41,0 0.39,-0.39 0.39,-1.02 0,-1.41L12.7,8.71c-0.39,-0.39 -1.02,-0.39 -1.41,0L6.7,13.3c-0.39,0.39 -0.39,1.02 0,1.41 0.39,0.38 1.03,0.39 1.42,0z" />
|
||||
</vector>
|
@ -42,8 +42,10 @@
|
||||
style="@style/Widget.Material3.Button.UnelevatedButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableEnd="@drawable/ic_arrow_down"
|
||||
android:layout_marginHorizontal="@dimen/shape_margin_medium"
|
||||
android:drawableEnd="@drawable/ic_arrow_up"
|
||||
android:drawableTint="?colorControlNormal"
|
||||
android:paddingHorizontal="@dimen/shape_margin_medium"
|
||||
android:text="@string/updates"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="?colorControlNormal"
|
||||
|
Loading…
x
Reference in New Issue
Block a user