Comments (18)
Can you provide the code that provoque this bug ? I think that this is because the ChipView
label is probably null.
from materialchipsinput.
from materialchipsinput.
You're right. I fixed the bug and pushed it in v1.0.3.
Telle me if it works.
from materialchipsinput.
Yes it's fixed but now the letter icon is not coming when creating chips programmatically. The place where the letter icon should come is blank.
from materialchipsinput.
I can't reproduce the bug. You're sure the label is not null when trying to create the letter icon ?
from materialchipsinput.
Yes the label is not null, because if the label would have been null then the text inside the chip shouldn't come right?
from materialchipsinput.
I am attaching the screenshot it may help you.
I am adding this chip programatically using
chip.addChip()
from materialchipsinput.
I noticed that when adding chips using java, there is a NonNull Annotation in avatarIcon. My icon uri is null but I need the letter icon. So the error might be in the function addChip which is not accepting null avatarUri
from materialchipsinput.
Yeah ok I will investigate this. Maybe I would be able to fix this only tomorrow, I'm sorry.
Thanks for your return and I'll tell you when this will be fixed
from materialchipsinput.
Ya no problem, I am also experimenting on your sample project and if I get something il post it here.
from materialchipsinput.
Modify these lines in your sample project which will help you recreate the bug.
ChipExampleActivity.java
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_chip_examples);
// butter knife
ButterKnife.bind(this);
LinearLayout linearLayout=(LinearLayout)findViewById(R.id.abc);
ChipView chip=new ChipView(this);
chip.setLabel("Pritesh");
chip.setPadding(2,2,2,2);
chip.setHasAvatarIcon(true);
linearLayout.addView(chip);
// chip 1
mChip1.setOnChipClicked(view -> {
Toast.makeText(ChipExamplesActivity.this, mChip1.getLabel() + ": clicked", Toast.LENGTH_SHORT).show();
});
activity_chip_Example.xml
`
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp">
<!-- first line -->
<LinearLayout
android:id="@+id/abc"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.pchmn.materialchips.ChipView
android:id="@+id/chip2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="16dp"
app:label="Chip 1"
app:hasAvatarIcon="false"
app:deletable="false"/>
`
Just compare whith your code and make the changes to see the bug.
from materialchipsinput.
So I tested as you taught me, but it works, I don't have your bug. A screenshot :
from materialchipsinput.
from materialchipsinput.
I added the chip with java :
ChipView chipView1 = new ChipView(this);
chipView1.setLabel("Pritesh");
chipView1.setPadding(2,2,2,2);
chipView1 .setHasAvatarIcon(true);
mLayout.addView(chipView1);
from materialchipsinput.
from materialchipsinput.
The problem is still there ?
from materialchipsinput.
The problem was still there. I am trying to debug the code and find the problem and notifying you soon.
from materialchipsinput.
Okay bro thanx the latest version has solved. Thanks alot
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.