PowenKo, Android, Tutorial 047-2, Layout, iphone style table

September 1, 2011   ·   0 Comments

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/relativeLayout1" android:layout_height="wrap_content" 
    android:layout_width="fill_parent"
    android:background="#ffffff">

<LinearLayout 
	android:layout_marginLeft="16dip"
	android:layout_marginRight="16dip"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >
    
    
    <TextView  
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:text="area:"
    android:textColor="#4c566c"
    android:textSize="16dip"
    />
    <LinearLayout android:layout_height="wrap_content" android:layout_width="fill_parent" android:background="@drawable/corner" android:id="@+id/LinearLayout01" android:orientation="vertical">
        <TextView android:layout_height="wrap_content" android:text="area:" android:layout_width="fill_parent" android:textSize="16dip" android:textColor="#4c566c"></TextView>
        <ImageView android:src="@drawable/corner" android:layout_height="2dip" android:layout_width="fill_parent" android:id="@+id/ImageView01"></ImageView>
        <RelativeLayout android:id="@+id/RelativeLayout01" android:layout_height="35dip" android:layout_width="fill_parent" android:background="#ffffff">
            <TextView android:id="@+id/TextView01" android:text="1111111" android:layout_width="wrap_content" android:textSize="16dip" android:layout_centerVertical="true" android:layout_alignParentLeft="true" android:textColor="#4c566c" android:layout_height="wrap_content"></TextView>
            <ImageButton android:src="@drawable/icon" android:id="@+id/ImageButton01" android:layout_alignParentRight="true" android:layout_centerVertical="true" android:layout_width="28dip" android:layout_height="28dip"></ImageButton>
        </RelativeLayout>
        <ImageView android:src="@drawable/corner" android:layout_height="2dip" android:layout_width="fill_parent" android:layout_marginTop="1dip" android:id="@+id/ImageView01"></ImageView>
        <RelativeLayout android:id="@+id/RelativeLayout01" android:layout_height="35dip" android:layout_width="fill_parent" android:background="#ffffff">
            <ScrollView android:id="@+id/ScrollView01" android:layout_toLeftOf="@+id/ImageButton01" android:layout_width="fill_parent" android:layout_height="fill_parent">
                <LinearLayout android:layout_width="fill_parent" android:id="@+id/LinearLayout02" android:layout_height="fill_parent">
                    <TextView android:id="@+id/TextView01" android:layout_height="fill_parent" android:text="area:1231231231231 123 12 12 12312 31231231  123 12 12 12312 31231231  123 12 12 12312 31231231  123 12 12 12312 31231231  123 123" android:layout_width="fill_parent" android:textSize="16dip" android:textColor="#4c566c"></TextView>
                </LinearLayout>
            </ScrollView>
            <ImageButton android:src="@drawable/icon" android:id="@+id/ImageButton01" android:layout_alignParentRight="true" android:layout_centerVertical="true" android:layout_width="28dip" android:layout_height="28dip"></ImageButton>
        </RelativeLayout>
        <ImageView android:src="@drawable/corner" android:layout_height="2dip" android:layout_width="fill_parent" android:layout_marginTop="1dip" android:id="@+id/ImageView01"></ImageView>
    </LinearLayout>
