예제 #1
0
  @Override
  public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    fContext = getActivity().getApplicationContext();
    mActivity = (MainActivity) getActivity();
    //        bottomPanel = (LinearLayout) rootView.findViewById(R.id.bottomPanelPhoto);
    progress = (DonutProgress) rootView.findViewById(R.id.donut_progress);
    progress.setVisibility(View.GONE);
    btnSave = (ActionButton) rootView.findViewById(R.id.aBtnSave);

    btnSave.setImageResource(R.drawable.ic_check);
    btnSave.setButtonColor(Color.TRANSPARENT);
    btnSave.setStrokeColor(Color.GREEN);
    btnSave.setStrokeWidth(3.0f);
    btnSave.setButtonColorPressed(Color.LTGRAY);
    btnSave.removeShadow();
    btnSave.setType(ActionButton.Type.BIG);
    btnSave.setShowAnimation(ActionButton.Animations.FADE_IN);
    btnSave.setHideAnimation(ActionButton.Animations.FADE_OUT);
    btnSave.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            new SendFilesTask().execute();
          }
        });
    btnCancel = (ActionButton) rootView.findViewById(R.id.aBtnBack);
    btnCancel.setImageResource(R.drawable.ic_cancel);
    btnCancel.setButtonColor(Color.TRANSPARENT);
    btnCancel.setStrokeColor(Color.RED);
    btnCancel.setStrokeWidth(3.0f);
    btnCancel.setButtonColorPressed(Color.LTGRAY);
    btnCancel.removeShadow();
    btnCancel.setType(ActionButton.Type.BIG);
    btnCancel.setShowAnimation(ActionButton.Animations.FADE_IN);
    btnCancel.setHideAnimation(ActionButton.Animations.FADE_OUT);
    btnCancel.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            btnCancel.playHideAnimation();
            btnSave.playHideAnimation();
            mActivity.onBackPressed();
          }
        });
    imgView = (ImageView) rootView.findViewById(R.id.imgView);
    try {
      ImageLoader.getInstance().displayImage("file:///mnt/" + bmp, imgView);
    } catch (Exception e) {

    }
    mActivity.setIsFAB(false);
    mActivity.updateFAB();
    if (savedInstanceState == null) {
      startAnimation();
    }
  }
예제 #2
0
 public void sendDelayedSms() {
   mProgress.setVisibility(VISIBLE);
   updateButtonState(SendButtonState.CANCEL);
   mProgressAnimator.start();
 }