Search in sources :

Example 36 with FrameLayout

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

the class GradientsActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    final FrameLayout layout = new FrameLayout(this);
    final ShadersView shadersView = new ShadersView(this);
    final GradientView gradientView = new GradientView(this);
    final RadialGradientView radialGradientView = new RadialGradientView(this);
    final SweepGradientView sweepGradientView = new SweepGradientView(this);
    final BitmapView bitmapView = new BitmapView(this);
    final SeekBar rotateView = new SeekBar(this);
    rotateView.setMax(360);
    rotateView.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {

        public void onStopTrackingTouch(SeekBar seekBar) {
        }

        public void onStartTrackingTouch(SeekBar seekBar) {
        }

        public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
            gradientView.setRotationY((float) progress);
            radialGradientView.setRotationX((float) progress);
            sweepGradientView.setRotationY((float) progress);
            bitmapView.setRotationX((float) progress);
        }
    });
    layout.addView(shadersView);
    layout.addView(gradientView, new FrameLayout.LayoutParams(200, 200, Gravity.CENTER));
    FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(200, 200, Gravity.CENTER);
    lp.setMargins(220, 0, 0, 0);
    layout.addView(radialGradientView, lp);
    lp = new FrameLayout.LayoutParams(200, 200, Gravity.CENTER);
    lp.setMargins(440, 0, 0, 0);
    layout.addView(sweepGradientView, lp);
    lp = new FrameLayout.LayoutParams(200, 200, Gravity.CENTER);
    lp.setMargins(220, -220, 0, 0);
    layout.addView(bitmapView, lp);
    layout.addView(rotateView, new FrameLayout.LayoutParams(300, FrameLayout.LayoutParams.WRAP_CONTENT, Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM));
    setContentView(layout);
}
Also used : SeekBar(android.widget.SeekBar) FrameLayout(android.widget.FrameLayout) Paint(android.graphics.Paint)

Example 37 with FrameLayout

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

the class Bitmaps3dActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    final BitmapsView view = new BitmapsView(this);
    final FrameLayout layout = new FrameLayout(this);
    layout.addView(view, new FrameLayout.LayoutParams(800, 400, Gravity.CENTER));
    view.setRotationX(-35.0f);
    setContentView(layout);
}
Also used : FrameLayout(android.widget.FrameLayout)

Example 38 with FrameLayout

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

the class BitmapsActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    final BitmapsView view = new BitmapsView(this);
    final FrameLayout layout = new FrameLayout(this);
    layout.addView(view, new FrameLayout.LayoutParams(480, 800, Gravity.CENTER));
    setContentView(layout);
    ScaleAnimation a = new ScaleAnimation(1.0f, 2.0f, 1.0f, 2.0f, ScaleAnimation.RELATIVE_TO_SELF, 0.5f, ScaleAnimation.RELATIVE_TO_SELF, 0.5f);
    a.setDuration(2000);
    a.setRepeatCount(Animation.INFINITE);
    a.setRepeatMode(Animation.REVERSE);
    view.startAnimation(a);
}
Also used : FrameLayout(android.widget.FrameLayout) ScaleAnimation(android.view.animation.ScaleAnimation)

Example 39 with FrameLayout

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

the class BitmapsAlphaActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    final BitmapsView view = new BitmapsView(this);
    final FrameLayout layout = new FrameLayout(this);
    layout.addView(view, new FrameLayout.LayoutParams(480, 800, Gravity.CENTER));
    setContentView(layout);
}
Also used : FrameLayout(android.widget.FrameLayout)

Example 40 with FrameLayout

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

the class MoreNinePatchesActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    FrameLayout layout = new FrameLayout(this);
    PatchView b = new PatchView(this);
    b.setLayoutParams(new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.MATCH_PARENT, Gravity.CENTER));
    layout.addView(b);
    layout.setBackgroundColor(0xffffffff);
    setContentView(layout);
}
Also used : FrameLayout(android.widget.FrameLayout)

Aggregations

FrameLayout (android.widget.FrameLayout)634 View (android.view.View)244 TextView (android.widget.TextView)143 ViewGroup (android.view.ViewGroup)128 ImageView (android.widget.ImageView)95 LinearLayout (android.widget.LinearLayout)89 ListView (android.widget.ListView)54 AdapterView (android.widget.AdapterView)49 Button (android.widget.Button)44 LayoutInflater (android.view.LayoutInflater)42 Bitmap (android.graphics.Bitmap)41 LayoutParams (android.view.ViewGroup.LayoutParams)37 AbsListView (android.widget.AbsListView)37 Context (android.content.Context)35 Intent (android.content.Intent)28 Activity (android.app.Activity)25 TextureView (android.view.TextureView)25 ColorDrawable (android.graphics.drawable.ColorDrawable)23 FileOutputStream (java.io.FileOutputStream)23 Drawable (android.graphics.drawable.Drawable)20