<TextView  
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:text="area:"
    android:textColor="#4c566c"
    android:textSize="16dip"
    />
    <LinearLayout android:background="@drawable/corner"  
        android:layout_height="wrap_content" 
        android:layout_width="fill_parent" 
        android:orientation="vertical"
        android:id="@+id/imageView1">
    <!-- line b1  --> 
   <TextView  
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:text="area:"
    android:textColor="#4c566c"
    android:textSize="16dip"
    />
   <ImageView android:src="@drawable/corner" android:layout_height="2dip" android:layout_width="fill_parent" android:id="@+id/imageView2"></ImageView>
  
  
  <!-- line b2  -->
   <RelativeLayout android:id="@+id/RelativeLayout01" android:layout_height="35dip" android:layout_width="fill_parent" android:background="#ffffff">
            <TextView android:id="@+id/TextView01" android:text="1111111" android:layout_width="wrap_content" android:textSize="16dip" android:layout_centerVertical="true" android:layout_alignParentLeft="true" android:textColor="#4c566c" android:layout_height="wrap_content"></TextView>
            <ImageButton android:src="@drawable/icon" android:id="@+id/ImageButton01" android:layout_alignParentRight="true" android:layout_centerVertical="true" android:layout_width="28dip" android:layout_height="28dip"></ImageButton>
        </RelativeLayout>
 	<ImageView android:src="@drawable/corner" android:layout_height="2dip"  android:layout_marginTop="1dip" android:layout_width="fill_parent" android:id="@+id/imageView2"></ImageView>
  
 
    <!-- line b3  -->
    <RelativeLayout android:id="@+id/RelativeLayout01" android:layout_height="35dip" android:layout_width="fill_parent" android:background="#ffffff">
            <TextView android:id="@+id/TextView01" android:text="1111111" android:layout_width="wrap_content" android:textSize="16dip" android:layout_centerVertical="true" android:layout_alignParentLeft="true" android:textColor="#4c566c" android:layout_height="wrap_content"></TextView>
            <ImageButton android:src="@drawable/icon" android:id="@+id/ImageButton01" android:layout_alignParentRight="true" android:layout_centerVertical="true" android:layout_width="28dip" android:layout_height="28dip"></ImageButton>
        </RelativeLayout>
 	<ImageView android:src="@drawable/corner" android:layout_height="2dip"  android:layout_marginTop="1dip" android:layout_width="fill_parent" android:id="@+id/imageView2"></ImageView>
   
    <!-- line   b4-->
    
  <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/relativeLayout1" android:layout_height="60dip" 
    android:layout_width="fill_parent"
    android:background="#ffffff">
	     
	     
	     <ScrollView android:id="@+id/scrollView1"  android:layout_toLeftOf="@+id/imageButton1" android:layout_height="fill_parent" android:layout_width="fill_parent">
 			<LinearLayout android:id="@+id/linearLayout1" android:layout_width="fill_parent" android:layout_height="fill_parent">
		 		<TextView  
			    android:id="@+id/textView1"
			   
			    android:layout_width="fill_parent" 
			    android:layout_height="fill_parent" 
			    android:text="area:1231231231231 123 12 12 12312 31231231  123 12 12 12312 31231231  123 12 12 12312 31231231  123 12 12 12312 31231231  123 123"
			    android:textColor="#4c566c"
			    android:textSize="16dip"	   
			    android:layout_centerVertical="true"
			    />
 			</LinearLayout>
 		 </ScrollView>
    </RelativeLayout>
 	<ImageView android:src="@drawable/corner" android:layout_height="2dip"  android:layout_marginTop="1dip" android:layout_width="fill_parent" android:id="@+id/imageView2"></ImageView>
   
      
    
    <!-- line   -->
    
 	
  
 
 
 
 
    </LinearLayout>
    
</LinearLayout>
</RelativeLayout>

res\drawable\corner.xml

<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <stroke android:width="1dp" android:color="#0073bc" />
    <padding android:left="7dip" android:top="7dip"
            android:right="7dip" android:bottom="7dip" />
    <corners android:radius="25dip" />
    <solid/>
</shape>

sample code:
Tutorial_UI_Table_rounded_corners

shareShare on FacebookShare on Google+Share on LinkedInEmail this to someonePrint this pageBuffer this pageDigg thisFlattr the authorShare on RedditPin on PinterestShare on StumbleUponShare on TumblrTweet about this on Twitter

By


Readers Comments (0)


You must be logged in to post a comment.

PowenKo’s Online Store

powenko_arduinoBook
Android7

Amazon

adsbygoogle

Recent Posts

Categories

Amazon