Android layout xml



I'm trying to do this view


enter image description here


the red block is my ImageView


the two bleu block is my ListView


the 2 yellow cercles they are my ImageButton


and the green block they are my TextView


my fragment_layout.xml



<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffffff" xmlns:android="http://ift.tt/nIICcg">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >


<RelativeLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" >

<ImageButton
android:id="@+id/lead"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:adjustViewBounds="true"
android:background="@null"
android:scaleType="fitXY"
android:src="@drawable/y" />

<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:text="LEAD"
android:textAppearance="?android:attr/textAppearanceMedium" />
</RelativeLayout>

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" >

<ImageButton
android:id="@+id/rhythm"
android:layout_width="match_parent"
android:layout_height="wrap_content"

android:background="@null"
android:scaleType="fitXY"
android:src="@drawable/b" />

<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_below="@+id/rhythm"
android:layout_centerHorizontal="true"
android:text="RHYTHM"
android:textAppearance="?android:attr/textAppearanceMedium" />
</RelativeLayout>
</LinearLayout>

<ImageView
android:id="@+id/imageView1"
android:layout_width="150dp"
android:layout_height="70dp"
android:src="@drawable/logo" />


<!-- list view -->

<ListView
android:id="@+id/rhythmTracks"
android:layout_width="150dp"
android:layout_gravity="right"
android:layout_height="fill_parent"
android:background="#7AD0FF"
android:choiceMode="singleChoice"
android:divider="@null"
android:dividerHeight="10dp"
android:focusable="false"
android:focusableInTouchMode="false" >

</ListView>

<ListView
android:id="@+id/leadTracks"
android:layout_width="150dp"
android:layout_height="fill_parent"
android:layout_alignParentTop="true"
android:background="#FFFF8F"
android:choiceMode="singleChoice"
android:divider="@null"
android:dividerHeight="10dp"
android:focusable="false"
android:focusableInTouchMode="false" >
</ListView>

</RelativeLayout>

No comments:

Post a Comment