Omar
Omar

Reputation: 567

How is it possible to show an image in a full screen on android?

I wan't to show an image that is already saved on the device. I want to show the image on the whole screen by accessing all the pixels on the screen of the android device.

Any help will be appreciated!

Upvotes: 0

Views: 1081

Answers (3)

Omar
Omar

Reputation: 567

Thank you for your responses @akash93 and @ghostbust555.

I was looking for a way that I can wrap it with python script.

Here, what I found that helped me to figure out a solution for my problem.

To disable the navigation bar:

adb shell service call activity 42 s16 com.android.systemui

Show an image:

shell am start -a android.intent.action.VIEW -d file://data/test.jpg -t image/jpeg

To enable the navigation bar:

adb shell am start -a android.intent.action.VIEW -d file://%s/test_lcd.jpg -t image/jpeg

Resource: Is there a way to hide the system/navigation bar in Android ICS

Upvotes: 1

ashkhn
ashkhn

Reputation: 1630

In your activity's onCreate method add

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

before setContentView

Upvotes: 0

ghostbust555
ghostbust555

Reputation: 2049

you are looking for full screen immersive mode - https://developer.android.com/training/system-ui/immersive.html

Upvotes: 0

Related Questions