Esempio n. 1
0
  public void enableCamMode(boolean bAnim) {
    dealNeedhidebyNoneMode();
    if (mCurmode == TyBottomMode.TyCamMode) return;
    if (mTyCamIndicator != null) {
      mTyCamIndicator.setVisibility(View.GONE);
    }

    if (mTyBottomBarContainer != null) {
      mTyBottomBarContainer.setVisibility(View.VISIBLE);
    }
    if (mTyCamIndicator != null) {
      mTyCamIndicator.setVisibility(View.VISIBLE, bAnim);
    }
    if (mTyAddIndicator != null) {
      mTyAddIndicator.setVisibility(View.GONE, bAnim);
    }
    if (mTyBottomSelectInd != null) {
      mTyBottomSelectInd.setVisibility(View.GONE, bAnim);
    }
    mCurmode = TyBottomMode.TyCamMode;
  }
Esempio n. 2
0
  public void enableSelectMode(TySelectKind selectKind, Object tag) {
    dealNeedhidebyNoneMode();
    if (mCurmode == TyBottomMode.TySelectMode) return;
    if (mTyBottomSelectInd != null) {
      mTyBottomSelectInd.setVisibility(View.GONE);
    }

    if (mTyBottomBarContainer != null) {
      mTyBottomBarContainer.setVisibility(View.VISIBLE);
    }
    if (mTyBottomSelectInd != null) {
      mTyBottomSelectInd.setVisibility(View.VISIBLE, true);
      mCurKind = switchSelectKind(mCurKind, selectKind, tag);
    }
    if (mTyCamIndicator != null) {
      mTyCamIndicator.setVisibility(View.GONE, true);
    }
    if (mTyAddIndicator != null) {
      mTyAddIndicator.setVisibility(View.GONE, true);
    }
    mCurmode = TyBottomMode.TySelectMode;
  }
Esempio n. 3
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);
  }