Git Product home page Git Product logo

android-slideexpandablelistview's Introduction

SlideExpandableListView for Android

Screenshot

Not happy with the Android ExpandableListView android offers? Want something like the Spotify app. This library allows you to have custom listview in wich each list item has an area that will slide-out once the users clicks on a certain button.

Features

  • Provides a better ExpandableListView usable for normal ListView's
  • Animates by default
  • Easy to use

Repository at https://github.com/tjerkw/Android-SlideExpandableListView/.

Usage

Layout

Use a normal list view in your layout. You may also use a ListActivity or ListFragment

<ListView
    android:id="@+id/list"
    android:layout_height="fill_parent"
    android:layout_width="fill_parent" />

The list item view should have a toggle button (Button view), and a target view that will be expanded. By default the expandable view will be hidden. An when a user clicks the toggle button the expandalbe view will slide out and be visible.

For example here below we have R.id.expandable_toggle_button Button view. And a R.id.expandable LinearLayout which will be expanded. Note that the expandable view does not have to be a LinearLayout, it can be any subclass of View.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:orientation="vertical">
	<RelativeLayout
			android:layout_width="fill_parent"
			android:layout_height="wrap_content"
			android:orientation="horizontal">

		<TextView
				android:layout_width="fill_parent"
				android:layout_height="fill_parent"
				android:id="@+id/text"
				android:text="Hello World"/>

		<!-- this is the button that will trigger sliding of the expandable view -->
		<Button
				android:id="@+id/expandable_toggle_button"
				android:text="More"
				android:layout_width="wrap_content"
				android:layout_height="wrap_content"
				android:layout_alignBottom="@+id/text"
				android:layout_alignParentRight="true"
				android:layout_alignTop="@id/text"/>

	</RelativeLayout>

	<!-- this is the expandable view that is initially hidden and will slide out when the more button is pressed -->
	<LinearLayout
			android:layout_width="fill_parent"
			android:layout_height="fill_parent"
			android:orientation="horizontal"
			android:id="@+id/expandable"
			android:background="#000000">

		<!-- put whatever you want in the expandable view -->
		<Button
				android:layout_width="fill_parent"
				android:layout_height="fill_parent"
				android:layout_weight="0.5"
				android:text="Action A" />

		<Button
				android:id="@+id/details"
				android:layout_width="fill_parent"
				android:layout_height="fill_parent"
				android:layout_weight="0.5"
				android:text="Action B"/>

	</LinearLayout>
</LinearLayout>

Wrap your ListAdapter

In order to provide the functionality you simply wrap your list adapter in a SlideExpandableListAdapter. The adapter gets the ids to the more button, and the expandable view as parameters. This allows the adapter to find those views.

		ListView list = ... your list view
		ListAdapter adapter = ... your list adapter
		// now simply wrap the adapter
		// and indicate the ids of your toggle button
		// and expandable view
		list.setAdapter(
			new SlideExpandableListAdapter(
				adapter,
				R.id.expandable_toggle_button,
				R.id.expandable
			)
		);

Use the SlideExpandableListView or ActionSlideExpandableListView

In order to simplify the usage of this library, you can also use the mentioned ListViews directly in your layout xml file. The view itself will make sure the ListAdapter is wrapped in a SlideExpandableListAdapter.

See the sample app for usage information.

Including In Your Project

Add the library as a gradle dependency to your project.

Pull Requests

If you have any contributions I am gladly to review them and use them if they make sense.

Changelog

