Copyright (c) 2013, Torti Andr?s Fernando
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided
that the following conditions a...
If you think the Android project MultiWork listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code
package com.tjerkw.slideexpandable.library;
/*fromwww.java2s.com*/import android.view.View;
import android.widget.ListAdapter;
import com.multiwork.andres.R;
/**
* ListAdapter that adds sliding functionality to a list.
* Uses R.id.expandalbe_toggle_button and R.id.expandable id's if no
* ids are given in the contructor.
*
* @author tjerk
* @date 6/13/12 8:04 AM
*/publicclass SlideExpandableListAdapter extends AbstractSlideExpandableListAdapter {
privateint toggle_button_id;
privateint expandable_view_id;
public SlideExpandableListAdapter(ListAdapter wrapped, int toggle_button_id, int expandable_view_id) {
super(wrapped);
this.toggle_button_id = toggle_button_id;
this.expandable_view_id = expandable_view_id;
}
public SlideExpandableListAdapter(ListAdapter wrapped) {
this(wrapped, R.id.expandable_toggle_button, R.id.expandable);
}
publicint getButtonId(){
return toggle_button_id;
}
@Override
public View getExpandToggleButton(View parent) {
return parent.findViewById(toggle_button_id);
}
@Override
public View getExpandableView(View parent) {
return parent.findViewById(expandable_view_id);
}
}