android-chips

Get selected Chips from a ChipGroup

旧城冷巷雨未停 提交于 2020-02-24 17:52:46
问题 I'm new to working with Chips in Android. I want to get the selected Chips from a ChipGroup when I click a button. Made is someway work with checking every Chip and add it to a Set, but want to make it more efficient. Somehow I didn't find an answer to my question myself. There is also an error when I check 2 Chips and uncheck the first one I checked. Here my code: <com.google.android.material.chip.ChipGroup android:id="@+id/chipGroup" android:layout_width="300dp" android:layout_height="wrap

Making a Custom RadioButton

回眸只為那壹抹淺笑 提交于 2020-01-22 02:50:12
问题 I'm trying to make a custom RadioButton like this: I tried making a RadioGroup with three RadioButton in it with the background of the RadioGroup being a rectangle and the background of the RadioButton would be a blue rectangle when checked and white when not but it doesn't seem to be working. <RadioGroup android:id="@+id/Frequency" android:layout_width="370dp" android:layout_height="40dp" android:background="@drawable/radiorectangle" android:orientation="horizontal" app:layout

particular title(fetched from api) using searchview?

瘦欲@ 提交于 2020-01-18 10:48:26
问题 I want something like this---> Required so the thing is, what I exactly want is when user type particular topic name(if present in-app) in searchview it should able give suggestions and if found it should open that topic activity ( just like Facebook, Instagram,...etc searches )..and those title are coming from API(which I have successfully displayed in other activities)..like this--> [enter image description here..what will the logic for it??? need help... Thanks so I have just included

How to set chipText on com.google.android.material.chip.Chip?

二次信任 提交于 2020-01-14 07:51:10
问题 I am investigating the material components provided by implementation group: 'com.google.android.material', name: 'material', version: '1.0.0-alpha3' namely com.google.android.material.chip.Chip Using Android Studio version Android Studio 3.2 Canary 18 Build #AI-181.4892.42.32.4830125, built on June 8, 2018 JRE: 1.8.0_152-release-1136-b04 x86_64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Mac OS X 10.11.6 I created a basic application with this gradle apply plugin: 'com.android

Change Chip Widget style programmatically not working - Android

依然范特西╮ 提交于 2019-12-29 08:31:53
问题 I'm doing a list with Chips. I want this chips can be selected, so, taking a look to https://material.io/develop/android/components/chip/ I see I can have a "Choice Chip". As I need to create and add dynamically I have to configure with specific colors, color ripplem, ... So what I have to configure it is: val chip = Chip(context, null, R.style.CustomChipChoice) chip.isClickable = true chip.isCheckable = true chip.isCheckedIconVisible=false chip.height = ScreenUtils.dpToPx(40) chip

Add FilterChips programmatically in Android

江枫思渺然 提交于 2019-12-24 10:20:04
问题 I am trying to make a Chip Selection which will have multiple choices. In my case I will have choices dynamically so I will have to create chips dynamically. I was successfully able to create it dynamically. But as multi selection needs a property called style="@style/Widget.MaterialComponents.Chip.Filter" I am able to pass this in XML but not in kotlin code. I tried to do like this but didn't succeed: val chip = Chip(chapManager.context, null, android.widget.Filter) It says: Classifier

Chips UI for custom data in Android. (OR) Customizing klinker41/android-chips library to handle custom data (other than EMAIL and CONTACTS)

一笑奈何 提交于 2019-12-23 15:13:23
问题 I want to implement android chips with material look as designed in material chips. The only library that has implemented them this way is https://github.com/klinker41/android-chips. But it handles only Email and Phone contacts. I have list of my own data that has to be searchable and should be shown in chips when selected as same way this library does. Has anybody used https://github.com/klinker41/android-chips library to handle the data other than Email and Phone ? If so, any hints on how

android:unable to make multiline chipgroup

风格不统一 提交于 2019-12-11 08:02:26
问题 I have a chipgroup within a relative layout along with a textview whose code is shown below. <RelativeLayout ... <TextView android:layout_width="30dp" android:layout_height="wrap_content" android:text="TextTitle" android:layout_alignParentStart="true" android:gravity="left" android:layout_marginTop="16dp" android:textColor="@android:color/white" android:textStyle="bold" android:textSize="14sp" android:id="@+id/tv" android:layout_toLeftOf="@id/cg" android:layout_alignBaseline="@id/cg" /> <com

Android - Add Margin for SpannableStringBuilder using ReplacementSpan

时间秒杀一切 提交于 2019-12-09 13:17:45
问题 I'm trying to format Hashtags inside a TextView/EditText (Say like Chips mentioned in the Material Design Specs). I'm able to format the background using ReplacementSpan . But the problem is that I'm not able to increase the line spacing in the TextView/EditText. See the image below The question is how do I add top and bottom margin for the hashtags? Here is the code where I add the background to the text: /** * First draw a rectangle * Then draw text on top */ @Override public void draw

Unity3D - Do we have a plugin or anyone have worked on Tag collection input view, see screenshot

主宰稳场 提交于 2019-12-08 02:04:40
问题 I need a Unity plugin with following features (like Android Chips): User will search the tags from a list and selected item from list will be shown as a tag. Tag will have text with a cross. Mobile device width will be the maximum horizontal space and if its full, next tag will go in next line. 回答1: Note! Before spending too much time on this answer, be sure to check out https://stackoverflow.com/a/38479097/294884 There is no existing good package for this. Butit is fairly easy to do this