@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(); } }
@Override public View onCreateView( LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_single_tweet, container, false); up = (ActionButton) view.findViewById(R.id.single_tweet_button_up); up.removeShadow(); up.setImageDrawable(getResources().getDrawable(R.drawable.ic_keyboard_arrow_up_white_36dp)); up.setButtonColor(R.color.single_tweet_button); up.setOnClickListener(this); down = (ActionButton) view.findViewById(R.id.single_tweet_button_down); down.removeShadow(); down.setImageDrawable(getResources().getDrawable(R.drawable.ic_keyboard_arrow_down_white_36dp)); down.setButtonColor(R.color.single_tweet_button); down.setOnClickListener(this); pager = (VerticalViewPager) view.findViewById(R.id.vertical_view_pager); return view; }