I am doing android app. The main activity is a listview. The xml file of the main activity is as following.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="fill_horizontal"
android:paddingBottom="#dimen/activity_vertical_margin"
android:paddingLeft="#dimen/activity_horizontal_margin"
android:paddingRight="#dimen/activity_horizontal_margin"
android:paddingTop="#dimen/activity_vertical_margin"
tools:context=".MainActivity" >
<TabHost
android:id="#android:id/tabhost"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal"
android:orientation="vertical" >
<TabWidget
android:id="#android:id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</TabWidget>
<FrameLayout
android:id="#android:id/tabcontent"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:id="#+id/tab1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<TableRow
android:id="#+id/TableRow01"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_gravity="center"
android:gravity="fill"
android:visibility="gone">
<Button
android:id="#+id/Button01"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="#drawable/ic_action_search"
android:onClick="search" />
<EditText
android:id="#+id/EditText01"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_gravity="fill_horizontal"
android:ems="10"
android:hint="Employer?date?program?"
/>
</TableRow>
</TableLayout>
<ListView
android:id="#+id/taboneviewlist"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1" >
</ListView>
</LinearLayout>
</TabHost>
When we click each item in the list view, data_activity appears. The xml file of the each item (data_activity) in the list view is as following.
<TableLayout xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/TableLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TextView
android:id="#+id/employer"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:gravity="center"
android:textSize="24sp"
android:textStyle="normal|bold" />
<View
android:id="#+id/employer_line"
android:layout_height="4sp"
android:layout_width="fill_parent"
android:background="#FF909090"
android:visibility="gone"/>
<!-- Table: Date -->
<TableRow
android:id="#+id/tableRow2"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginLeft="2dp"
android:layout_marginRight="2dp">
<TextView
android:id="#+id/date_title"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_weight="0.3"
android:gravity="left"
android:text="Time"
android:textSize="20sp"
android:textStyle="normal|bold" />
<TextView
android:id="#+id/date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.7"
android:gravity="right"
android:textColor="#999999"
android:textSize="20sp" />
</TableRow> </TableLayout>
Now the data_activity can not display all the information. The question is how to make the data_activity scroll? Are there any example codes?
Put your top-level view into a ScrollView:
<ScrollView xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TableLayout
android:id="#+id/TableLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent" >
...
</TableLayout>
</ScrollView>
Related
When I run the program works just scroll (4), while others do not work at all of them have shared a long text!!!
If you see all the text of a common format but with different Id.
Please note that all text is a long text that is fed from Java code.
here is my current layout..
<FrameLayout
android:id="#android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#color/tabbackground" >
<ScrollView
android:id="#+id/ScrollView01"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_marginBottom="130dp"
android:fillViewport="true"
android:paddingBottom="10dp"
android:paddingTop="10dp" >
<TextView
android:id="#+id/page1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:gravity="center|top"
android:text="Dummy Text"
android:textSize="18sp" >
</TextView>
</ScrollView>
<ScrollView
android:id="#+id/ScrollView02"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_marginBottom="130dp"
android:fillViewport="true"
android:paddingBottom="10dp"
android:paddingTop="10dp" >
<TextView
android:id="#+id/page2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:gravity="center|top"
android:text="Dummy Text"
android:textSize="18sp" >
</TextView>
</ScrollView>
<ScrollView
android:id="#+id/ScrollView03"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_marginBottom="130dp"
android:fillViewport="true"
android:paddingBottom="10dp"
android:paddingTop="10dp" >
<TextView
android:id="#+id/page3"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:gravity="center|top"
android:text="Dummy Text"
android:textSize="18sp" >
</TextView>
</ScrollView>
<ScrollView
android:id="#+id/ScrollView04"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_marginBottom="130dp"
android:fillViewport="true"
android:paddingBottom="10dp"
android:paddingTop="10dp" >
<TextView
android:id="#+id/page4"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:gravity="center|top"
android:text="Dummy Text"
android:textSize="18sp" >
</TextView>
</ScrollView>
</FrameLayout>
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
tools:context=".Fri"
android:background="#fff"
android:layout_height="match_parent">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="match_parent">
<TextView
android:textSize="16sp"
android:textColor="#000"
android:fadeScrollbars="true"
android:scrollbars="vertical"
android:layout_margin="10dp"
android:textAlignment="viewStart"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:text="#string/mon">
</TextView>
</LinearLayout>
</ScrollView>
</FrameLayout>
I have a ScrollView in that I have a ViewPager with a PagerSlidingTabStrip. In the ViewPager I have a xml file which contains some TextViews with long texts in it. The problem is that the scrollview don't scroll to the end where the last TextViews are of the second xml file are.
First xml with viewPager:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="#+id/recipe_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ScrollView
android:id="#+id/scrollView1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="5.80" >
<LinearLayout
android:id="#+id/recipe_linearLayout_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="5dp"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_marginTop="5dp"
android:background="#android:color/background_light"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="500dp"
android:layout_marginTop="5dp"
android:layout_weight="18"
android:orientation="vertical" >
<com.astuetz.PagerSlidingTabStrip
android:id="#+id/tabs"
android:layout_width="match_parent"
android:layout_height="48dip"
android:background="#drawable/background_tabs" >
</com.astuetz.PagerSlidingTabStrip>
<android.support.v4.view.ViewPager
android:id="#+id/pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >
</android.support.v4.view.ViewPager>
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
Second xml file with the TextViews:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/tools"
android:id="#+id/LinearLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ScrollView
android:id="#+id/scrollView1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="5.80" >
<LinearLayout
android:id="#+id/recipe_linearLayout_desc"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="5dp"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_marginTop="5dp"
android:background="#android:color/background_light"
android:orientation="vertical" >
<TextView
android:id="#+id/textView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:background="#color/red"
android:gravity="center"
android:text="INGREDIENTS"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#color/white" />
<LinearLayout
android:id="#+id/ingLinearLayout"
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_alignParentLeft="true"
android:layout_below="#+id/textView1"
android:layout_marginBottom="5dp"
android:layout_marginTop="5dp"
android:background="#color/white"
android:orientation="vertical" >
<TextView
android:id="#+id/ingTV"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_weight="0.11"
android:maxLines="20"
android:singleLine="false"
android:text="#string/verylongtext"
android:textColor="#color/black" />
</LinearLayout>
<TextView
android:id="#+id/TextView01"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/ingLinearLayout"
android:background="#color/red"
android:gravity="center"
android:text="DESCRIPTION"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#color/white" />
<LinearLayout
android:id="#+id/descLinearLayout"
android:layout_width="match_parent"
android:layout_height="180dp"
android:layout_below="#+id/TextView01"
android:layout_marginBottom="5dp"
android:layout_marginTop="5dp"
android:background="#color/white"
android:orientation="vertical" >
<TextView
android:id="#+id/descTV"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_weight="0.11"
android:maxLines="20"
android:singleLine="false"
android:text="#string/verylongtext"
android:textColor="#color/black" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
This is how it looks when I scroll to the bottom:
And this is how it should look:
I can not find out why it cuts the view and why is it not possible to scroll down until the whole second xml file is displayed?
I am using this ViewPager lib: github.com/astuetz/ViewPagerExtensions
What I am trying to get ::
< I am trying to display same look on both landscape and portrait mode>
What i am currently having ::
< Observe the imageview looks differently in different orientation modes > height of the imageview is more in portrait mode
grid_single.xml
<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="#222222"
android:orientation="vertical"
android:padding="10dp" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#FFFFFF"
android:orientation="vertical" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#E6E6E6"
android:orientation="vertical" >
<ImageView
android:id="#+id/grid_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="10dp"
android:src="#drawable/eleven" >
</ImageView>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#FFFFFF"
android:orientation="vertical" >
<TextView
android:id="#+id/grid_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="10dp"
android:text="Text"
android:textSize="12sp" >
</TextView>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
activity_main.xml
<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"
tools:context=".MainActivity" >
<GridView
android:id="#+id/grid"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:divider="#null"
android:listSelector="#00000000"
android:numColumns="auto_fit" />
</LinearLayout>
Try changing your ImageView xml to this:
<ImageView
android:id="#+id/grid_image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="10dp"
android:scaleType="fitXY"
android:src="#drawable/eleven" >
</ImageView>
You have a good sample of different android:scaleType displays, and how they behave here.
Use this XML instead..
grid_single.xml
<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="wrap_content"
android:background="#222222"
android:orientation="vertical"
android:padding="10dp" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#FFFFFF"
android:orientation="vertical" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#E6E6E6"
android:orientation="vertical" >
<ImageView
android:id="#+id/grid_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="10dp"
android:src="#drawable/eleven" >
</ImageView>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#FFFFFF"
android:orientation="vertical" >
<TextView
android:id="#+id/grid_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="10dp"
android:text="Text"
android:textSize="12sp" >
</TextView>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
My code XML:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#777777"
android:orientation="vertical" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="30dip"
android:layout_alignParentTop="true"
android:gravity="left|bottom"
android:orientation="horizontal" >
<TextView
android:id="#+id/txtTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="00:00:00"
android:textColor="#ffffff" />
</LinearLayout>
<FrameLayout
android:id="#+id/camera_preview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="110dp"
android:background="#000000" >
</FrameLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="150dp"
android:layout_alignParentBottom="true"
android:gravity="center|top"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:gravity="center"
android:orientation="horizontal" >
<Button
android:id="#+id/button_Rotation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="#drawable/my_progress_interminate" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</LinearLayout>
How display TextView txtTime above FrameLayout the same button button_Rotation?
I had fixed by move layout contain TextView down to under Framelayout:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#777777"
android:orientation="vertical" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<FrameLayout
android:id="#+id/camera_preview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="110dp"
android:background="#000000" >
</FrameLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="30dip"
android:layout_alignParentTop="true"
android:gravity="left|bottom"
android:orientation="horizontal" >
<TextView
android:id="#+id/txtTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="00:00:00"
android:textColor="#ffffff" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="150dp"
android:layout_alignParentBottom="true"
android:gravity="center|top"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:gravity="center"
android:orientation="horizontal" >
<Button
android:id="#+id/button_Rotation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="#drawable/my_progress_interminate" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</LinearLayout>
outter linearLayout unless, then in your RelativeLayout
1st RelativeLayou: android:layout_alignParentTop="true", and set an id(#+id/rl)
2nd FrameLayout: android:layout_below="#id/rl"
3rd LinearLayout: android:layout_below="#id/camera_view"
That's all! Good luck!
It is the easiest way to do it:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<FrameLayout
android:id="#+id/fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FAFFD5" >
</FrameLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="90dp"
android:layout_alignParentBottom="true"
android:gravity="center"
android:orientation="vertical"
android:background="#drawable/textlayout_outline"
android:layout_margin="50dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/are_you_looking_for_something" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/tap_here" />
</LinearLayout>
I'm a newbie developer, I created a layout which matches my expectations but I fear that its construction is too complex.
I used many layouts but I don't see how to build a similar layout without mixing linear and relative layouts, is it possible?
How can I simplify this layout?
Thank you for your ideas.
<?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="wrap_content"
android:background="#ffffff" >
<LinearLayout
android:id="#+id/header"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#drawable/black_blue_gradient"
android:paddingBottom="5dip"
android:paddingTop="24dip" >
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayout1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_below="#+id/header" >
<LinearLayout
android:id="#+id/linearlayout01left"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="40"
android:orientation="horizontal" >
<RelativeLayout
android:id="#+id/relativeLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:id="#+id/footer"
android:layout_width="fill_parent"
android:layout_height="8dp"
android:layout_alignParentBottom="true"
android:background="#drawable/b_bgradient" >
</LinearLayout>
<ImageView
android:id="#+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/footer"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:src="#drawable/oranwall_ovosh" />
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:id="#+id/linearlayout02right"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="60"
android:orientation="horizontal" >
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="#E9EEF2"
android:gravity="center_vertical|center_horizontal"
android:text="#string/My_txt"
android:textColor="#535A5F"
android:textSize="14sp" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>
Try it. Don't forget put your background and other resources
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<TableRow
android:id="#+id/header"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#drawable/ic_launcher">
</TableRow>
<TableRow
android:id="#+id/body"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="3">
<LinearLayout
android:id="#+id/linearLayout1"
android:layout_width="wrap_content"
android:layout_height="fill_parent" >
<LinearLayout
android:id="#+id/linearLayout2"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:orientation="vertical" >
<ImageView
android:id="#+id/imageView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:src="#drawable/perm" />
<TableRow
android:id="#+id/footer"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:background="#drawable/ic_launcher" >
</TableRow>
</LinearLayout>
</LinearLayout>
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:gravity="center"
android:text="Medium Text"
android:textAppearance="?android:attr/textAppearanceMedium" />
</TableRow>
</LinearLayout>
There are a few changes I would make:
<?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:background="#ffffff"
android:orientation="vertical" >
<!-- I don't understand the point of this one: -->
<LinearLayout
android:id="#+id/header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#drawable/black_blue_gradient"
android:paddingBottom="5dip"
android:paddingTop="24dip" >
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1" >
<LinearLayout
android:id="#+id/linearlayout01left"
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="0.4"
android:orientation="horizontal" >
<RelativeLayout
android:id="#+id/relativeLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<!-- I don't understand the point of this one -->
<LinearLayout
android:id="#+id/footer"
android:layout_width="match_parent"
android:layout_height="8dp"
android:layout_alignParentBottom="true"
android:background="#drawable/b_bgradient" >
</LinearLayout>
<ImageView
android:id="#+id/imageView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="#+id/footer"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:src="#drawable/oranwall_ovosh" />
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:id="#+id/linearlayout02right"
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="0.6"
android:orientation="horizontal" >
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="#E9EEF2"
android:gravity="center_vertical|center_horizontal"
android:text="#string/My_txt"
android:textColor="#535A5F"
android:textSize="14sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>