Search in sources :

Example 1 with BottombarViewFlipper

use of com.aviary.android.feather.widget.BottombarViewFlipper in project mobile-android by photo.

the class FeatherActivity method onContentChanged.

/*
	 * (non-Javadoc)
	 * 
	 * @see android.app.Activity#onContentChanged()
	 */
@Override
public void onContentChanged() {
    super.onContentChanged();
    mDragLayer = (DragLayer) findViewById(R.id.dragLayer);
    mToolbar = (ToolbarView) findViewById(R.id.toolbar);
    mBottomBarFlipper = (BottombarViewFlipper) findViewById(R.id.bottombar_view_flipper);
    mWorkspace = (Workspace) mBottomBarFlipper.findViewById(R.id.workspace);
    mImageView = (ImageViewTouch) findViewById(R.id.image);
    mDrawingViewContainer = (ViewGroup) findViewById(R.id.drawing_view_container);
    mInlineProgressLoader = findViewById(R.id.image_loading_view);
    mWorkspaceIndicator = (WorkspaceIndicator) findViewById(R.id.workspace_indicator);
    mViewFlipper = ((ViewAnimator) findViewById(R.id.main_flipper));
    mToolbarMainAnimator = ((ViewFlipper) mToolbar.findViewById(R.id.top_indicator_main));
    mToolbarContentAnimator = ((ViewFlipper) mToolbar.findViewById(R.id.top_indicator_panel));
    mPopupContainer = (ViewGroup) findViewById(R.id.feather_dialogs_container);
    // update the progressbar animation drawable
    AnimatedRotateDrawable d = new AnimatedRotateDrawable(getResources(), R.drawable.feather_spinner_white_16);
    ProgressBar view = (ProgressBar) mToolbarContentAnimator.getChildAt(1);
    view.setIndeterminateDrawable(d);
    // adding the bottombar content view at runtime, otherwise fail to get the corrent child
    // LayoutInflater inflater = (LayoutInflater) getSystemService( Context.LAYOUT_INFLATER_SERVICE );
    // View contentView = inflater.inflate( R.layout.feather_option_panel_content, mBottomBarFlipper, false );
    // FrameLayout.LayoutParams p = new FrameLayout.LayoutParams( FrameLayout.LayoutParams.MATCH_PARENT,
    // FrameLayout.LayoutParams.WRAP_CONTENT );
    // p.gravity = Gravity.BOTTOM;
    // mBottomBarFlipper.addView( contentView, 0, p );
    mBottomBarFlipper.setDisplayedChild(1);
}
Also used : BottombarViewFlipper(com.aviary.android.feather.widget.BottombarViewFlipper) ViewFlipper(android.widget.ViewFlipper) ViewAnimator(android.widget.ViewAnimator) AnimatedRotateDrawable(com.aviary.android.feather.graphics.AnimatedRotateDrawable) ProgressBar(android.widget.ProgressBar)

Aggregations

ProgressBar (android.widget.ProgressBar)1 ViewAnimator (android.widget.ViewAnimator)1 ViewFlipper (android.widget.ViewFlipper)1 AnimatedRotateDrawable (com.aviary.android.feather.graphics.AnimatedRotateDrawable)1 BottombarViewFlipper (com.aviary.android.feather.widget.BottombarViewFlipper)1