idunnololz / animatedexpandablelistview Goto Github PK
View Code? Open in Web Editor NEWAn extendable, flexible ExpandableListView widget that supports animations.
License: Apache License 2.0
An extendable, flexible ExpandableListView widget that supports animations.
License: Apache License 2.0
can you help me remove small arrow in GroupItem . Thank you!
I really want to use this code in a project I am working on, but when I went to include the license, I noticed that the correct fields are not filled out (between the [ ] brackets). Can you fill this out so that I can use the code in my project and not feel bad. 👍
During fast click some group stop expanding or collapsing randomly also returns wrong isGroupExpanded value i.e it is Collapsed but isGroupExpanded() still returns ture. and some time it returns right value but further collapse and Expand operation stuck.
When we were looking for a solution to our design challenge which was "how to we simplify our navigation to a user", I came to the conclusion that animation would provide a means for gradually directing attention in an expandable listView rather than it just popping instantly into place. I tried implementing my own version but decided after some research to use the code in this library -- needless to say it's saved me a LOT of time, and has worked great!
I thought you might be interested in displaying Flow in the README as an example app that uses this library as a main component. We're in the midst of releasing a huge update to the app this week and are publishing a blog post soon citing this library as one that we're using.
Thanks!
-Derek
default when collapse is 0, but i want to collapse to position 1. You can help me?
For example: group 5 have 5 children
Many thanks
Hi! I'd really like to use this view in my project, but I can't import it. What's the advised way to import it? I see the sample is not split from the library itself and I couldn't find any .jar nor a maven artifact name.
expandAndCollapse animation, for closing the last expanded item while simultaneously opening the next. This would allow the accordion UI type: http://jqueryui.com/accordion/
I believe one of your commenters on your blog also requested this. I will work on it in the meantime as I know you are busy, but I'm not sure I understand your library well enough to implement perfectly.
Ideally in long lists, the position of the clicked expanding item would have a sort of scroll lock for the group header while everything else moved, or the expanding header would smooth scroll to the top of the screen if the expanding group is too large to fit on the screen at once.
hi,
everything works fine but when first group item is in expanded state and if i click on last group item,First group item jumps up from its normal position in the screen about 10 Pixels then it comes back to its original position then it collapses.
please check this out once
No issue with last item.
Tested in :
Android 5.0.2
Nexus-6
Is it possible to set this up to show parent, child, and grandchild levels so that when you expand the parent you see all of its children and when you expand any of the children you see all of that child's children records?
Hi,
On two devices (android v 2.3 and 4.0) I'm getting ClassCastExceptions when expanding the AnimatedExpandableListView. I've found a solution by removing the explicit cast to ViewGroup.LayoutParams in getChildView(). Using AbsListView.LayoutParams I get no more crashes.
Edit: I notice you fixed in #7 but can't see the update in the repository
Thanks,
Luke
谁能解决下?
I need that GroupExpand position to top.
where put this below code?
ListView.setSelectionFromTop(groupPosition, 0);
Hello,
There is a way to support SearchView?
Thanks.
Hi, I'm suffering some problem with animation. When I call collapseGroupWithAnimation
, the animation works well. But when I call expandGroupWithAnimation
, the listview just expand immediately, without any animation.
I have downloaded the example and it works well. I also compared my code carefully with the example and still don't understand how could this happened.
Do you have any idea about how this could happens? Thanks a lot, really need helps!
Hi,
I was getting the error mentioned above when trying to use your code. Fixed it by replacing
convertView.setLayoutParams(new ViewGroup.LayoutParams(LayoutParams.MATCH_PARENT, 0));
for
convertView.setLayoutParams(new android.widget.AbsListView.LayoutParams(LayoutParams.MATCH_PARENT, 0));
in the getChildView method. Thanks for the library btw.
When I add a divider space, the top portion of the child background is cut off. The views are fixed when the animation stops.
E/AndroidRuntime(25667): FATAL EXCEPTION: main
E/AndroidRuntime(25667): java.lang.IllegalArgumentException: Cannot draw recycled bitmaps
E/AndroidRuntime(25667): at android.view.GLES20Canvas.drawBitmap(GLES20Canvas.java:778)
E/AndroidRuntime(25667): at android.view.GLES20RecordingCanvas.drawBitmap(GLES20RecordingCanvas.java:117)
E/AndroidRuntime(25667): at android.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:393)
E/AndroidRuntime(25667): at android.widget.ImageView.onDraw(ImageView.java:979)
E/AndroidRuntime(25667): at android.view.View.draw(View.java:13494)
E/AndroidRuntime(25667): at android.view.View.draw(View.java:13378)
E/AndroidRuntime(25667): at android.view.ViewGroup.drawChild(ViewGroup.java:2930)
E/AndroidRuntime(25667): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2799)
E/AndroidRuntime(25667): at android.view.View.draw(View.java:13497)
E/AndroidRuntime(25667): at android.view.View.draw(View.java:13378)
E/AndroidRuntime(25667): at android.view.ViewGroup.drawChild(ViewGroup.java:2930)
E/AndroidRuntime(25667): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2799)
E/AndroidRuntime(25667): at android.view.View.draw(View.java:13376)
E/AndroidRuntime(25667): at android.view.ViewGroup.drawChild(ViewGroup.java:2930)
E/AndroidRuntime(25667): at android.widget.ListView.drawChild(ListView.java:3226)
E/AndroidRuntime(25667): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2799)
E/AndroidRuntime(25667): at android.widget.AbsListView.dispatchDraw(AbsListView.java:2437)
E/AndroidRuntime(25667): at android.widget.ListView.dispatchDraw(ListView.java:3221)
E/AndroidRuntime(25667): at android.widget.ExpandableListView.dispatchDraw(ExpandableListView.java:232)
E/AndroidRuntime(25667): at android.view.View.draw(View.java:13497)
E/AndroidRuntime(25667): at android.widget.AbsListView.draw(AbsListView.java:3770)
E/AndroidRuntime(25667): at dxoptimizer.wz.dispatchDraw(AnimatedExpandableListView.java:526)
E/AndroidRuntime(25667): at android.view.View.draw(View.java:13497)
E/AndroidRuntime(25667): at android.view.View.getDisplayList(View.java:12440)
E/AndroidRuntime(25667): at android.view.View.getDisplayList(View.java:12484)
E/AndroidRuntime(25667): at android.view.View.draw(View.java:13218)
E/AndroidRuntime(25667): at android.view.ViewGroup.drawChild(ViewGroup.java:2930)
E/AndroidRuntime(25667): at android.widget.ListView.drawChild(ListView.java:3226)
E/AndroidRuntime(25667): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2799)
E/AndroidRuntime(25667): at android.widget.AbsListView.dispatchDraw(AbsListView.java:2437)
E/AndroidRuntime(25667): at android.widget.ListView.dispatchDraw(ListView.java:3221)
E/AndroidRuntime(25667): at android.widget.ExpandableListView.dispatchDraw(ExpandableListView.java:232)
E/AndroidRuntime(25667): at android.view.View.draw(View.java:13608)
E/AndroidRuntime(25667): at android.widget.AbsListView.draw(AbsListView.java:3770)
E/AndroidRuntime(25667): at android.view.View.getDisplayList(View.java:12440)
E/AndroidRuntime(25667): at android.view.View.getDisplayList(View.java:12484)
E/AndroidRuntime(25667): at android.view.View.draw(View.java:13218)
E/AndroidRuntime(25667): at android.view.ViewGroup.drawChild(ViewGroup.java:2930)
E/AndroidRuntime(25667): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2799)
E/AndroidRuntime(25667): at android.view.View.getDisplayList(View.java:12438)
E/AndroidRuntime(25667): at android.view.View.getDisplayList(View.java:12484)
E/AndroidRuntime(25667): at android.view.View.draw(View.java:13218)
E/AndroidRuntime(25667): at android.view.ViewGroup.drawChild(ViewGroup.java:2930)
E/AndroidRuntime(25667): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2799)
E/AndroidRuntime(25667): at android.view.View.getDisplayList(View.java:12438)
E/AndroidRuntime(25667): at android.view.View.getDisplayList(View.java:12484)
E/AndroidRuntime(25667): at android.view.View.draw(View.java:13218)
E/AndroidRuntime(25667): at android.view.ViewGroup.drawChild(ViewGroup.java:2930)
E/AndroidRuntime(25667): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2799)
E/AndroidRuntime(25667): at android.view.View.getDisplayList(View.java:12438)
E/AndroidRuntime(25667): at android.view.View.getDisplayList(View.java:12484)
E/AndroidRuntime(25667): at android.view.View.draw(View.java:13218)
E/AndroidRuntime(25667): at android.view.ViewGroup.drawChild(ViewGroup.java:2930)
E/AndroidRuntime(25667): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2799)
E/AndroidRuntime(25667): at android.view.View.getDisplayList(View.java:12438)
E/AndroidRuntime(25667): at android.view.View.getDisplayList(View.java:12484)
E/AndroidRuntime(25667): at android.view.View.draw(View.java:13218)
E/AndroidRuntime(25667): at android.view.ViewGroup.drawChild(ViewGroup.java:2930)
E/AndroidRuntime(25667): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2799)
E/AndroidRuntime(25667): at android.view.View.getDisplayList(View.java:12438)
E/AndroidRuntime(25667): at android.view.View.getDisplayList(View.java:12484)
E/AndroidRuntime(25667): at android.view.View.draw(View.java:13218)
E/AndroidRuntime(25667): at android.view.ViewGroup.drawChild(ViewGroup.java:2930)
E/AndroidRuntime(25667): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2799)
E/AndroidRuntime(25667): at android.view.View.getDisplayList(View.java:12438)
E/AndroidRuntime(25667): at android.view.View.getDisplayList(View.java:12484)
E/AndroidRuntime(25667): at android.view.View.draw(View.java:13218)
E/AndroidRuntime(25667): at android.view.ViewGroup.drawChild(ViewGroup.java:2930)
E/AndroidRuntime(25667): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2799)
E/AndroidRuntime(25667): at android.view.View.getDisplayList(View.java:12438)
E/AndroidRuntime(25667): at android.view.View.getDisplayList(View.jav
When you include a footer view the last group stop responding to listener. Lollipop version works fine but in Jelly Beans it doesn't. And the Footer don't show as well.
I have written an expandable adapter but my childitems aren't showed. Only my groupitem is shown.
I debugged everything and my childs are there in my groupitem.
`package com.projects.wens.kandoeteami.organisation.adapter;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseExpandableListAdapter;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.projects.wens.kandoeteami.R;
import com.projects.wens.kandoeteami.organisation.data.ChildHolder;
import com.projects.wens.kandoeteami.organisation.data.ChildItem;
import com.projects.wens.kandoeteami.organisation.data.GroupHolder;
import com.projects.wens.kandoeteami.organisation.data.GroupItem;
import java.util.List;
/**
Created by senne on 04/03/2016.
*/
public class ExpandableListViewAdapter extends BaseExpandableListAdapter {
private static final String PICASSO_BASEURL = "http://wildfly-teamiip2kdgbe.rhcloud.com/";
private final LayoutInflater inflater;
private List items;
public ExpandableListViewAdapter(Context context){
inflater = LayoutInflater.from(context);
}
public void setData(List items){
this.items = items;
}
@OverRide
public ChildItem getChild(int groupPosition, int childPosition) {
return items.get(groupPosition).getChildren().get(childPosition);
}
@OverRide
public View getGroupView(int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) {
GroupHolder holder;
GroupItem item = getGroup(groupPosition);
if (convertView == null){
holder = new GroupHolder();
convertView = inflater.inflate(R.layout.expandable_list_group, parent, false);
holder.title = (TextView) convertView.findViewById(R.id.expandable_title);
convertView.setTag(holder);
} else {
holder = (GroupHolder) convertView.getTag();
}
holder.title.setText(item.getTitle());
return convertView;
}
@OverRide
public View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent) {
ChildHolder holder;
ChildItem item = getChild(groupPosition, childPosition);
TextView viewVoornaam;
TextView viewActernaam;
TextView viewOrganisator;
if (convertView == null){
holder = new ChildHolder();
convertView = (RelativeLayout)inflater.inflate(R.layout.expandable_list_item, parent, false);
}
viewVoornaam = (TextView) convertView.findViewById(R.id.textVoornaam);
viewActernaam = (TextView) convertView.findViewById(R.id.textAchternaam);
viewOrganisator = (TextView) convertView.findViewById(R.id.textMemberOrganisator);
viewVoornaam.setText(item.getFirstName());
viewActernaam.setText(item.getLastName());
viewOrganisator.setText(item.getRole());
/*if (item.profilePictureUrl.charAt(0) == 'h'){
Picasso.with(convertView.getContext()).load(item.profilePictureUrl).into(holder.profilePicture);
} else{
Picasso.with(convertView.getContext()).load(PICASSO_BASEURL + item.profilePictureUrl).into(holder.profilePicture);
}*/
return convertView;
}
@OverRide
public long getChildId(int groupPosition, int childPosition) {
return childPosition;
}
@OverRide
public int getGroupCount() {
return items.size();
}
@OverRide
public int getChildrenCount(int groupPosition) {
return items.get(groupPosition).children.size();
}
@OverRide
public GroupItem getGroup(int groupPosition) {
return items.get(groupPosition);
}
@OverRide
public long getGroupId(int groupPosition) {
return groupPosition;
}
@OverRide
public boolean hasStableIds() {
return false;
}
@OverRide
public boolean isChildSelectable(int groupPosition, int childPosition) {
return false;
}
}
`
I used this this library in one of my project and although it worked smoothly on Android 4.4, Android 5.0 seems to have some problems dealing with the animation. The "frame rate" is so low you can barely notice it's been animated. I tested on a Nexus 4 running Android 5.0 stock.
hi, i am using this demo, how can i disable the drop down arrow on left side in the List?
Hi @idunnololz ^.^
How can I implement your AnimatedExpandableListView with multiple layout for children ? I looked at your class and the getChildTypeCount() and getChildType(int groupPosition, int childPosition) are final, then how can I override them ?
Repro steps:
I did some exploring, and it looks like the onAnimationEnd for the collapse animation is not getting called some of the time, which causes the listview to not recognize the item as being collapsed. This is very strange, since onAnimationStart is getting called. Very odd. The animation must be getting interrupted somewhere along the way, since when this issue starts occurring, the animation stops as well. My fix for this was to not use animation listeners, since they can apparently be unreliable, but instead, to use postDelayed:
ExpandAnimation ani = new ExpandAnimation(dummyView, info.dummyHeight, 0, info);
ani.setDuration(this.parent.getAnimationDuration());
dummyView.postDelayed(new Runnable() {
@Override
public void run() {
stopAnimation(groupPosition);
listView.collapseGroup(groupPosition);
notifyDataSetChanged();
}
}, this.parent.getAnimationDuration());
dummyView.startAnimation(ani);
But really, that is just a workaround. The real root of the problem is that for whatever reason, after 2 expansions, the last item just refuses to animate again. I hope this is a simple fix, I just couldnt find the cause
Hi @idunnololz .
How to disable icon in group view?
How to add animation to bringing it to the top?
Thanks for sharing this customised expandable list view with us,
I have only one child for each group and I followed the instructions to add the animation to my custom animated expandable list view, but the child of each group is duplicated I don't know why?
I also tried this solution but nothing has changed
#28
Hi,
I am trying to Show only one child of expandable list at a time.
I have written this code for that.. for the visible items it's working fine. But, if i expand second row and again expand 48th row. its crashing.
Please check:
private static int prev = -1;
listView.setOnGroupExpandListener(new OnGroupExpandListener() {
@Override
public void onGroupExpand(int groupPosition) {
if (prev != groupPosition) {
listView.collapseGroupWithAnimation(prev);
}
prev = groupPosition;
}
});
When expanding the last group on Android 4.4, there is no expand animation, the group is opened instantly. The collapse animation for the same group works fine.
Possibly on Ice Cream Sandwich too, because removing the following lines from the expandGroupWithAnimation(int groupPos)
method in AnimatedListViewExample.java
makes it work again:
boolean lastGroup = groupPos == adapter.getGroupCount() - 1;
if (lastGroup && Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
return expandGroup(groupPos, true);
}
I've added:
if (divider != null) ...
in 3 places and it works.
Despite that your animated exp. list view is excellent!
I tried follow the code, in collapseGroupWithAnimation() notifyDatasetChanged() is called, but somehow getChildView is not get callled, someone know what's happening here?
Hi Gary,
(pardon me if this is not the right approach to talk with you but I will not take more than a minute)
Currently we are building a dynamic ExpandableListView for which I need Spinner in every child item. The problem I am facing is every time when I click the spinner value, it is becoming difficult to identify which child item was clicked for that particular spinner value.
Can you advice something here ?
Demo
If the child item view is too big, it will disappear when the animation (expand or collapse) is in processing and appear after that
When clicking on group I got NPE.
Here is my code:
Fragment: https://github.com/magx2/transport/blob/b196696221e5b10f9fda59eff216a00cc356aa19/android-Transport/transport/src/main/java/pl/grzeslowski/transport/fragments/ResultFragment.java
Adapter: https://github.com/magx2/transport/blob/b196696221e5b10f9fda59eff216a00cc356aa19/android-Transport/transport/src/main/java/pl/grzeslowski/transport/adapters/ResultListAdapter.java
Here is my stack trace:
java.lang.NullPointerException
at android.widget.TextView.makeNewLayout(TextView.java:6113)
at android.widget.TextView.onMeasure(TextView.java:6389)
at android.view.View.measure(View.java:16497)
at com.idunnololz.widgets.a.getChildView(Unknown Source)
at android.widget.ExpandableListConnector.getView(ExpandableListConnector.java:451)
at android.widget.AbsListView.obtainView(AbsListView.java:2263)
at android.widget.ListView.makeAndAddView(ListView.java:1790)
at android.widget.ListView.fillDown(ListView.java:691)
at android.widget.ListView.fillSpecific(ListView.java:1349)
at android.widget.ListView.layoutChildren(ListView.java:1608)
at android.widget.AbsListView.onLayout(AbsListView.java:2091)
at android.view.View.layout(View.java:14817)
at android.view.ViewGroup.layout(ViewGroup.java:4631)
at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1055)
at android.view.View.layout(View.java:14817)
at android.view.ViewGroup.layout(ViewGroup.java:4631)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
at android.view.View.layout(View.java:14817)
at android.view.ViewGroup.layout(ViewGroup.java:4631)
at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1055)
at android.view.View.layout(View.java:14817)
at android.view.ViewGroup.layout(ViewGroup.java:4631)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
at android.view.View.layout(View.java:14817)
at android.view.ViewGroup.layout(ViewGroup.java:4631)
at com.android.internal.widget.ActionBarOverlayLayout.onLayout(ActionBarOverlayLayout.java:374)
at android.view.View.layout(View.java:14817)
at android.view.ViewGroup.layout(ViewGroup.java:4631)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
at android.view.View.layout(View.java:14817)
at android.view.ViewGroup.layout(ViewGroup.java:4631)
at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:1987)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1744)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1000)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5670)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761)
at android.view.Choreographer.doCallbacks(Choreographer.java:574)
at android.view.Choreographer.doFrame(Choreographer.java:544)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
So, I have the AnimatedExpandableListView inside a LinearLayout. When the last header is at the very bottom and there's nothing below it it doesn't increase the height of the LinearLayout. The arrow says it is collapsed (and in thruth it is, we just can't see the items).
The behaviour is seen below:
Thanks
HI ,great library can anyone please tell me how can i collapse other view with animatioin when i expand one view
Can you tall me, who i change the color of the GroupItem and the color of the ListDivider?
Thanks
great library ,but can you please tell me how can i use checkbox inside the child view. the problem is when i click on the group item the checkboxes get disselected .
Example:
In your code, if i change the populate from 100 to 5, collapse animation get slowed for what reason?
Edit: Wait... I don't know why (yet) but only happens if my context it's a FragmentActivity.
Note: With 100 works well, with 5 groups it collapse slowly..
Can you help me on how to change the group indicator using images from drawable folder? Like the arrow that goes up and down when the group is expanding or collapsing but I want to change it with other images. Thanks in advance.
On Nexus 4 (Android 4.4.4) all work well, but on (Android 4.1.1) after lick on group item, application crashed with stacktrace:
FATAL EXCEPTION: main
java.lang.NullPointerException
at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:495)
at android.view.View.measure(View.java:15172)
at com.idunnololz.widgets.AnimatedExpandableListView$AnimatedExpandableListAdapter.getChildView(AnimatedExpandableListView.java:386)
at android.widget.ExpandableListConnector.getView(ExpandableListConnector.java:451)
at android.widget.AbsListView.obtainView(AbsListView.java:2267)
at android.widget.ListView.makeAndAddView(ListView.java:1769)
at android.widget.ListView.fillDown(ListView.java:672)
at android.widget.ListView.fillSpecific(ListView.java:1330)
at android.widget.ListView.layoutChildren(ListView.java:1600)
at android.widget.AbsListView.onLayout(AbsListView.java:2102)
at android.view.View.layout(View.java:13754)
at android.view.ViewGroup.layout(ViewGroup.java:4362)
at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
at android.view.View.layout(View.java:13754)
at android.view.ViewGroup.layout(ViewGroup.java:4362)
at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
at android.view.View.layout(View.java:13754)
at android.view.ViewGroup.layout(ViewGroup.java:4362)
at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
at android.view.View.layout(View.java:13754)
at android.view.ViewGroup.layout(ViewGroup.java:4362)
at android.widget.RelativeLayout.onLayout(RelativeLayout.java:948)
at android.view.View.layout(View.java:13754)
at android.view.ViewGroup.layout(ViewGroup.java:4362)
at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
at android.view.View.layout(View.java:13754)
at android.view.ViewGroup.layout(ViewGroup.java:4362)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1649)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1507)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1420)
at android.view.View.layout(View.java:13754)
at android.view.ViewGroup.layout(ViewGroup.java:4362)
at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
at android.view.View.layout(View.java:13754)
at android.view.ViewGroup.layout(ViewGroup.java:4362)
at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:1866)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1687)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:998)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4212)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
at android.view.Choreographer.doCallbacks(Choreographer.java:555)
at android.view.Choreographer.doFrame(Choreographer.java:525)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4745)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
Hello,
I ran into a bad issue when I used your library to create an expandable listview with lazy-loaded imageViews as group views. It turned up that each time a group is opened, all the group view are redrawn but they are given a random convertView (and not theirs), which causes pretty bad blinkings as the previous imageViews are delivered randomely to the wrong groups. You can experience this issue in your own example by setting a delayed TextView update for your groups
in public View getGroupView (MainActivity ln 194)
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
holder.title.setText(item.title);
}
}, 1000);
Is it caused by your wrapper class, or is it an inherent issue of the ExpandableListView?
Thank you in advance,
Hey,
I am trying to use youro annimated expandable list view in my app but I'm having some issues.
I have imported the library and this is my xml code:
<com.example.animatedexpandablelistview.AnimatedExpandableListView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/orderList"
android:groupIndicator="@color/transparent"
android:padding="10dp" />
and then I'm setting an adapter like I would do for a normal expandable list view. But it throws an exception saying that the class com.example.animatedexpandablelistview.AnimatedExpandableListView wasn't found.
Any help would be appreciated. :)
Hi. I'm trying to add header and footer dividers by
expLv.setHeaderDividersEnabled(true);
expLv.setFooterDividersEnabled(true);
expLv.addFooterView(new View(expLv.getContext()));
expLv.addHeaderView(new View(expLv.getContext()));
The dividers are displayed during the expand animation but disappear after the animation has finished. Tried with and without adding footer/header views. Any thoughts?
It would be awesome if the list scrolled down a bit when expanding the last visible group, or a group close to the bottom of the listView (not the list itself). I was thinking about making the list scroll enough to make the top of the clicked group match the top of the list, or in case the list does not have enough elements below the clicked group to align it to the top, simply scroll down until the entire group is visible.
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.