Comments (21)
ChipInput inside scrollview/nested scrollview doesn't working. If anyone has solution. Please share it.
from materialchipsinput.
I don't understand very well what's not working.
When you use maxRows
like this, it is not working ?
<com.pchmn.materialchips.ChipsInput
android:id="@+id/chips_input"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:hint="Enter a name"
app:maxRows="3" />
Because if you look at the sample app, the maxRows
attribute is successfully used.
from materialchipsinput.
The bug occurred just by using the ChipsInput
view in a ScrollView
in your xml layout ?
Can you provide the code that is responsible of the bug ? To reproduce it.
from materialchipsinput.
yes it only occurs when we are in Scrollview i changed my layout now its ok. but back button on key board don't remove last chip please help me.
from materialchipsinput.
@chnouman its in the docs
chipsInput.addChip(ChipInterface chip);
// or
chipsInput.addChip(Object id, Drawable icon, String label, String info);
// or
chipsInput.addChip(Drawable icon, String label, String info);
// or
chipsInput.addChip(Object id, Uri iconUri, String label, String info);
// or
chipsInput.addChip(Uri iconUri, String label, String info);
// or
chipsInput.addChip(String label, String info);
from materialchipsinput.
wrap it in a scrollview?
from materialchipsinput.
sorry actually i was in scrollview in scrollview maxRows property was not working.
from materialchipsinput.
yes @MoeHamoud it was in scrollview.
from materialchipsinput.
@MoeHamoud @pchmn still back button is not working when i try to remove last chip from chips.
from materialchipsinput.
I will test it and try to reproduce the bug.
I will return to you when I found a fix
from materialchipsinput.
ok
from materialchipsinput.
Hy can you please tell me how to add chip automatically or programmatcaly without selecting from drop down list.
from materialchipsinput.
@chnouman I'm not sure you even need this library for such functionality.
I've done this before and if what you want is what I think it is then this is how I would go about it.
- Create a layout file (call it,
textview_chip.xml
, for example) with aFrameLayout
as the root element and aTextView
inside it - Style the
TextView
or even theFrameLayout
so it looks like a chip. I'm not going to go into detail about this but there are resources out there to help you by using an xml drawable and setting it as the background of theTextView
orFrameLayout
- You could then create a customView group (call it,
CustomChipView
for example) that extendsFrameLayout
and inflate thetextview_chip.xml
- From there, you can write public functions inside the
CustomChipView
, for instance,setChipText()
,setChipAvatar()
, etc. Depending on what data you want to present to the user - You could then instantiate your
CustomChipView
and use, for example,linearLayout.addView(CustomChipView)
to add it to your layout programmatically. You could then set anonClick listener
on theCustomChipView
which would remove it from thelinearLayout
.
This is one way that I've "faked" chips.
You can also use the same approach inside a recyclerView
. You wouldn't need to create a customView group to inflate the textview_chip.xml
layout but you would just inflate it inside the recyclerView's adapter.
Just another option for you, maybe someone else can help you in terms of using this library to achieve the functionality you're after.
from materialchipsinput.
hy sorry i was unable to clearly explain my problem actually the problem is in my scenario the user go to contacts activity and mark some contacts and say ok and come back to parent activity now on parent activity i want to put all those selected contacts in chips.
from materialchipsinput.
Well you need to store the selected contacts in a list and then pass it back to the parent activity. From there, loop through your list of contacts and add them as chips to your view.
See: https://stackoverflow.com/questions/11340776/passing-a-list-from-one-activity-to-another
from materialchipsinput.
@MoeHamoud let me know how to add chips to my view thank you.
from materialchipsinput.
Thank you dear
from materialchipsinput.
inside scrollview, i am using chipInput ,its working perfectly but when i scroll the layout from from top, its not scrolling, what should i do for that.
from materialchipsinput.
can anyone fixed my problem, it will highly appreciated.
from materialchipsinput.
ChipInput not working in scroll view , chips adapter not show
from materialchipsinput.
You can clear focus from chip_input listening scroll status of scrollView:
scrollView.getViewTreeObserver().addOnScrollChangedListener(new OnScrollChangedListener() {
@OverRide
public void onScrollChanged() {
chipsInput.clearFocus();
}
});
This clear focus and you can scrolling
from materialchipsinput.
Related Issues (20)
- Add chip manually when enter is pressed on keyboard HOT 3
- Could not resolve com.github.pchmn:MaterialChipsInput:1.0.8 HOT 4
- Disable Cusror
- setOnFocusChangeListener not triggering
- Filtering
- Increasing ChipInput height not work
- Preselecting chips
- It's possible change hint font family? HOT 1
- AndroidX Compatibility HOT 1
- ScrollView can host only one direct child at com.pchmn.materialchips.views.FilterableListView$1.onGlobalLayout(FilterableListView.java:94)
- List suggest cannot open when i type some word
- how to change the direction of the list
- Some suggestions
- add max chips HOT 1
- Search doesnt work in AlertDialog
- White pixels at left right sides of chip at dark backgrounds HOT 1
- Set selected items programmatically.
- Latest version (v1.0.8) is getting an error in Jitpack HOT 2
- Failed to resolve com.beloo.widget:ChipsLayoutManager dependency HOT 4
- Typo error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from materialchipsinput.