Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use it to view Chips? #60

Open
Shahxad-Akram opened this issue Jun 26, 2018 · 3 comments
Open

How to use it to view Chips? #60

Shahxad-Akram opened this issue Jun 26, 2018 · 3 comments

Comments

@Shahxad-Akram
Copy link

How to use it as a chipsView layout which is uneditable and chips are clickable?

@brunotoffolo
Copy link

brunotoffolo commented Jul 22, 2018

Hi @shahzadakram67,

This is more a workaround than a proper solution, but making the component disabled can do the trick. As the component overrides the styles for spans, even when disabled it does not get that "lighter" color schema and remains with the same colors and opacities as if it was enabled.

Sample code:

NachoTextView nachoTextView = findViewById(R.id.nacho_text_view);
nachoTextView.setEnabled(false);

If you would also like to remove the bottom border of the TextView when it is displayed in the app, just set the background property to @nullin your layout's XML file.

<com.hootsuite.nachos.NachoTextView
   android:id="@+id/nacho_text_view"
   android:layout_width="match_parent"
   android:layout_height="wrap_content"
   android:background="@null" />

Cheers!

@Shahxad-Akram
Copy link
Author

I tried it but then it is not clickable

@guger
Copy link

guger commented Nov 4, 2018

@shahzadakram67 Try to set android:inputType="none" or to use the new Material Design Chips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants