Search in sources :

Example 1 with AnimatedRotateDrawable

use of com.aviary.android.feather.graphics.AnimatedRotateDrawable 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)

Example 2 with AnimatedRotateDrawable

use of com.aviary.android.feather.graphics.AnimatedRotateDrawable in project mobile-android by photo.

the class UIUtils method createModalLoaderToast.

public static IToast createModalLoaderToast() {
    IToast mToastLoader = IToast.make(mContext, -1);
    View view = getLayoutInflater().inflate(R.layout.feather_progress_view, null);
    AnimatedRotateDrawable d = new AnimatedRotateDrawable(mContext.getResources(), R.drawable.feather_spinner_white_76, 12, 100);
    ProgressBar progress = (ProgressBar) view.findViewById(R.id.progress);
    progress.setIndeterminateDrawable(d);
    mToastLoader.setView(view);
    return mToastLoader;
}
Also used : AnimatedRotateDrawable(com.aviary.android.feather.graphics.AnimatedRotateDrawable) IToast(com.aviary.android.feather.widget.IToast) View(android.view.View) ProgressBar(android.widget.ProgressBar)

Aggregations

ProgressBar (android.widget.ProgressBar)2 AnimatedRotateDrawable (com.aviary.android.feather.graphics.AnimatedRotateDrawable)2 View (android.view.View)1 ViewAnimator (android.widget.ViewAnimator)1 ViewFlipper (android.widget.ViewFlipper)1 BottombarViewFlipper (com.aviary.android.feather.widget.BottombarViewFlipper)1 IToast (com.aviary.android.feather.widget.IToast)1