use of android.widget.ExpandableListView in project packages_apps_Contacts by AOKP.
the class ExpandableListFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
final Context context = getActivity();
FrameLayout listContainer = new FrameLayout(context);
listContainer.setId(INTERNAL_LIST_CONTAINER_ID);
ExpandableListView lv = new ExpandableListView(getActivity());
lv.setId(android.R.id.list);
lv.setDrawSelectorOnTop(false);
listContainer.addView(lv, new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
return listContainer;
}
use of android.widget.ExpandableListView in project packages_apps_Contacts by AOKP.
the class ExpandableListFragment method ensureList.
private void ensureList() {
if (mExpandableList != null) {
return;
}
View root = getView();
if (root == null) {
throw new IllegalStateException("Content view not yet created");
}
if (root instanceof ExpandableListView) {
mExpandableList = (ExpandableListView) root;
} else {
mEmptyView = root.findViewById(android.R.id.empty);
mExpandableListContainer = root.findViewById(INTERNAL_LIST_CONTAINER_ID);
View rawExpandableListView = root.findViewById(android.R.id.list);
if (!(rawExpandableListView instanceof ExpandableListView)) {
if (rawExpandableListView == null) {
throw new RuntimeException("Your content must have a ListView whose id attribute is " + "'android.R.id.list'");
}
throw new RuntimeException("Content has view with id attribute 'android.R.id.list' " + "that is not a ListView class");
}
mExpandableList = (ExpandableListView) rawExpandableListView;
if (mEmptyView != null) {
mExpandableList.setEmptyView(mEmptyView);
}
}
if (mAdapter != null) {
setListAdapter(mAdapter);
}
mHandler.post(mRequestFocus);
}
use of android.widget.ExpandableListView in project FlycoDialog_Master by H07000223.
the class DialogHomeActivity method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.ac_dialog_home);
ButterKnife.bind(this);
mMenuItems.add(new DialogMenuItem("收藏", R.mipmap.ic_winstyle_favor));
mMenuItems.add(new DialogMenuItem("下载", R.mipmap.ic_winstyle_download));
mMenuItems.add(new DialogMenuItem("分享", R.mipmap.ic_winstyle_share));
mMenuItems.add(new DialogMenuItem("删除", R.mipmap.ic_winstyle_delete));
mMenuItems.add(new DialogMenuItem("歌手", R.mipmap.ic_winstyle_artist));
mMenuItems.add(new DialogMenuItem("专辑", R.mipmap.ic_winstyle_album));
mBasIn = new BounceTopEnter();
mBasOut = new SlideBottomExit();
View decorView = getWindow().getDecorView();
HomeAdapter adapter = new HomeAdapter(mContext);
mElv.setAdapter(adapter);
// extend all group
for (int i = 0; i < mGroups.length; i++) {
mElv.expandGroup(i);
}
mElv.setOnChildClickListener(this);
mElv.setOnGroupClickListener(new ExpandableListView.OnGroupClickListener() {
@Override
public boolean onGroupClick(ExpandableListView parent, View v, int groupPosition, long id) {
return true;
}
});
}
use of android.widget.ExpandableListView in project RecyclerViewAnimator by dkmeteor.
the class PullToRefreshExpandableListView method createRefreshableView.
@Override
protected ExpandableListView createRefreshableView(Context context, AttributeSet attrs) {
final ExpandableListView lv;
if (VERSION.SDK_INT >= VERSION_CODES.GINGERBREAD) {
lv = new InternalExpandableListViewSDK9(context, attrs);
} else {
lv = new InternalExpandableListView(context, attrs);
}
// Set it to this so it can be used in ListActivity/ListFragment
lv.setId(android.R.id.list);
return lv;
}
use of android.widget.ExpandableListView in project Android-PullToRefresh by chrisbanes.
the class PullToRefreshExpandableListView method createRefreshableView.
@Override
protected ExpandableListView createRefreshableView(Context context, AttributeSet attrs) {
final ExpandableListView lv;
if (VERSION.SDK_INT >= VERSION_CODES.GINGERBREAD) {
lv = new InternalExpandableListViewSDK9(context, attrs);
} else {
lv = new InternalExpandableListView(context, attrs);
}
// Set it to this so it can be used in ListActivity/ListFragment
lv.setId(android.R.id.list);
return lv;
}
Aggregations