Search in sources :

Example 1 with ViewFlipper

use of android.widget.ViewFlipper in project platform_frameworks_base by android.

the class ViewFlipperActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    final LayoutInflater inflater = getLayoutInflater();
    final View widget = inflater.inflate(R.layout.widget, null);
    widget.setLayoutParams(new FrameLayout.LayoutParams(180, 180, Gravity.CENTER));
    ViewFlipper flipper = (ViewFlipper) widget.findViewById(R.id.flipper);
    View view = inflater.inflate(R.layout.flipper_item, flipper, false);
    flipper.addView(view);
    ((ImageView) view.findViewById(R.id.widget_image)).setImageResource(R.drawable.sunset1);
    ((TextView) view.findViewById(R.id.widget_text)).setText("This is a long line of text, " + "enjoy the wrapping and drawing");
    view = inflater.inflate(R.layout.flipper_item, flipper, false);
    flipper.addView(view);
    ((ImageView) view.findViewById(R.id.widget_image)).setImageResource(R.drawable.sunset3);
    ((TextView) view.findViewById(R.id.widget_text)).setText("Another very long line of text, " + "enjoy the wrapping and drawing");
    FrameLayout layout = new FrameLayout(this);
    layout.addView(widget);
    setContentView(layout);
}
Also used : ViewFlipper(android.widget.ViewFlipper) LayoutInflater(android.view.LayoutInflater) FrameLayout(android.widget.FrameLayout) TextView(android.widget.TextView) ImageView(android.widget.ImageView) TextView(android.widget.TextView) ImageView(android.widget.ImageView) View(android.view.View)

Example 2 with ViewFlipper

use of android.widget.ViewFlipper in project android_frameworks_base by crdroidandroid.

the class ViewFlipperActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    final LayoutInflater inflater = getLayoutInflater();
    final View widget = inflater.inflate(R.layout.widget, null);
    widget.setLayoutParams(new FrameLayout.LayoutParams(180, 180, Gravity.CENTER));
    ViewFlipper flipper = (ViewFlipper) widget.findViewById(R.id.flipper);
    View view = inflater.inflate(R.layout.flipper_item, flipper, false);
    flipper.addView(view);
    ((ImageView) view.findViewById(R.id.widget_image)).setImageResource(R.drawable.sunset1);
    ((TextView) view.findViewById(R.id.widget_text)).setText("This is a long line of text, " + "enjoy the wrapping and drawing");
    view = inflater.inflate(R.layout.flipper_item, flipper, false);
    flipper.addView(view);
    ((ImageView) view.findViewById(R.id.widget_image)).setImageResource(R.drawable.sunset3);
    ((TextView) view.findViewById(R.id.widget_text)).setText("Another very long line of text, " + "enjoy the wrapping and drawing");
    FrameLayout layout = new FrameLayout(this);
    layout.addView(widget);
    setContentView(layout);
}
Also used : ViewFlipper(android.widget.ViewFlipper) LayoutInflater(android.view.LayoutInflater) FrameLayout(android.widget.FrameLayout) TextView(android.widget.TextView) ImageView(android.widget.ImageView) TextView(android.widget.TextView) ImageView(android.widget.ImageView) View(android.view.View)

Example 3 with ViewFlipper

use of android.widget.ViewFlipper in project android_frameworks_base by ParanoidAndroid.

the class ViewFlipperActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    final LayoutInflater inflater = getLayoutInflater();
    final View widget = inflater.inflate(R.layout.widget, null);
    widget.setLayoutParams(new FrameLayout.LayoutParams(180, 180, Gravity.CENTER));
    ViewFlipper flipper = (ViewFlipper) widget.findViewById(R.id.flipper);
    View view = inflater.inflate(R.layout.flipper_item, flipper, false);
    flipper.addView(view);
    ((ImageView) view.findViewById(R.id.widget_image)).setImageResource(R.drawable.sunset1);
    ((TextView) view.findViewById(R.id.widget_text)).setText("This is a long line of text, " + "enjoy the wrapping and drawing");
    view = inflater.inflate(R.layout.flipper_item, flipper, false);
    flipper.addView(view);
    ((ImageView) view.findViewById(R.id.widget_image)).setImageResource(R.drawable.sunset3);
    ((TextView) view.findViewById(R.id.widget_text)).setText("Another very long line of text, " + "enjoy the wrapping and drawing");
    FrameLayout layout = new FrameLayout(this);
    layout.addView(widget);
    setContentView(layout);
}
Also used : ViewFlipper(android.widget.ViewFlipper) LayoutInflater(android.view.LayoutInflater) FrameLayout(android.widget.FrameLayout) TextView(android.widget.TextView) ImageView(android.widget.ImageView) TextView(android.widget.TextView) ImageView(android.widget.ImageView) View(android.view.View)

Example 4 with ViewFlipper

use of android.widget.ViewFlipper in project storymaker by StoryMaker.

the class CacheWordActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_lock_screen);
    Intent intent = getIntent();
    setPin = intent.getBooleanExtra(BaseActivity.CACHEWORD_FIRST_LOCK, false);
    if (setPin) {
        Timber.d("got flag for cacheword pin initialization");
    } else {
        Timber.d("no flag for cacheword pin initialization");
    }
    SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
    int timeout = Integer.parseInt(settings.getString("pcachewordtimeout", BaseActivity.CACHEWORD_TIMEOUT));
    mCacheWordHandler = new CacheWordHandler(this, timeout);
    mViewEnterPin = findViewById(R.id.llEnterPin);
    mViewCreatePin = findViewById(R.id.llCreatePin);
    mTextEnterPin = (EditText) findViewById(R.id.editEnterPin);
    mTextCreatePin = (EditText) findViewById(R.id.editCreatePin);
    mTextConfirmPin = (EditText) findViewById(R.id.editConfirmPin);
    ViewFlipper vf = (ViewFlipper) findViewById(R.id.viewFlipper);
    LinearLayout flipView1 = (LinearLayout) findViewById(R.id.flipView1);
    LinearLayout flipView2 = (LinearLayout) findViewById(R.id.flipView2);
    mSlider = new TwoViewSlider(vf, flipView1, flipView2, mTextCreatePin, mTextConfirmPin);
}
Also used : ViewFlipper(android.widget.ViewFlipper) SharedPreferences(android.content.SharedPreferences) CacheWordHandler(info.guardianproject.cacheword.CacheWordHandler) Intent(android.content.Intent) LinearLayout(android.widget.LinearLayout)

Example 5 with ViewFlipper

use of android.widget.ViewFlipper 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

ViewFlipper (android.widget.ViewFlipper)8 LayoutInflater (android.view.LayoutInflater)6 View (android.view.View)6 ImageView (android.widget.ImageView)6 TextView (android.widget.TextView)6 FrameLayout (android.widget.FrameLayout)5 Intent (android.content.Intent)1 SharedPreferences (android.content.SharedPreferences)1 Bitmap (android.graphics.Bitmap)1 ColorDrawable (android.graphics.drawable.ColorDrawable)1 LinearLayout (android.widget.LinearLayout)1 ProgressBar (android.widget.ProgressBar)1 ViewAnimator (android.widget.ViewAnimator)1 AnimatedRotateDrawable (com.aviary.android.feather.graphics.AnimatedRotateDrawable)1 BottombarViewFlipper (com.aviary.android.feather.widget.BottombarViewFlipper)1 Callback (com.squareup.picasso.Callback)1 CacheWordHandler (info.guardianproject.cacheword.CacheWordHandler)1 FavoriteAnime (tr.bcxip.hummingbird.api.objects.FavoriteAnime)1