Tuesday, August 23, 2011

Android Horizontal ScrollView Menu Bar

Android Horizontal Scroll View with custom Layout.

Download Scource Code
we can create custom horizontal menu bar... using horizontal scroll view

layout.xml
 <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >
 
    <HorizontalScrollView android:layout_width="fill_parent" android:layout_height="wrap_content">
        <LinearLayout
        android:id="@+id/horizontalMenu"  android:orientation="horizontal"
        android:layout_width="fill_parent" android:layout_height="fill_parent"
        >
            <Button android:text="Button" android:id="@+id/button1"
            android:layout_width="wrap_content" android:layout_height="wrap_content"></Button>
         <TextView android:text="1" android:id="@+id/textView1"
    android:layout_width="100dip"
    android:layout_height="wrap_content"></TextView>
  
     <TextView android:text="2" android:id="@+id/textView1"
    android:layout_width="100dip"
    android:layout_height="wrap_content"></TextView>
     <TextView android:text="3" android:id="@+id/textView1"
    android:layout_width="100dip"
    android:layout_height="wrap_content"></TextView>
     <TextView android:text="4" android:id="@+id/textView1"
    android:layout_width="100dip"
    android:layout_height="wrap_content"></TextView>
        </LinearLayout>
    </HorizontalScrollView>
  
  
</LinearLayout>





No comments:

Post a Comment

Check out this may be help you

Related Posts Plugin for WordPress, Blogger...