1. Check out our app, Forums for Android! Download and leave feedback here!

How to use HorizontalScrollView?

Discussion in 'Application Development' started by Ankit2502, Aug 10, 2010.

  1. Ankit2502

    Ankit2502 Member
    Thread Starter
    15

    Jan 6, 2010
    13
    0
    15
    Android Developer
    Indore
    Hello Friends,
    I have some query regarding HorizontalScrollView, i want to produce a tab like effect on HorizontalScrollView means when i select a particular Tab item of that tab is visible and this whole view is scrollable.Does anybody know how to do this using HorizontalScrollView.....
     

    Advertisement

  2. blundell

    blundell Well-Known Member
    38

    Apr 23, 2010
    125
    17
    38
    Software Engineer
    UK
    Do you just mean:
    Code (Text):
    1.  
    2. <TabHost
    3.         xmlns:android="http://schemas.android.com/apk/res/android"
    4.         xmlns:app="http://schemas.android.com/apk/res/com.blundell"
    5.     android:id="@android:id/tabhost"
    6.     android:layout_width="fill_parent"
    7.     android:layout_height="fill_parent">
    8.         <TabWidget
    9.         android:id="@android:id/tabs"
    10.         android:layout_width="fill_parent"
    11.         android:layout_height="wrap_content"
    12.         />
    13.         <HorizontalScrollView
    14.          android:id="@android:id/tabcontent"
    15.          android:layout_height="fill_parent"
    16.          android:layout_width="fill_parent">
    17.  
    18.                      <!-- Blah contents -->
    19.  
    20.         </HorizontalScrollView >
    21. </TabHost>
    22.  
    This is a tab view with only one tab obviously
     
  3. blundell

    blundell Well-Known Member
    38

    Apr 23, 2010
    125
    17
    38
    Software Engineer
    UK

Share This Page

Loading...