Friday, July 19, 2013

Divider

activity_main.xml
---------------------
<RelativeLayout 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" >

    <LinearLayout 
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:id="@+id/llTopBar"
        android:orientation="horizontal"
     
        android:divider="#00ff00"
        android:dividerPadding="5dip"
        android:showDividers="middle"
        style="?android:attr/listSeparatorTextViewStyle"
       >

        <Button
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:text="Button1" />
            <Button
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:text="Button2"
             />

            <ImageView
                android:id="@+id/imageView1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/ic_launcher" />

    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content" 
        android:layout_marginTop="60dip"
        android:divider="#990000"
        android:dividerPadding="5dip"
        android:showDividers="middle"
style="?android:attr/listSeparatorTextViewStyle">
        <Button
            android:id="@+id/button3"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Button3" />

        <Button
            android:id="@+id/button4"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Button4" />

    </LinearLayout>

</RelativeLayout>


No comments:

Post a Comment