
在我开始活动后,我无法向下滚动以查看下面定义的xml中的其他按钮和选项.
有谁知道如何使这个可滚动?
<?xml version="1.0" enCoding="utf-8"?><linearLayout xmlns:androID="http://schemas.androID.com/apk/res/androID" androID:layout_height="wrap_content" androID:layout_wIDth="fill_parent" androID:background="#000044" androID:isScrollContainer="true" androID:orIEntation="vertical"> <TextVIEw androID:ID="@+ID/Title" androID:text="@string/Title" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:textcolor="#ffffff"/> <EditText androID:ID="@+ID/editTitle" androID:text="" androID:layout_wIDth="fill_parent" androID:layout_height="wrap_content"/> <TextVIEw androID:ID="@+ID/description" androID:text="@string/description" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:textcolor="#ffffff"/> <EditText androID:ID="@+ID/editDescription" androID:text="" androID:layout_wIDth="fill_parent" androID:layout_height="wrap_content"/> <TextVIEw androID:ID="@+ID/location" androID:text="@string/location" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:textcolor="#ffffff"/> <EditText androID:ID="@+ID/editLocation" androID:text="" androID:layout_wIDth="fill_parent" androID:layout_height="wrap_content"/> <TextVIEw androID:ID="@+ID/startTime" androID:text="@string/startTime" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:textcolor="#ffffff"/> <DatePicker androID:ID="@+ID/DatePicker01" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" /> <TimePicker androID:ID="@+ID/TimePicker01" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content"/> <TextVIEw androID:ID="@+ID/endTime" androID:text="@string/endTime" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:textcolor="#ffffff"/> <DatePicker androID:ID="@+ID/DatePicker02" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" /> <TimePicker androID:ID="@+ID/TimePicker02" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content"/> <button androID:ID="@+ID/buttonCreate" androID:text="Create" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content"/></linearLayout>我的班级代码是
package com.example.blah;import androID.app.Activity;import androID.os.Bundle;public class example extends Activity { /** Called when the activity is first created. */ @OverrIDe public voID onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentVIEw(R.layout.main); }}解决方法:
将您的布局放在ScrollView中.
总结以上是内存溢出为你收集整理的android – 如何使LinearLayout可滚动?全部内容,希望文章能够帮你解决android – 如何使LinearLayout可滚动?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)