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);
}
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);
}
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);
}
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);
}
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);
}
Aggregations