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);
}
use of android.widget.FrameLayout in project platform_frameworks_base by android.
the class MovingSurfaceViewActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
FrameLayout content = new FrameLayout(this);
mSurfaceView = new MySurfaceView(this);
mSurfaceView.getHolder().addCallback(this);
final float density = getResources().getDisplayMetrics().density;
int size = (int) (200 * density);
content.addView(mSurfaceView, new FrameLayout.LayoutParams(size, size, Gravity.CENTER_HORIZONTAL | Gravity.TOP));
mAnimator = ObjectAnimator.ofFloat(mSurfaceView, "myTranslationY", 0, size);
mAnimator.setRepeatMode(ObjectAnimator.REVERSE);
mAnimator.setRepeatCount(ObjectAnimator.INFINITE);
mAnimator.setDuration(200);
mAnimator.setInterpolator(new LinearInterpolator());
setContentView(content);
}
Aggregations