在Eclipse中,如果我的最小SDK是10,我可以使布局可滚动吗?

时间:2014-06-10 12:01:43

标签: android eclipse layout android-2.3-gingerbread vertical-scrolling

我的手机运行的是Android 2.3.3。所以我的开发时最低SDK为10.根据Eclipse中的项目创建向导,显然只有一个能够选择除无之外的导航类型。

我希望我的新应用程序可滚动 - 我该怎么做?例如,我可以将我的内容放在布局父元素中的可滚动元素中吗?

2 个答案:

答案 0 :(得分:1)

听起来你需要ScrollView。它也适用于API级别10 ......

答案 1 :(得分:1)

只需使用ScrollView作为布局的父级。

<ScrollView>
     android:layout_width="fill_parent"
     android:layout_height="fill_parent"

     <LinearLayout> 
         // your Layout
     </LinearLayout>

 </ScrollView>