v1.1.0

  • Added ActionSlideExpandableListView for easier event listening, see the sample app
  • Updated the sample app to also contain event handling logic (Solved issue #3)
  • Solved the issue with random views being expanded, due to recycling of views was not properly handled
  • Solved more issues #1 #2

v1.0.0

  • First release!

Acknowledgments

License

Licensed under the Apache License, Version 2.0

githalytics.com alpha

android-slideexpandablelistview's People

Contributors

grivos avatar guicamest avatar jelgh avatar jessefarebro avatar naddaf avatar passsy avatar reisub avatar tjerkw avatar yccheok avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-slideexpandablelistview's Issues

Attribute "mode" has already been defined

It seems that the use of "mode" attribute (inside attrs.xml) is already prevalent with other libraries. Please have the use of the attribute updated with a different name space, or have it removed if not really utilized. Thanks.

Null Pointer at line 298 in AbstractSlideExpandableListAdapter.writeBitSet

Hi,
sometimes I got a null pointer exception at line 298 in AbstractSlideExpandableListAdapter.writeBitSet, immediately after rotating or waking up from sleep mode.

Here is the stacktrace:

java.lang.RuntimeException: Unable to start activity ComponentInfo{....ContainerActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
at android.app.ActivityThread.access$600(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5041)
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:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at com.tjerkw.slideexpandable.library.AbstractSlideExpandableListAdapter.writeBitSet(AbstractSlideExpandableListAdapter.java:298)
at com.tjerkw.slideexpandable.library.AbstractSlideExpandableListAdapter.access$0(AbstractSlideExpandableListAdapter.java:295)
at com.tjerkw.slideexpandable.library.AbstractSlideExpandableListAdapter$SavedState.<init>(AbstractSlideExpandableListAdapter.java:319)
at com.tjerkw.slideexpandable.library.AbstractSlideExpandableListAdapter$SavedState.<init>(AbstractSlideExpandableListAdapter.java:316)
at com.tjerkw.slideexpandable.library.AbstractSlideExpandableListAdapter$SavedState$1.createFromParcel(AbstractSlideExpandableListAdapter.java:333)
at com.tjerkw.slideexpandable.library.AbstractSlideExpandableListAdapter$SavedState$1.createFromParcel(AbstractSlideExpandableListAdapter.java:1)
at android.os.Parcel.readParcelable(Parcel.java:2103)
at android.os.Parcel.readValue(Parcel.java:1965)
at android.os.Parcel.readSparseArrayInternal(Parcel.java:2255)
at android.os.Parcel.readSparseArray(Parcel.java:1687)
at android.os.Parcel.readValue(Parcel.java:2022)
at android.os.Parcel.readMapInternal(Parcel.java:2226)
at android.os.Bundle.unparcel(Bundle.java:223)
at android.os.Bundle.getSparseParcelableArray(Bundle.java:1240)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:845)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1088)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1070)
at android.support.v4.app.FragmentManagerImpl.dispatchCreate(FragmentManager.java:1856)
at android.support.v4.app.FragmentActivity.onCreate(FragmentActivity.java:210)
at com.github.rtyley.android.sherlock.roboguice.activity.RoboSherlockFragmentActivity.onCreate(RoboSherlockFragmentActivity.java:34)
at ......ContainerActivity.onCreate(ContainerActivity.java:90)
at android.app.Activity.performCreate(Activity.java:5104)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
... 11 more
java.lang.NullPointerException
at com.tjerkw.slideexpandable.library.AbstractSlideExpandableListAdapter.writeBitSet(AbstractSlideExpandableListAdapter.java:298)
at com.tjerkw.slideexpandable.library.AbstractSlideExpandableListAdapter.access$0(AbstractSlideExpandableListAdapter.java:295)
at com.tjerkw.slideexpandable.library.AbstractSlideExpandableListAdapter$SavedState.<init>(AbstractSlideExpandableListAdapter.java:319)
at com.tjerkw.slideexpandable.library.AbstractSlideExpandableListAdapter$SavedState.<init>(AbstractSlideExpandableListAdapter.java:316)
at com.tjerkw.slideexpandable.library.AbstractSlideExpandableListAdapter$SavedState$1.createFromParcel(AbstractSlideExpandableListAdapter.java:333)
at com.tjerkw.slideexpandable.library.AbstractSlideExpandableListAdapter$SavedState$1.createFromParcel(AbstractSlideExpandableListAdapter.java:1)
at android.os.Parcel.readParcelable(Parcel.java:2103)
at android.os.Parcel.readValue(Parcel.java:1965)
at android.os.Parcel.readSparseArrayInternal(Parcel.java:2255)
at android.os.Parcel.readSparseArray(Parcel.java:1687)
at android.os.Parcel.readValue(Parcel.java:2022)
at android.os.Parcel.readMapInternal(Parcel.java:2226)
at android.os.Bundle.unparcel(Bundle.java:223)
at android.os.Bundle.getSparseParcelableArray(Bundle.java:1240)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:845)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1088)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1070)
at android.support.v4.app.FragmentManagerImpl.dispatchCreate(FragmentManager.java:1856)
at android.support.v4.app.FragmentActivity.onCreate(FragmentActivity.java:210)
at com.github.rtyley.android.sherlock.roboguice.activity.RoboSherlockFragmentActivity.onCreate(RoboSherlockFragmentActivity.java:34)
at .....ContainerActivity.onCreate(ContainerActivity.java:90)
at android.app.Activity.performCreate(Activity.java:5104)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
at android.app.ActivityThread.access$600(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5041)
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:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
at dalvik.system.NativeStart.main(Native Method)

