【发布时间】:2016-03-19 15:42:11
【问题描述】:
所以我创建了自定义 ViewPager、PagerAdapter 和抽屉。现在我想调用位于单击的抽屉项目位置的 Tab。因为它是所有自定义不能使用事务。我不是java新手,所以不需要重写程序,只需写下该做什么。
@Override
public void onItemClick(AdapterView<?> parent,View view,int position,long id){
selectDrawerItem(position);
/* scroll code here*/
}
private void selectDrawerItem(int position) {
// Highlight the selected item, update the title, and close the drawer
drawerListView.setItemChecked(position, true);
drawerLayout.closeDrawer(drawerListView);
}
【问题讨论】: