0

I am new to android development/SmartEyeGlass SDK and I am wondering if it is possible to put anything (text, images, whatever) above the midline on the screen. When I put a <ImageView> in my layout.xml and load it in my emulator, the image's top border is in the center of the screen. If it is possible, any suggestions are greatly appreciated.

Layout.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="@dimen/smarteyeglass_control_width"
    android:layout_height="@dimen/smarteyeglass_control_height"
    android:background="@android:color/black"
    android:orientation="vertical"
    android:weightSum="2"
    tools:ignore="ContentDescription,PxUsage" >

    <ImageView 
        android:id="@+id/test_image"
        android:src="@drawable/test"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_horizontal" />

</LinearLayout>
unknown
  • 55
  • 8

1 Answers1

0

You should be able to draw above the midline. Try adding layout_alignParentLeft and layout_alignParentTop like this:

<ImageView
    android:id="@+id/image"
    android:layout_width="48px"
    android:layout_height="48px"
    android:layout_alignParentLeft="true"
    android:layout_alignParentTop="true"
    android:layout_margin="6px"
    android:background="@drawable/shape"
    android:src="@drawable/icon_extension48" />
mldeveloper
  • 2,253
  • 1
  • 13
  • 14