udinic / smallexamples Goto Github PK
View Code? Open in Web Editor NEWA collection of small examples from my blog
Home Page: http://www.udinic.com
A collection of small examples from my blog
Home Page: http://www.udinic.com
Hello Udinic,
Thanks a lot for your OpenSource contributions :-). I have been dealing with the ExpandAnimation, and it seems that the animation is not smooth the first execution (but completely fine on the subsequent ones). Is this a known issue?
Step to reproduce
@Override
public View getView(int position, View convertView, ViewGroup parent) {
if (convertView == null) {
convertView = getLayoutInflater().inflate(R.layout.list_item, null);
}
((TextView)convertView.findViewById(R.id.title)).setText(getItem(position));
// Resets the toolbar to be closed
View toolbar = convertView.findViewById(R.id.toolbar);
((LinearLayout.LayoutParams) toolbar.getLayoutParams()).bottomMargin = -50;
toolbar.setVisibility(View.GONE);
return convertView;
}
I guess this is cause by View re-using. However, if we remove the code
toolbar.setVisibility(View.GONE);
We will encounter another set of problem
Could you make a simple image preference please?
When you double tap a Item (for example, you pressed Item 1 but wanted to hit 2, so you click it immediately again to close) it destroys something.
After a double click, when you hit the item again it opens but closes immediately and won't open properly again.
Hey,
i've run into a problem by developing a list with expandable children. Each parent has a different amount of children, so that I use a ListView in the "toolbar"-layout and fill it dynamically with data in an adapter.
Now when I expand a group everything works fine, but when I try to collapse, it seems as if the parent item looses his clicklistener, because no click is detected. The child list view doesn't have an itemclicklistener yet, so it couldn't be intercepted by it...
Do you have an idea?
If your list is long enough, and you expand one item (the first item, for instance), and then you scroll it down, at some point another item will appear expanded too.
Note that I am not forcing the items to be either expanded or collapsed, because I want to preserve their states when I scroll.
Since the viewholder
can be reused, it needs to know whether the cell should be expanded or collapsed.
Does anyone know how to solve this?
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.