【发布时间】:2014-12-06 14:55:43
【问题描述】:
我的程序中有 40 个切换按钮,我想为每个按钮添加 40 个文本视图。我需要让我的 TextView 和 Toggle 按钮可滚动。我该怎么做?有人可以帮帮我吗??
【问题讨论】:
标签: android textview android-scrollview
我的程序中有 40 个切换按钮,我想为每个按钮添加 40 个文本视图。我需要让我的 TextView 和 Toggle 按钮可滚动。我该怎么做?有人可以帮帮我吗??
【问题讨论】:
标签: android textview android-scrollview
在您的 xml 中添加以下内容
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<!-- Here you put the rest of your current view...Any layout can be placed within the scrollview and this will be scrollable-->
</ScrollView>
【讨论】: