Exemple #1
0
  public TyGalleryBottomBar(GalleryContext galleryContext) {
    mGalleryContext = galleryContext;
    mContext = mGalleryContext.getAndroidContext();
    mActivity = (Activity) mContext;

    mTyBottomBarContainer = mGalleryContext.getGalleryAssignView(R.id.ty_bottombar_container);
    if (mTyBottomBarContainer != null) {
      mTyBottomSelectInd =
          (TyBottomSelectIndicator) mTyBottomBarContainer.findViewById(R.id.ty_bottom_select);
      if (mTyBottomSelectInd != null) {
        mTySelectAllBtn = (Button) mTyBottomSelectInd.findViewById(R.id.ty_selection_all_btn);
        mTySelectAllBtn.setOnClickListener(this);
        mTyDeleteBtn = (Button) mTyBottomSelectInd.findViewById(R.id.ty_delete_btn);
        mTyDeleteBtn.setOnClickListener(this);
        mTyShareBtn = (Button) mTyBottomSelectInd.findViewById(R.id.ty_share_btn);
        mTyShareBtn.setOnClickListener(this);
        mTyAddBtn = (Button) mTyBottomSelectInd.findViewById(R.id.ty_add_btn);
        mTyAddBtn.setOnClickListener(this);
        mTyHideBtn = (Button) mTyBottomSelectInd.findViewById(R.id.ty_hide_btn);
        mTyHideBtn.setOnClickListener(this);
        mTyShowBtn = (Button) mTyBottomSelectInd.findViewById(R.id.ty_show_btn);
        mTyShowBtn.setOnClickListener(this);
      }
      mTyCamIndicator = (TyCamIndicator) mTyBottomBarContainer.findViewById(R.id.ty_cam_ind);
      if (mTyCamIndicator != null) {
        mTyCamAct = (ImageButton) mTyCamIndicator.findViewById(R.id.ty_cam_act);
        mTyCamAct.setOnClickListener(this);
      }
      mTyAddIndicator = (TyAddIndicator) mTyBottomBarContainer.findViewById(R.id.ty_add_ind);
      if (mTyAddIndicator != null) {
        mTyAddAct = (ImageButton) mTyAddIndicator.findViewById(R.id.ty_add_act);
        mTyAddAct.setOnClickListener(this);
      }
    }
    mTyBottombarHeight = mActivity.getResources().getDimensionPixelSize(R.dimen.ty_bottom_height);
    mTyBottomSelectHeight =
        mActivity.getResources().getDimensionPixelSize(R.dimen.ty_bottom_select);
  }