Skip to content

Commit

Permalink
ui fix
Browse files Browse the repository at this point in the history
  • Loading branch information
srtvprateek committed Aug 12, 2023
1 parent f5a32db commit 25b1e62
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@ internal class PluginGroupItemHolder(parent: ViewGroup, actionListener: DiffAwar
private val binding = PlutoItemPluginGroupBinding.bind(itemView)
private val name = binding.name
private val icon = binding.icon
private val iconDummy = binding.iconDummy

override fun onBind(item: ListItem) {
if (item is PluginGroup) {
icon.setImageResource(item.getConfig().icon)
iconDummy.setImageResource(item.getConfig().icon)
name.text = item.getConfig().name
binding.root.setOnDebounceClickListener {
onAction("click")
Expand Down
28 changes: 19 additions & 9 deletions pluto/lib/src/main/res/layout/pluto___item_plugin_group.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,30 @@
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="@dimen/pluto___margin_small"
android:background="@color/pluto___white_80"
android:backgroundTint="@color/pluto___white_80"
android:background="@color/pluto___white_60"
android:backgroundTint="@color/pluto___white_60"
android:clipToPadding="true"
app:cardCornerRadius="31dp"
app:layout_constraintBottom_toBottomOf="@+id/iconCard"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintStart_toStartOf="@+id/iconCard"
app:layout_constraintTop_toTopOf="@+id/iconCard">

<ImageView
android:id="@+id/iconDummy"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_gravity="center" />
</androidx.cardview.widget.CardView>

<androidx.cardview.widget.CardView
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="6dp"
android:background="@color/pluto___white_40"
android:backgroundTint="@color/pluto___white_40"
android:clipToPadding="true"
app:cardCornerRadius="31dp"
app:cardElevation="@dimen/pluto___margin_mini"
app:layout_constraintBottom_toBottomOf="@+id/iconCard"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintStart_toStartOf="@+id/iconCard"
app:layout_constraintTop_toTopOf="@+id/iconCard">

</androidx.cardview.widget.CardView>

Expand All @@ -37,7 +47,7 @@
android:clipToPadding="true"
app:cardCornerRadius="31dp"
app:layout_constraintHorizontal_bias="0.4"
app:cardElevation="@dimen/pluto___margin_mini"
app:cardElevation="@dimen/pluto___margin_xsmall"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -50,7 +60,7 @@
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_gravity="center"
android:layout_margin="4dp" />
android:layout_margin="5dp" />

</androidx.cardview.widget.CardView>

Expand Down

0 comments on commit 25b1e62

Please sign in to comment.