Пример #1
0
 /** 获取数据后的显示的View */
 private View createLoadedView() {
   View view = UIUtils.inflate(R.layout.activity_detail);
   // 添加信息区域
   mInfoLayout = (FrameLayout) view.findViewById(R.id.detail_info);
   mInfoHolder = new AppDetailInfoHolder();
   mInfoHolder.setData(mAppInfo);
   mInfoLayout.addView(mInfoHolder.getRootView());
   // 添加安全区域
   mSafeLayout = (FrameLayout) view.findViewById(R.id.detail_safe);
   mSafeHolder = new AppDetailSafeHolder();
   mSafeHolder.setData(mAppInfo);
   mSafeLayout.addView(mSafeHolder.getRootView());
   // 截图区域
   mScreenLayout = (HorizontalScrollView) view.findViewById(R.id.detail_screen);
   mScreenHolder = new AppDetailScreenHolder();
   mScreenHolder.setData(mAppInfo);
   mScreenLayout.addView(mScreenHolder.getRootView());
   // 介绍区域
   mDesLayout = (FrameLayout) view.findViewById(R.id.detail_des);
   mDesHolder = new AppDetailDesHolder();
   mDesHolder.setData(mAppInfo);
   mDesLayout.addView(mDesHolder.getRootView());
   // 底部区域
   mBottomLayout = (FrameLayout) view.findViewById(R.id.bottom_layout);
   mBottomHolder = new AppDetailBottomHolder();
   mBottomHolder.setData(mAppInfo);
   mBottomLayout.addView(mBottomHolder.getRootView());
   mBottomHolder.startObserver();
   return view;
 }
Пример #2
0
 @Override
 protected void onDestroy() {
   if (mBottomHolder != null) {
     mBottomHolder.stopObserver();
   }
   super.onDestroy();
 }