Expandable View layout_height must be fixed.

This does not function when using wrap_content for the layout_height of the collapsable view. The animator cannot get a proper value for mEndHeight because the view has not been laid out yet.

ActionSlideExpandableListView.OnActionClickListener method name

Hello,

The Listview works great. Thanks!

May you please change the onClick method name? I let my Fragment implement the listener. But I think an onClick method in a Fragments isn't nice to read. My first suggestion was "onClick? ... onClick WHAT?"

Something like onExpandableItemClick or so would be nicer.

Pascal

ExpandCollapseAnimation should be using ObjectAnimator.ofFloat

It seems that the ExpandCollapseAnimation is performing iterative calculations on the bottom margin each time it animates, which makes the animation of the expandable layout jittery. Please use ObjectAnimator.ofFloat instead so that the animation will be smooth. Thanks.

Null pointer exception while using library in a fragment.

This is my ListVew xml f_list.xml:

    <com.tjerkw.slideexpandable.library.ActionSlideExpandableListView
        android:id="@+id/fListView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true" 
        android:listSelector = "@drawable/card_bg" /> 

This is my fragment:

@ContentView(R.layout.f_list)
public class Home extends SherlockFragment{

@InjectView(R.id.fListView) ActionSlideExpandableListView linkCardView;
 public View view;
 FAdapter iList;
 public  ArrayList<Link> links = new ArrayList<Link>();
 LinkDataHandler linkReadHandler;
 LinkDataHandler linkWriteHandler;
 private static final String KEY_POSITION="position";
 //ActionSlideExpandableListView listView;

 static Home newInstance(int position) {
        Home frag=new Home();
        Bundle args=new Bundle();

        args.putInt(KEY_POSITION, position);
        frag.setArguments(args);

        return(frag);
      }


