What is wrong with this layout? Android

Posted by kellogs on Stack Overflow See other posts from Stack Overflow or by kellogs
Published on 2010-04-27T08:39:50Z Indexed on 2010/04/27 8:43 UTC
Read the original article Hit count: 572

Filed under:
|
|

Hi,

I am trying to accomplish a view like this: left side = live camera preview, right side = a column of 4 images. But all that I managed with the following xml was a fullscreen live camera preview. Android 1.5 emulator.

Thanks

<?xml version="1.0" encoding="utf-8"?>

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

    <proto.wiinkme.SurfaceViewEx 
        android:id="@+id/preview" 
        android:layout_height="fill_parent" 
        android:layout_width="wrap_content" 
        android:layout_alignParentLeft="true"
        android:layout_weight="3"/>

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:orientation="vertical"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_toRightOf="@+id/preview"
        android:layout_alignParentRight="true"
        android:layout_weight="1">

        <ImageView
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:id="@+id/mother_earth"
            android:src="@drawable/mother_earth_show" />

        <ImageView
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:id="@+id/meadow"
            android:src="@drawable/meadow_show" />

        <ImageView
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:id="@+id/trap"
            android:src="@drawable/trap_show" />

        <ImageView
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:id="@+id/whistle"
            android:src="@drawable/whistle_show" />


    </LinearLayout>

</RelativeLayout>

© Stack Overflow or respective owner

Related posts about android

Related posts about gui