xiaofeng-han / androidlibs Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v3.0
License: GNU General Public License v3.0
Why only Alignment.Left or Alignment.Right? Will Alignment.Center? Thanks for the answer!
Hi, I have tried this in non androidx project, It works fine. But with androidx library. It doesn't work. It is not showing the recyclerview itself. It doesn't give any run time errors but just not show the RecyclerView
Hi,
Just wanted to say that this is a great layout manager with flowlayout, the only thing that is not good is scrolling while updating data set.
Is this something ready to be fixed in the upcoming days ?
Thanks !
Hi,
On the sample app, I tried to tap random elements of the recyclerview as quick as possible, and the app crashes...
I have the same happening on my app with your library implemented. To my side, the error is an ArrayIndexOutOfBoundsException.
Is there a way to fix this issue ? If not, I guess I'll find another library.
Hi everybody ! I really need you all 💃
When I scroll my recyclerview, it constantly scrolls to the top (everytime a new line appears at the bottom).
This bug makes the scrolling not fluid at all. If I can't find a way to fix it, I'll be forced to find another library.
Here is my code :
public class SuggestedTagsAdapter extends RecyclerView.Adapter<SuggestedTagsAdapter.SuggestedTagsViewHolder> {
private Context context;
private List<Tag> data;
public SuggestedTagsAdapter(Context context) {
data = new ArrayList<>();
this.context = context;
}
@Override
public SuggestedTagsViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext())
.inflate(R.layout.item_tag_suggested, parent, false);
return new SuggestedTagsViewHolder(view);
}
@Override
public void onBindViewHolder(SuggestedTagsViewHolder viewHolder, final int position) {
final Tag tag = data.get(position);
viewHolder.setTagText(tag.getName());
}
@Override
public int getItemCount() {
return data.size();
}
public void add(Tag tag) {
this.data.add(tag);
notifyItemInserted(data.size());
}
public void remove(Tag tag) {
int index = data.indexOf(tag);
if(this.data.remove(tag)) notifyItemRemoved(index);
}
public void setData(List<Tag> tags) {
this.data.clear();
this.data.addAll(tags);
notifyDataSetChanged();
}
public List<Tag> getData() {
return data;
}
public Tag get(int position) {
return this.data.get(position);
}
public class SuggestedTagsViewHolder extends RecyclerView.ViewHolder {
TextView tagTv;
SuggestedTagsViewHolder(View itemView) {
super(itemView);
tagTv = (TextView) itemView.findViewById(R.id.item_siggested_tag);
}
private void setTagText(String tagName) {
tagTv.setText(tagName);
}
}
}
I would really appreciate any help.
Thank you !
CHILD ITEM LAYOUT
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/clickableLable"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:background="@drawable/rounded_label_un_selected">
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/label_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:padding="5dp"
android:text="Chennai"
android:textColor="#515151"
android:textSize="14sp"
android:textStyle="normal" />
</LinearLayout>
IN MY ACTIVITY
RecyclerView rv = (RecyclerView) findViewById(R.id.rv);
FlowLayoutManager flowLayoutManager = new FlowLayoutManager();
flowLayoutManager.setAutoMeasureEnabled(true);
rv.setLayoutManager(flowLayoutManager);
Could you, please, be so kind and change the license to Apache 2.0?
The documentation appears to need updating.
I wanted to add OnScrollListener To my RecyclerView and need to know the lastVisibleItemPosition. However unlike other LayoutManagers this method is not defined in in this LayoutManager.
Hi
I cant seem to make it work when my RecycleView is inside a ScrollView no matter what. Am i doing something wrong or that is something this library cant do?
*found out that setting a fixed height on RecycleView it actually works, is any other way to make it work without a fixed height?
I want to use this for min sdk 9 but its give me issue,
how to solve this may i know please.
When the content is large than recyclerview's height, i drag a item to the bottom, then the recyclerview scroll to the top of its rect, leave many space below.
And may be the item margin is ignore。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.