【问题标题】:How to scroll content?如何滚动内容?
【发布时间】:2013-07-20 19:52:44
【问题描述】:

我有以下问题:

我需要 18 个按钮,旁边有一个 TextView,顶部有一个 TextView。当然,它们不适合显示器,所以我搜索了这个问题并找到了 ListView 但这对我不起作用,因为我需要 18 个具有不同 ID 的 ButtonsTextViews

我希望你能帮助我。

【问题讨论】:

  • 你能详细说明你需要什么吗???
  • 为什么每个人都需要不同的 id?

标签: android textview android-button android-scrollview


【解决方案1】:

使用 <ScrollView> 注意 <ScrollView> 只有一个直系子女

所以它必须像 :

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="vertical" >
        <!--  your contents  are here  -->
    </LinearLayout>

</ScrollView>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-03-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-07-16
    相关资源
    最近更新 更多