2012-01-25 204 views
2

enter image description here滚动视图滚动布局内?

我需要你的帮助。基本上我创建了一个scrollView作为一个活动的父级布局。现在我需要在活动中添加很多小部件,包括一个包含大文本值的edittext,这个文本值也是可滚动的,但是我的文本在编辑文本中不能顺利滚动?我需要一个像小部件文本区域,显示我的XML代码以下的标签

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="vertical" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    > 
    <LinearLayout 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:orientation="vertical" 
    android:background="#498BF4"> 
<TextView 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:text="Registration" 
    android:gravity="center_horizontal" 
    android:textSize="20dip"/> 
    </LinearLayout> 

    <ScrollView 
    android:id="@+id/scroll" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    > 

    <LinearLayout 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:orientation="vertical" 
    > 
    <TextView 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:text="User_id:*" 
    android:textSize="15dip"/> 
    <EditText 
    android:layout_width="fill_parent" 
    android:layout_height="40dip" 
    android:id="@+id/user"> 
    </EditText> 
    <TextView 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:text="FirstName:*" 
    android:textSize="15dip"/> 
    <EditText 
    android:layout_width="fill_parent" 
    android:layout_height="40dip" 
    android:id="@+id/fname"> 
    </EditText> 
    <TextView 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:text="LastName:*" 
    android:textSize="15dip"/> 
    <EditText 
    android:layout_width="fill_parent" 
    android:layout_height="40dip" 
    android:id="@+id/lname"> 
    </EditText> 
    <TextView 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:text="Email:*" 
    android:textSize="15dip"/> 
    <EditText 
    android:layout_width="fill_parent" 
    android:layout_height="40dip" 
    android:id="@+id/email"> 
    </EditText> 
    <TextView 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:text="Currency:*" 
    android:textSize="15dip"/> 
    <Spinner 
    android:id="@+id/spinner1" 
    android:layout_width="fill_parent" 
    android:layout_height="40dip"> 
    </Spinner> 
    <TextView 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:text="Date of Birth:*" 
    android:textSize="15dip"/> 
    <EditText 
    android:layout_width="fill_parent" 
    android:layout_height="40dip" 
    android:id="@+id/dob"> 
    </EditText> 
    <LinearLayout 
    android:id="@+id/agepermission" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:orientation="vertical" 
    android:visibility="gone"> 
    <EditText 
    android:layout_width="fill_parent" 
    android:layout_height="150dip" 
    android:id="@+id/ageterms" 

    android:maxLines="10" 
    android:textSize="10dip" 
    android:text="@string/hello" 
    > 
    </EditText> 
    <CheckBox 
    android:text="I have permission to use the website from parent/guardian.*" 
    android:id="@+id/checkBox1" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content"> 
    </CheckBox> 
    <TextView 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:text="Parent Name:*" 
    android:textSize="15dip"/> 
    <EditText 
    android:layout_width="fill_parent" 
    android:layout_height="40dip" 
    android:id="@+id/pname"> 
    </EditText> 
    <TextView 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:text="Parent Email:*" 
    android:textSize="15dip"/> 
    <EditText 
    android:layout_width="fill_parent" 
    android:layout_height="40dip" 
    android:id="@+id/pemail"> 
    </EditText> 
    </LinearLayout> 

<TextView 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:text="Terms and conditions:*" 
    android:textSize="15dip"/> 

    <EditText 
    android:layout_width="fill_parent" 
    android:layout_height="200dip" 
    android:id="@+id/terms" 
    ![android:text="i need your help. Basically I created a scrollView as a parent layout of an activity . Now i need to add many widgets inside the activity including an edittext containing large text values set inside this edittext which is also scrollable , but my text inside an edit text not scrolling smoothly? i need text area like widgets i need your help. Basically I created a scrollView as a parent layout of an activity . Now i need to add many widgets inside the activity including an edittext containing large text values set inside this edittext which is also scrollable , but my text inside an edit text not scrolling smoothly? i need text area like widgets i need your help. Basically I created a scrollView as a parent layout of an activity . Now i need to add many widgets inside the activity including an edittext containing large text values set inside this edittext which is also scrollable , but my text inside an edit text not scrolling smoothly? i need text area like widgets i need your help. Basically I created a scrollView as a parent layout of an activity . Now i need to add many widgets inside the activity including an edittext containing large text values set inside this edittext which is also scrollable , but my text inside an edit text not scrolling smoothly? i need text area like widgets"][2] 
    android:inputType="textMultiLine" 
    android:textSize="10dip" 
    > 
    </EditText> 
    <TextView 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:text="By clicking on 'Sign Up' button below you are agreeing to the Terms of Service above and both the Program Policy and the Privacy Policy." 
    android:textSize="15dip"/> 
    <Button 
    android:text="Sign Up" 
    android:id="@+id/button1" 
    android:layout_width="wrap_content" 
    android:layout_height="40dip" 
    > 
    </Button> 
    </LinearLayout> 
    </ScrollView> 
    </LinearLayout> 
+0

plz详细说明您的问题是非常不清楚的... – Richa

+0

只要把你想要的截图。我们会更好地帮助你。另外尝试把你正在使用的XML代码。 –

+0

你想做什么?如果你想滚动Edittext中的文本,然后让Edittext的高度允许多行,然后查看然后再尝试。 –

回答

0

使用您的EditText,如果输入多

android:inputType="textMultiLine" 
0
我在这里有同样的问题

到目前为止,我知道唯一的解决方案是在EditText获得焦点时禁用ScrollView的滚动。