2012-06-22 208 views
0

我正在通过从数据库中获取的值创建图形。所以我的值可以随时更改。 它没有安装在屏幕上,它的屏幕不亮。 你能告诉我如何为此创建水平滚动视图。水平滚动视图绘制图

回答

0

所有这些的TextView和按钮下单水平滚动View..try这样..

<HorizontalScrollView 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content"> 
     <LinearLayout 
      android:orientation="vertical" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content"> 
      <TextView 
       android:layout_width="fill_parent" 
       android:layout_height="wrap_content" 
       android:text="Inside 1st HorizontalScrollView" /> 
      <Button 
       android:text="Button A1" 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content"/> 
      <Button 
       android:text="Button A2" 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content"/> 
     </LinearLayout> 
    </HorizontalScrollView>