diff --git a/src/main/kotlin/com/looker/droidify/ui/fragments/InstalledFragment.kt b/src/main/kotlin/com/looker/droidify/ui/fragments/InstalledFragment.kt index 652696c0..033dea46 100644 --- a/src/main/kotlin/com/looker/droidify/ui/fragments/InstalledFragment.kt +++ b/src/main/kotlin/com/looker/droidify/ui/fragments/InstalledFragment.kt @@ -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 + } + } + } } } diff --git a/src/main/res/drawable/ic_arrow_up.xml b/src/main/res/drawable/ic_arrow_up.xml new file mode 100644 index 00000000..0b1663c9 --- /dev/null +++ b/src/main/res/drawable/ic_arrow_up.xml @@ -0,0 +1,10 @@ + + + diff --git a/src/main/res/layout/fragment_installed_x.xml b/src/main/res/layout/fragment_installed_x.xml index 1c1dbfc9..63014e59 100644 --- a/src/main/res/layout/fragment_installed_x.xml +++ b/src/main/res/layout/fragment_installed_x.xml @@ -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"