I am trying to copy a Pie Chart from sample which I have downloaded from internet and add it in my project but i am not getting the colors
This Actual view of downloaded source code
https://goo.gl/o27nsQ
this is what I am getting.
https://goo.gl/UpQojP
Original Code
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:custom="http://schemas.android.com/apk/res/com.benliger.chart"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:layout_weight="0.6"
android:layout_marginTop="7dp" >
<com.benliger.chart.view.PieDonutChart
android:id="#+id/pie"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#android:color/transparent"
android:padding="10dp"
custom:colorCircleInside="#android:color/white"
custom:highlightStrength="1.15"
custom:ratioCircleInside="0.8" />
</LinearLayout>
<Button
android:id="#+id/button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:text="#string/change_data" />
<LinearLayout
android:id="#+id/seekBarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="#+id/button"
android:gravity="center_vertical" >
<TextView
android:id="#+id/editText1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/radius" />
<SeekBar
android:id="#+id/seekBar"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:max="100"
android:progress="80" />
</LinearLayout>
My code
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:custom="http://schemas.android.com/apk/res/com.example.apptitude"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:layout_weight="0.6"
android:layout_marginTop="7dp" >
<com.example.chart.view.PieDonutChart
android:id="#+id/pie"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#android:color/transparent"
android:padding="10dp"
custom:colorCircleInside="#android:color/white"
custom:highlightStrength="1.15"
custom:ratioCircleInside="0.8" />
</LinearLayout>
<Button
android:id="#+id/button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:text="#string/change_data" />
<LinearLayout
android:id="#+id/seekBarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="#+id/button"
android:gravity="center_vertical" >
<TextView
android:id="#+id/editText1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/radius" />
<SeekBar
android:id="#+id/seekBar"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:max="100"
android:progress="80" />
</LinearLayout>
Related
Iam developing an android application where i need scrollable view for particular child layout which is scrollable if it possible please suggest below are pictorial explanation.
below are code for explanation.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="#+id/activity_main"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
tools:context="android.xyz.com.xyz.MainActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="3dp"
android:orientation="vertical">
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="100dp"
android:orientation="vertical"
android:scrollbars="vertical">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:scaleType="fitXY"
android:src="#drawable/ntitled" />
</LinearLayout>
</ScrollView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="100dp"
android:orientation="vertical">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:scaleType="fitXY"
android:src="#drawable/ic_tp"
/>
</LinearLayout>
</LinearLayout>
Edit1: For the clarification.
You can do that adding code like this in your .xml layout:
<?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:id="#+id/LinearLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/nreg" />
<EditText
android:id="#+id/txtReg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="5"
android:ems="10"
android:inputType="number">
<requestFocus />
</EditText>
<TextView
android:id="#+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/val" />
<EditText
android:id="#+id/txtVal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ems="10"
android:inputType="text"/>
</LinearLayout>
<HorizontalScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<Button
android:id="#+id/btnInsertar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/ins" />
<Button
android:id="#+id/btnActualizar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/act" />
<Button
android:id="#+id/btnEliminar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/elim" />
<Button
android:id="#+id/btnConsultar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/cons" />
<Button
android:id="#+id/gaf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/cons" />
<Button
android:id="#+id/asd"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/cons" />
</LinearLayout>
</HorizontalScrollView>
</LinearLayout>
I have the following layout
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ImageView
android:id="#+id/imageView1"
android:layout_gravity="center"
android:layout_width="200dip"
android:layout_height="200dip"
/>
<ProgressBar
android:id="#+id/progressBar1"
android:layout_width="wrap_content"
android:layout_gravity="center"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_marginLeft="10dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:id="#+id/tview_total"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right"
android:text="Total Files Processed:" />
<TextView
android:id="#+id/tview_success"
android:layout_width="match_parent"
android:gravity="right"
android:layout_height="wrap_content"
android:text="Successfully Processed:" />
<TextView
android:id="#+id/tview_error"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right"
android:text="Error Processing:" />
</LinearLayout>
<LinearLayout
android:id="#+id/llBottomContainer2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_gravity="bottom"
android:gravity="bottom"
android:padding="5dp" >
<Button
android:id="#+id/proceed2"
style="#style/btn"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:background="#drawable/btn_sel"
android:text="Proceed" />
</LinearLayout>
</LinearLayout>
I want to align the Button on the bottom of the screen.I tried setting
android:layout_gravity="bottom"
android:gravity="bottom"
Does not work.What i'm i doing wrong?
try this :
<LinearLayout
android:id="#+id/llBottomContainer2"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:layout_gravity="bottom"
android:gravity="bottom"
android:padding="5dp" >
try this layout :
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ImageView
android:id="#+id/imageView1"
android:layout_width="200dip"
android:layout_height="200dip"
android:layout_gravity="center" />
<ProgressBar
android:id="#+id/progressBar1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dip"
android:orientation="vertical" >
<TextView
android:id="#+id/tview_total"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right"
android:text="Total Files Processed:" />
<TextView
android:id="#+id/tview_success"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right"
android:text="Successfully Processed:" />
<TextView
android:id="#+id/tview_error"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right"
android:text="Error Processing:" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="#+id/llBottomContainer2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:gravity="bottom"
android:orientation="vertical"
android:padding="5dp" >
<Button
android:id="#+id/proceed2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:text="Proceed" />
</LinearLayout>
</RelativeLayout>
where android:layout_alignParentBottom="true" is key parameter.
Happy coding..
android:gravity="bottom"
Then make the gravity of layout or your button to the bottom
My images. such as
when i write something then show image like
But i want write something and show that also.
My Codes :
<?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="match_parent"
android:layout_height="match_parent"
android:background="#ffffff" >
<!-- Header aligned to top -->
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<include
android:id="#+id/header"
layout="#layout/header" >
</include>
<!-- Footer aligned to bottom -->
<!-- Content below header and above footer -->
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<RelativeLayout
android:id="#+id/content"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<LinearLayout
android:id="#+id/locationLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:gravity="center"
android:orientation="vertical" >
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="UbicaciĆ³n"
android:textAppearance="?android:attr/textAppearanceMedium" />
<Spinner
android:id="#+id/locationSpinner"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:id="#+id/deprtmentLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/locationLayout"
android:layout_marginTop="10dp"
android:gravity="center"
android:orientation="vertical" >
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Departamento"
android:textAppearance="?android:attr/textAppearanceMedium" />
<Spinner
android:id="#+id/departmentSpinner"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:id="#+id/folderpathLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/deprtmentLayout"
android:layout_marginTop="10dp"
android:gravity="center"
android:orientation="vertical" >
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Carpeta"
android:textAppearance="?android:attr/textAppearanceMedium" />
<Spinner
android:id="#+id/folderSpinner"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:id="#+id/locatioRnLayoutT"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/folderpathLayout"
android:layout_marginBottom="5dp"
android:layout_marginTop="5dp"
android:gravity="center|end"
android:orientation="vertical" >
<TextView
android:id="#+id/textView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="left"
android:paddingLeft="5dp"
android:text="comentario"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/etComments"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="top|left"
android:hint="escribir comentario aquĆ"
android:inputType="textMultiLine"
android:lines="8"
android:maxLines="10"
android:minLines="4"
android:scrollbars="vertical" >
<requestFocus />
</EditText>
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
android:id="#+id/footer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="#0c95d4" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:gravity="center" >
<ImageView
android:id="#+id/backImageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:background="#drawable/img_selector"
android:clickable="true"
android:onClick="doActions"
android:src="#drawable/back_black" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1" />
<ImageView
android:id="#+id/reportOk"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:background="#drawable/img_selector"
android:clickable="true"
android:onClick="doActions"
android:src="#drawable/right_button_white" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:background="#drawable/img_selector"
android:clickable="true"
android:onClick="doActions" />
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
</LinearLayout>
And header.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_alignParentTop="true"
android:gravity="center"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:gravity="center"
android:orientation="horizontal"
android:weightSum="5" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center" >
<TextView
android:id="#+id/tvHeader"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toLeftOf="#+id/layout"
android:layout_weight="4"
android:paddingLeft="8dp"
android:text="Fixed Header"
android:textColor="#33b5e5"
android:textSize="12sp" />
<RelativeLayout
android:id="#+id/layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true" >
<ImageView
android:id="#+id/iHome"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:background="#drawable/img_selector"
android:clickable="true"
android:onClick="goToHome"
android:src="#drawable/home_black" />
<ImageView
android:id="#+id/ilogout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_toRightOf="#+id/iHome"
android:background="#drawable/img_selector"
android:clickable="true"
android:onClick="logoutAction"
android:paddingRight="8dp"
android:src="#drawable/logout_black" />
</RelativeLayout>
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" >
<View
android:layout_width="match_parent"
android:layout_height="3dip"
android:background="#33b5e5" />
</LinearLayout>
</RelativeLayout>
when i write something on comment field then show pop-up windows for writing input then i don't show any text what i do write on EditText. How to show input field when i write some thing. please help me.
Set appropriate windowSoftInputMode for your activity in the manifest. adjustPan is probably what you're looking for there.
I'm Trying to get the buttons to go under the white box. In the java file I am adding a special view to the id:ViewLayout. I have tried putting the buttons after the Framelayout, but they dont appear on screen....
<TextView
android:id="#+id/tvClock"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="12:00"
android:textColor="#android:color/white"
android:textSize="100dp" />
<FrameLayout
android:id="#+id/Container"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<RelativeLayout
android:id="#+id/ViewLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
</RelativeLayout>
<Button
android:id="#+id/bUnlock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Unlock" />
<Button
android:id="#+id/bPin"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="PIN" />
</FrameLayout>
Thanks!
Try this one.
<?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="fill_parent"
android:layout_height="fill_parent"
android:background="#android:color/black"
android:orientation="vertical" >
<TextView
android:id="#+id/tvClock"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="12:00"
android:textColor="#android:color/white"
android:textSize="100dp" />
<LinearLayout
android:id="#+id/Container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.58" >
<LinearLayout
android:id="#+id/ViewLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >
</LinearLayout>
</LinearLayout>
<TextView
android:id="#+id/tvClock"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="12:00"
android:textColor="#android:color/white"
android:textSize="100dp" />
<RelativeLayout
android:id="#+id/Container"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<RelativeLayout
android:id="#+id/ViewLayout"
android:layout_width="match_parent"
android:layout_height="100dp" >
</RelativeLayout>
<Button
android:id="#+id/bUnlock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Unlock"
android:layout_below="#id/ViewLayout"
/>
<Button
android:id="#+id/bPin"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="PIN"
android:layout_below="#id/bUnlock"/>
</RelativeLayout>
Try RelativeLayout instead of framelayout.
This may help you:
<TextView
android:id="#+id/tvClock"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#000000"
android:gravity="center"
android:text="12:00"
android:textColor="#android:color/white"
android:textSize="100dp"
android:layout_weight="2" />
<LinearLayout
android:id="#+id/Container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_weight="1">
<RelativeLayout
android:id="#+id/ViewLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1" >
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="horizontal" >
<Button
android:id="#+id/bUnlock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Unlock" />
<Button
android:id="#+id/bPin"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="PIN" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
I am trying to make a layout in android according to the image however whatever i try is just wrong.
Here's my code below.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:padding="8dp" >
<TextView
android:id="#+id/bottomright"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textColor="#E5E5E5"
android:layout_weight="1"
android:gravity="bottom|right"
android:textSize="15sp"
android:text="#string/bottomright" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:padding="8dp" >
<TextView
android:id="#+id/left"
android:layout_width="154dp"
android:layout_height="102dp"
android:layout_marginLeft="6dp"
android:layout_marginRight="6dp"
android:gravity="center|left"
android:layout_weight="1"
android:textSize="30sp"
android:adjustViewBounds="true"
android:maxLines="7"
android:text="" />
<TextView
android:id="#+id/topright"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginRight="6dp"
android:gravity="top|right"
android:textSize="90sp"
android:text="topright" />
</LinearLayout>
</LinearLayout>
And here what i want to get. Maybe it is wrong to use LinearLayout? Better user Relative?
Can someone help me with this?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:baselineAligned="false"
android:orientation="horizontal"
android:weightSum="4" >
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="3"
android:orientation="vertical" >
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical"
android:weightSum="2" >
<TextView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:gravity="center" />
<TextView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:gravity="top" />
</LinearLayout>
</LinearLayout>
Creating static xml layout's are very easy. I guess you haven't tried googling yourself.
anyways, with respect to the image, here is the code :-
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
android:id="#+id/textView1"
android:layout_width="350dp"
android:layout_height="fill_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:gravity="center"
android:text="TextView" />
<TextView
android:id="#+id/textView2"
android:layout_width="fill_parent"
android:layout_height="120dp"
android:layout_toRightOf="#+id/textView1"
android:text="TextView3" />
<TextView
android:id="#+id/textView3"
android:layout_width="fill_parent"
android:layout_height="120dp"
android:layout_toRightOf="#+id/textView1"
android:layout_below="#+id/textView2"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:text="TextView3" />
</RelativeLayout>