0

I´m trying to create a landscape mode View, but when I place buttons over the xml and start the app on my phone to buttons are moved? I want to create like a popup window when the button is pressed with some information inside of window.

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <ImageView
        android:id="@+id/imageView1"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true"
        android:contentDescription="@string/v_ning_3"
        android:src="@drawable/test_karta3" />

    <Button
        android:id="@+id/up3"
        style="?android:attr/buttonStyleSmall"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_alignParentTop="true"
        android:layout_marginRight="14dp"
        android:background="@drawable/button_up"
        android:text="" />

    <Button
        android:id="@+id/down3"
        style="?android:attr/buttonStyleSmall"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_marginRight="15dp"
        android:layout_toLeftOf="@+id/up3"
        android:background="@drawable/button_down" />

    <Button
        android:id="@+id/V3Flygel3"
        style="?android:attr/buttonStyleSmall"
        android:layout_width="10"
        android:layout_height="wrap_content"
        android:layout_below="@+id/down3"
        android:layout_marginRight="59dp"
        android:layout_toLeftOf="@+id/down3" />

</RelativeLayout>
Erazx
  • 71
  • 1
  • 2
  • 7
  • Can you show a picture of what you want? I can see couple of things wrong with your layout. Try to make ImageView width and height as wrap_content and also for the last button make sure layout_width is in dp instead of number. It will give you error. If you can show the picture of what you want. I can help you more. – VendettaDroid Oct 12 '12 at 22:59
  • [xml layout](http://imageshack.us/a/img827/2410/namnlsad.png) [My sgs3](http://imageshack.us/a/img42/1820/screenshot2012101309144.png) – Erazx Oct 13 '12 at 07:23

0 Answers0