1. Introducing Channels - a new way to chat with other Android users!
    Dismiss Notice

Need help with HorizontalScrollView


Last Updated:

  1. totsie

    totsie New Member This Topic's Starter

    Joined:
    Jan 21, 2010
    Messages:
    3
    Likes Received:
    0
    Hope someone can help me with my very simple problem.

    I have been trying to implement a horizontalScrollView. Here is my sample code.

    Code (Text):
    1. <HorizontalScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    2.     android:id="@+id/scrollview"
    3.     android:layout_width="fill_parent"
    4.     android:layout_height="fill_parent" >
    5.  
    6.   <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    7.         android:orientation="horizontal"
    8.         android:layout_width="fill_parent"
    9.         android:layout_height="fill_parent" >
    10.  
    11.         <ImageView
    12.             android:src="@drawable/icon"
    13.             android:layout_width="wrap_content"
    14.             android:layout_height="wrap_content"/>
    15.        
    16.     </LinearLayout>
    17. </HorizontalScrollView>
    I intend to add about 8 ImageViews in my linear horizontal layout ( have shown only 1 for ease of reading), and be able to scroll through them using key presses.

    This code just doesn't run on the emulator though. I get errors like "Application <activity name> has stopped unexpectedly. Please try again later"

    Can anyone help me?

    -- Totsie
     

    Advertisement
  2. totsie

    totsie New Member This Topic's Starter

    Joined:
    Jan 21, 2010
    Messages:
    3
    Likes Received:
    0

Share This Page

Loading...