 @Override
  public View onCreateView(LayoutInflater inflater, 
                 ViewGroup container, Bundle savedInstanceState){



     TabActivity.currentFragment = "HOME";


     linkReadHandler = new LinkDataHandler(getActivity());
     linkWriteHandler = new LinkDataHandler(getActivity());
     view = inflater.inflate(R.layout.f_list, container, false);


  for(int i = 0;i<5;i++){
      Link link = new Link();
      link.title= "haha";
      link.url = "hoho";
      links.add(link);
     }
    fList = new FAdapter(getActivity(),R.layout.f_list,links, getActivity());
    linkCardView.setAdapter(fList);


    return view;   
  }    

I get a null pointer exception while doing inkCardView.setAdapter(fList);

Any place where I'm going wrong?

Change the clickable button to a clickable view

Currently, the SlideExpandableListAdapter requires a Button to be passed in with the constructor. This Button objects is the object that toggles the expand/collapse animation. This could be a modified to accept a View object instead so that I can make any thing in my list item toggle the animation. I've tried replacing all the Buttons with Views and it works.

10-25 22:28:58.742: E/AndroidRuntime(28238): java.lang.NoClassDefFoundError: com.tjerkw.slideexpandable.library.R$id

Hello,

First thanks for this great initiative, i love this project which replaces a kind of fresh feel to elv, But i get this error while running the project, ?

10-25 22:28:58.742: E/AndroidRuntime(28238): java.lang.NoClassDefFoundError: com.tjerkw.slideexpandable.library.R$id

i have included the necessary api and even support library (latest version)
please help me in resolving this strange error,

Does not expand for large views

I'm inflating different row layouts for each ListView item, and each inflated layout has multiple TextViews in the hidden/expandable part
The ListView items that have 5-6 TextViews expand fine, but those that have around 12-13 TextViews do not expand. Triggering them collapses the previously expanded view, but that's it

Any way to work around this?

Where do you get the reference to "expandable" in the list item view in your sample?

I came across this and think it would be perfect for an app I'm using, with one exception. Ive got a listview, that will contain crossfit moves. The drop down expandable would then contain either a layout for entering Time, Weight, Reps, Time+weight, Time+reps, or weight + reps, based on a value called "type" in my database.

I figure I could expand on your example code, but just defining each layout in your sample row, but make them Visibility.GONE, and then have the drop down change the visibility based on the "Type" value fed in from my adapter...but I don't see where you reference the layout called "expandable", so I can't figure out how to add something like "expandable1, expandable2, expandable3", etc.

the idea being if type =1, show expandable1, if 2, expandable2, etc.

Any ideas?

Crashes if Adapter.getViewTypeCount() > 1

I have the following adapter:
BrowseAdapter extends BaseAdapter implements ListAdapter
My BrowseAdapter has views of multiple types- BrowseAdapter.getViewTypeCount() > 1. This causes library to crash. Can you please fix?

Derived class did not call super.onsaveinstancestate() - SlideExpandableListView

I was using an ActionSlideExpandableListView in a fragment and when replacing this fragment, before the adapter to the ListView was set, I had the above Exception thrown.

I fixed the issue by changing the onSaveInstanceState() function in SlideExpandableListView to :

@Override
public Parcelable onSaveInstanceState() {
    if ( adapter != null )
    {
        return adapter.onSaveInstanceState(super.onSaveInstanceState());
    }
    else
    {
        return super.onSaveInstanceState();
    }
}

where it used to say "return null" in the else case. This fixed the issue for me

new request

Can you add new features?
When the last item in the list is expended, is it possiable that smoothly scroll up some distance, in order to let expandable area visible.

Thanks

how to properly call method collapseLastOpen() ?

when I call method collapseLastOpen() method when i click the item and start another activity,after come back,I come across this phenomenon?Can you give me some advice or give me a hand,thx very much
list_item

It is impossible to change the toggle button id without chaning your code

I want to use your lib, I just have the problem that I don't want to use that more button. Instead I just want to click on the element itself. So far no problem, if I could change the button id in SlideExpandableListAdapter.
By the way is it really nessesary to wraper the Adapter so often? If I reviewed your code correctly you wrap it up about three times.

As workaround I added this method:

public void setAdapter(ListAdapter adapter, int toggle_button_id, int expandable_view_id) {
    this.adapter = new SlideExpandableListAdapter(adapter, toggle_button_id, expandable_view_id);
    super.setAdapter(this.adapter);
}

Items with expandable View and Items without

Hi,
I need to implement a list view, for few items with expander, and other without expander, and finally trap directly setOnItemClickListener for all items without expander.

how can I do it ?

State should be reset when dataset is invalidated or changed.

@grivos found a problem when datasets are reloaded or invalidated:

However, There is a problem if the data set is changed and the current state is invalid.
You might want to make WrapperListAdapterImpl extend BaseAdapter, and then in AbstractSlideExpandableListAdapter - override notifyDataSetChanged() and reset the state there.

(we found this ins issue #2, which is closed now)

Does not Expand the bottom item if the top item is removed form the adapter.

listView = (ActionSlideExpandableListView) getListView();
...
listView.setAdapter(mAdapter);

mAdapter.remove(position);
mAdapter.notifyDataSetChanged();

Remove method in adapter
remove(int position) {
collectionData.remove(position);
}

and i am using this
https://github.com/romannurik/android-swipetodismiss

cool the item is removed, but when you click the item below it does not expand
i guess in adapter the data is gone but in listview position still persist, how do i update position in listview ??

Keep the open state on rotation

Hi there! This a problem that came up for me while trying out this nice bit of library. I need the item I expanded to stay open through rotation. This feature would be massively useful!

EditText doesn't working in expandable layout

Hello,

I'm trying to put an EditText view to the expandable layout.
It's display correctly, but when I tap to write text, than the box loose the focus and the virtual keyboard stay on the screen (but not write the tapped characters to the eddittext).
In landscape mode it's working, so I thing something measure problem cause this.

I tried with your sample, so don't modify nothing.

Sry my bad english :)

bg,
Larten

More advance sample application.

Hi!
Planing to use this library for my new app, and it feels like when i look at the sample application that it is a little "thin". For those who is like me, not pros, it could really help if you added some functionality to the sample so you can see how it work and how you should use it.

I my selves have problem understanding how I can set click listeners on the buttons that is being slide down when you press the "slide down button" or how i should to to update a textview in the slidedown area. Also is it possible to set click listener on the actual "slide down button"?

Thank you!

On open, the expandable part jumps open to full before animating

On pressing the expandable handle, the expandable section jumps open without animation, and immediately afterwards it animates open.

I am using it as follows:

