Search code examples
androidimageviewgoogle-glassgoogle-gdk

Google Glass : imageView fullscreen?


Using Google Glass, I would like to know if it possible to have an imageView which take all the space ?

With the following code, I have always something like 10px all around the image :

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/relativelayoutImage"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="0sp"
android:layout_margin="0sp" >

<ImageView
    android:id="@+id/myImageView"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:keepScreenOn="true"
    android:scaleType="fitXY"
    android:src="@drawable/splashscreen" />

</LinearLayout>

Solution

  • If you are sure that you don't have padding or theme, your view is probably already fullscreen. That mysterious extra space is not a part of Glass screen or not usable.

    Try this:

    adb shell screencap -p /sdcard/screen.png
    adb pull /sdcard/screen.png
    

    You'll see that the image from the frame buffer doesn't have that 10 px all around the image.

    I am not sure about your case but that's what happened to me.

    enter image description here