コード例 #1
0
 @Override
 protected void initWidget() {
   super.initWidget();
   actionBar.setTitle("侧滑效果演示");
   fragContent = new BitmapDisplay();
   changeFragment(fragContent);
   item1 = new ResideMenuItem(this, R.drawable.ic_launcher, "加载网络图");
   item2 = new ResideMenuItem(this, R.drawable.ic_launcher, "模糊图片");
   item3 = new ResideMenuItem(this, R.drawable.ic_launcher, "图片缩放");
   item4 = new ResideMenuItem(this, R.drawable.ic_launcher, "多图选择");
   item5 = new ResideMenuItem(this, R.drawable.ic_launcher, "立即退出");
   // 必须调用initSlidMenu()才能初始化菜单项
   initSlidMenus(item1, item2, item3, item4, item5);
 }
コード例 #2
0
 /** 必须调用super(),否则界面触摸将被屏蔽 */
 @Override
 public void changeFragment(BaseFragment targetFragment) {
   super.changeFragment(targetFragment);
   changeFragment(R.id.content, targetFragment);
 }