本文整理汇总了Java中com.handmark.pulltorefresh.library.PullToRefreshExpandableListView类的典型用法代码示例。如果您正苦于以下问题:Java PullToRefreshExpandableListView类的具体用法?Java PullToRefreshExpandableListView怎么用?Java PullToRefreshExpandableListView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PullToRefreshExpandableListView类属于com.handmark.pulltorefresh.library包,在下文中一共展示了PullToRefreshExpandableListView类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import com.handmark.pulltorefresh.library.PullToRefreshExpandableListView; //导入依赖的package包/类
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_ptr_expandable_list);
mPullRefreshListView = (PullToRefreshExpandableListView) findViewById(R.id.pull_refresh_expandable_list);
// Set a listener to be invoked when the list should be refreshed.
mPullRefreshListView.setOnRefreshListener(new OnRefreshListener<ExpandableListView>() {
@Override
public void onRefresh(PullToRefreshBase<ExpandableListView> refreshView) {
// Do work to refresh the list here.
new GetDataTask().execute();
}
});
for (String group : mGroupStrings) {
Map<String, String> groupMap1 = new HashMap<String, String>();
groupData.add(groupMap1);
groupMap1.put(KEY, group);
List<Map<String, String>> childList = new ArrayList<Map<String, String>>();
for (String string : mChildStrings) {
Map<String, String> childMap = new HashMap<String, String>();
childList.add(childMap);
childMap.put(KEY, string);
}
childData.add(childList);
}
mAdapter = new SimpleExpandableListAdapter(this, groupData, android.R.layout.simple_expandable_list_item_1,
new String[] { KEY }, new int[] { android.R.id.text1 }, childData,
android.R.layout.simple_expandable_list_item_2, new String[] { KEY }, new int[] { android.R.id.text1 });
setListAdapter(mAdapter);
}
示例2: onCreateView
import com.handmark.pulltorefresh.library.PullToRefreshExpandableListView; //导入依赖的package包/类
public void onCreateView() {
mListView = (PullToRefreshExpandableListView) mRootView
.findViewById(R.id.tab_contacts_list);
mPinnedHeaderView = mRootView
.findViewById(R.id.friend_list_group_header);
mPinnedImageView = (ImageView) mRootView
.findViewById(R.id.friend_list_group_img);
mPinnedTextView = (TextView) mRootView
.findViewById(R.id.friend_list_group_text);
mPinnedRightTextView = (TextView) mRootView
.findViewById(R.id.friend_list_group_right_text);
mPinnedImageView.setBackgroundResource(R.drawable.group_unfold_arrow);
mListView
.setOnRefreshListener(new OnRefreshListener<ExpandableListView>() {
@Override
public void onRefresh(
PullToRefreshBase<ExpandableListView> refreshView) {
// TODO Auto-generated method stub
mGroups.clear();
mEntries.clear();
mAdapter.notifyDataSetChanged();
XmppLoadRosterRunnable runnable = new XmppLoadRosterRunnable(
mYiFragment.getActivity(), null);
getXmppBinder().execute(runnable);
}
});
}
示例3: initView
import com.handmark.pulltorefresh.library.PullToRefreshExpandableListView; //导入依赖的package包/类
private void initView()
{
filetype = getIntent().getIntExtra("video_type", 0);
month_name = getResources().getStringArray(R.array.month_array);
expListView = (PullToRefreshExpandableListView) findViewById(R.id.athome_camera_tab_videolist_expandableListView);
expListView.getRefreshableView().setGroupIndicator(null);
expListView.getRefreshableView().setDivider(null);
StreamerInfo basicInfo = Viewer.getViewer().getStreamerInfoMgr().getStreamerInfo(Long.valueOf(cid));
int camCount = 0;
if (basicInfo != null) {
camCount = basicInfo.getCamCount();
}
numofcamera = basicInfo.getCamCount();
titleText = (TextView) findViewById(R.id.title);
relayout_alert = (LinearLayout) findViewById(R.id.relayout_alert);
// cameraListView = (ListView)findViewById(R.id.cameraListView);
mMyViewerHelper = MyViewerHelper.getInstance(getApplicationContext());
mCameraInfos = mMyViewerHelper.getAllCameraInfos();
// cameraListAdapter = new CameraListAdapter(this,mCameraInfos);
// cameraListView.setAdapter(cameraListAdapter);
// cameraListView.setOnItemClickListener(this);
relayout_alert_cell1 = (RelativeLayout) findViewById(R.id.relayout_alert_cell1);
relayout_selectTime = (RelativeLayout) findViewById(R.id.relayout_selectTime);
select_time = (TextView) findViewById(R.id.select_time);
relayout_selectTime.setOnClickListener(this);
athome_up_down = (RelativeLayout) findViewById(R.id.athome_up_down);
athome_up_down.setOnClickListener(this);
relayout_alert_cell1.setOnClickListener(this);
opt_linlayout = (LinearLayout) findViewById(R.id.opt_linlayout);
opt_linlayout.setOnClickListener(this);
findViewById(R.id.back_linlayout).setOnClickListener(this);
not_viedeoList = (RelativeLayout) findViewById(R.id.not_viedeoList);
not_viedeoList.setOnClickListener(this);
videoListViewHandler = new VideoListViewHandler(this, myHandler, cid, filetype);
adapter = new VideoListViewAdapter(this, filetype, cid, isNewAvs, basicInfo.getStreamerType(), videoListViewHandler);
if(iCam != -1){
adapter.setNewAvsInfo(camConfig.get(iCam).getCamIndex());
}else{
adapter.setNewAvsInfo(-1);
}
expListView.getRefreshableView().setAdapter(adapter);
expListView.getRefreshableView().setOnChildClickListener(this);
expListView.getRefreshableView().setOnScrollListener(this);
expListView.setOnRefreshListener(this);
date = "all";
reload();
setCameraName();
silde_up_in = AnimationUtils.loadAnimation(this, R.anim.silde_up_in);
silde_up_out = AnimationUtils.loadAnimation(this, R.anim.silde_up_out);
}
示例4: onCreatePullToRefreshListView
import com.handmark.pulltorefresh.library.PullToRefreshExpandableListView; //导入依赖的package包/类
protected PullToRefreshExpandableListView onCreatePullToRefreshListView(LayoutInflater inflater,
Bundle savedInstanceState) {
return new PullToRefreshExpandableListView(getActivity());
}