android-chips

Is it possible to set Material ChipGroup orientation to VERTICAL?

試著忘記壹切 提交于 2021-02-15 06:19:58
问题 I'm adding a material ChipGroup dynamically to a parent linear layout which is set to VERTICAL orientation but the chip items seem to be added horizontally. Is there any way to make it lay out the chip items vertically? setLayoutDirection() method of ChipGroup class method doesn't seem to take any parameter that supports VERTICAL orientation. 回答1: you can set width = match_parent in each Chip item <com.google.android.material.chip.ChipGroup android:id="@+id/chipGroup" android:layout_width=

Is it possible to set Material ChipGroup orientation to VERTICAL?

六眼飞鱼酱① 提交于 2021-02-15 06:14:47
问题 I'm adding a material ChipGroup dynamically to a parent linear layout which is set to VERTICAL orientation but the chip items seem to be added horizontally. Is there any way to make it lay out the chip items vertically? setLayoutDirection() method of ChipGroup class method doesn't seem to take any parameter that supports VERTICAL orientation. 回答1: you can set width = match_parent in each Chip item <com.google.android.material.chip.ChipGroup android:id="@+id/chipGroup" android:layout_width=

Filter with chips android

陌路散爱 提交于 2021-01-29 05:19:09
问题 I would like to ask you if exist in component which is an radiobutton, but it is format from chips like this image. it is an component presents in Google Play Games when you want search an game thank for ours response 回答1: It is not exactly what you are looking for but you can use: a container with rounded corners, like a CardView or a LinearLayout single Button with rounded corners for each items add animations on the onClick event Something like: <LinearLayout android:id="@+id/ll_container"

Set com.google.android.material.chip.Chip selected color

泪湿孤枕 提交于 2021-01-20 15:28:59
问题 How do I set the selected com.google.android.material.chip.Chip color? I don't want it to be the default gray. This is a single selection chip group. Original documentation here <com.google.android.material.chip.ChipGroup android:id="@+id/chipgroup" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginStart="16dp" android:layout_marginTop="16dp" android:layout_marginEnd="16dp" app:checkedChip="@+id/chip_program" app:chipSpacingHorizontal="32dp" app

Set com.google.android.material.chip.Chip selected color

久未见 提交于 2021-01-20 15:25:51
问题 How do I set the selected com.google.android.material.chip.Chip color? I don't want it to be the default gray. This is a single selection chip group. Original documentation here <com.google.android.material.chip.ChipGroup android:id="@+id/chipgroup" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginStart="16dp" android:layout_marginTop="16dp" android:layout_marginEnd="16dp" app:checkedChip="@+id/chip_program" app:chipSpacingHorizontal="32dp" app

Adding horizontal scrolling to chip group in Relative layout

早过忘川 提交于 2021-01-02 08:13:39
问题 I created few static chips in a group. I'm using this link (https://material.io/design/components/chips.html#) as reference. Code is as given below: <RelativeLayout android:id="@+id/inputLayout" android:layout_width="match_parent" android:layout_height="100dp" android:layout_alignParentBottom="true" android:background="@android:color/white" android:gravity="bottom" android:paddingStart="8dp" android:paddingTop="8dp" android:paddingEnd="8dp" android:paddingBottom="9dp"> <ImageView android:id="

How to display progress drawable animation in Chip Material Component?

不想你离开。 提交于 2020-07-22 07:21:06
问题 According to the official Design docs for Action Chips, we are supposed to be able to add a progress state to chips. Sadly, the Development docs don't mention this at all. Has anyone managed to figure out how to achieve the effect shown here? 回答1: It is possible to implement this behavior using the chipIcon attribute and androidx.swiperefreshlayout.widget.CircularProgressDrawable . xml app:chipIconWithProgress="@{viewModel.taskIsStarting ? null : @drawable/ic_play_arrow}" and BindingAdapter