• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Draw a Image on FullScreen mode.

Hi, I already know how to get my Activity as fullscreen on Android, now I need to draw a Image in this screen.

This is my XML layout.

Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    <ImageView android:id="@+id/image01" android:layout_width="fill_parent"
        android:layout_height="fill_parent" />
</LinearLayout>
This image is dynamic generated and drawed in the ImageView.

This is my code on my Activity.

Code:
    public void onCreate(Bundle savedInstance) {
        super.onCreate(savedInstance);

        requestWindowFeature(Window.FEATURE_NO_TITLE);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                WindowManager.LayoutParams.FLAG_FULLSCREEN);

        setContentView(R.layout.main);
}

But when running, the Activity is FullScreen, but the ImageView is adjusted in the center.

What's wrong?
 
I added the following code:

Code:
        View view = getWindow().getDecorView();
        Log.i("RMSDK:J:IbaReader(decor)",
                "[w=" + view.getWidth() + ":h=" + view.getHeight() + "]");
        Log.i("RMSDK:J:IbaReader(img)",
                "[w=" + img.getWidth() + ":h=" + img.getHeight() + "]");

When running this results in [w=320:h=480] in both cases.

Any idea?
 
Back
Top Bottom