    mainListView = (DragSortListView) root.findViewById(R.id.main_listview);

        mainListView.setAdapter(
                new SlideExpandableListAdapter(
                        ((MainActivity)getActivity()).myNinjaAdapter,
                        R.id.expandable_toggle_button,
                        R.id.expandable
                )
        );

Any help would be greatly appreciated.

Why refresh 3 times AbstractSlideExpandableListAdapter‘s getView

public View getView(int position, View view, ViewGroup viewGroup) {
        view = wrapped.getView(position, view, viewGroup);
        enableFor(view, position);
        Log.v(TAG, "getView" + position);
        return view;
    }

Log

05-13 18:24:03.092: V/AbstractSlideExpandableListAdapter(21527): getView0
05-13 18:24:03.092: V/AbstractSlideExpandableListAdapter(21527): getView1
05-13 18:24:03.092: V/AbstractSlideExpandableListAdapter(21527): getView2
05-13 18:24:03.102: V/AbstractSlideExpandableListAdapter(21527): getView3
05-13 18:24:03.102: V/AbstractSlideExpandableListAdapter(21527): getView4
05-13 18:24:03.102: V/AbstractSlideExpandableListAdapter(21527): getView5
05-13 18:24:03.102: V/AbstractSlideExpandableListAdapter(21527): getView6
05-13 18:24:03.112: V/AbstractSlideExpandableListAdapter(21527): getView7
05-13 18:24:03.112: V/AbstractSlideExpandableListAdapter(21527): getView8
05-13 18:24:03.112: V/AbstractSlideExpandableListAdapter(21527): getView0
05-13 18:24:03.122: V/AbstractSlideExpandableListAdapter(21527): getView1
05-13 18:24:03.122: V/AbstractSlideExpandableListAdapter(21527): getView2
05-13 18:24:03.122: V/AbstractSlideExpandableListAdapter(21527): getView3
05-13 18:24:03.122: V/AbstractSlideExpandableListAdapter(21527): getView4
05-13 18:24:03.132: V/AbstractSlideExpandableListAdapter(21527): getView5
05-13 18:24:03.132: V/AbstractSlideExpandableListAdapter(21527): getView6
05-13 18:24:03.132: V/AbstractSlideExpandableListAdapter(21527): getView7
05-13 18:24:03.132: V/AbstractSlideExpandableListAdapter(21527): getView8
05-13 18:24:03.142: V/AbstractSlideExpandableListAdapter(21527): getView0
05-13 18:24:03.152: V/AbstractSlideExpandableListAdapter(21527): getView1
05-13 18:24:03.162: V/AbstractSlideExpandableListAdapter(21527): getView2
05-13 18:24:03.172: V/AbstractSlideExpandableListAdapter(21527): getView3
05-13 18:24:03.182: V/AbstractSlideExpandableListAdapter(21527): getView4
05-13 18:24:03.192: V/AbstractSlideExpandableListAdapter(21527): getView5
05-13 18:24:03.202: V/AbstractSlideExpandableListAdapter(21527): getView6
05-13 18:24:03.212: V/AbstractSlideExpandableListAdapter(21527): getView7
05-13 18:24:03.222: V/AbstractSlideExpandableListAdapter(21527): getView8

Slow Scrolling on big List's

Great Library man just what I was looking for I would just like to put out one enhancement, on big list's I think its known that the scrolling is very laggy even on really beefy devices. I will take a look into it as well but I would just like to put it out there. But thanks for the hard work.

Feature Request: Close all items or close previous item option

Context: ListFragment with custom listitem with adapter set by SlideExpandableListAdapter.

Feature Request:
Single open mode or Multiple open mode.

Basically, when i click on one item, it expands. But when i click on the next item, the previous item should close in a single open mode.

Is this already possible in the given context?

Disable automatic closing

Hi,

Great project, i have only one issue.
I'm trying to resolve, when i scoll the list don't close the opened item.
Can you help me?

regards,
Larten

list.setItemActionListener() for dynamically objects

Above all, great job with your Framework.

** I know that this question should not be here, however have not found a different location or person who can answer it better.

In your method setItemActionListener received parameters of class R.
When I create dynamic objects in the code and put in the list, as I proceed to pass parameter for your method, when they are clickable?

eg. TableRows add dynamically in part expandable, and need use your method for action click.

thanks for understanding

Can't handle expandable view item click

Hi,

It's a great project for expandable list view but i have a problem to handle click event of expandable view item.Can you please provide me instruction so i can handle click event of this items.

Thanks
Vandit

How to close the expanded view?

Hi,
Thanks for creating this library.It works well with my app. I just added a button for deleting a listitem in the expandable view.However,as i clicked the button,the listitem can be deleted correctly, but the next listitem's expandable view will be expanded automaticlly,how to solve this problem?

[Feature Request] Make the open item fully visible when at the bottom

Hi.
Thanks for creating this library. The feature I am asking for is the following: when an item is at the bottom of the page, clicking on that will expand the item but the expanded view is not visible (since the main item was at the bottom) and user has to scroll to make it visible. I think it would be nice to automatically scroll the list slightly to bring the expanded view into the visible area in this case.

Thanks.

Could not download artifact 'org.ow2.asm:asm-analysis:4.0@jar'

I'm facing this problem currently. The project did't have any build problems previously. Only today when I was trying to build it gives this error.
Seems like asm-analysis:4.0 is not found in maven repo.
(http://search.maven.org/#browse%7C1692005229)
Any suggestion to fix this?

Gradle: A problem occurred configuring project ':Project'.
Could not resolve all dependencies for configuration ':Project:classpath'.
Could not download artifact 'org.ow2.asm:asm-analysis:4.0@jar'
> Artifact 'org.ow2.asm:asm-analysis:4.0@jar' not found.

How to receive expansion updates

Sorry if I am being silly.

How do I get informed of Row clicks and/or Expansions?

I also need to have a getCurrentRow method, and setExpandedRow method on this list.

Im going through and adding in my own listeners right now, but you must have coded this into the library somehow right?

Scrolling Away from the Open expanded Item that automatically closes instantly returns back

To replicate the issue:

  1. Open an item in a list view on a near top portion of the list.
  2. Scrolldown until you don't see the item
  3. Scroll-up again and you will see that the expanded item is gone, which is a feature, by the way.
    4. Open another item near the previous expanded one and you will see that the previous expanded item pops up to collapse, which should have already been gone.

I've already fixed this on my code by the way. You can have this implemented inside the method button.setOnClickListener on the class AbstractSlideExpandableListAdapter:

//Excerpt of the click listener
if (type == ExpandCollapseAnimation.EXPAND) {
                    if (lastOpenPosition != -1 && lastOpenPosition != position) {
                        if (lastOpen != null
//Added getVisibility() confirmation to make sure the item that's gone is gone already.
                                && lastOpen.getVisibility() == View.VISIBLE) {
//End of the fix
                            lastOpen.startAnimation(new ExpandCollapseAnimation(
                                    lastOpen, getAnimationDuration(),
                                    ExpandCollapseAnimation.COLLAPSE));
                        }
                        openItems.remove(lastOpenPosition);
                    }
                    lastOpen = target;
                    lastOpenPosition = position;
                } else if (lastOpenPosition == position) {
                    lastOpenPosition = -1;
                }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.