2
我需要你的幫助。基本上我創建了一個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>
plz詳細說明您的問題是非常不清楚的... – Richa
只要把你想要的截圖。我們會更好地幫助你。另外嘗試把你正在使用的XML代碼。 –
你想做什麼?如果你想滾動Edittext中的文本,然後讓Edittext的高度允許多行,然後查看然後再嘗試。 –