How can we put scrollview in EditText field in android?
There is Terms&Conditions screen in My application. I am putting Terms&conditions information in EditText field.
My Requirment:
I want to put ScrollView inside EditText to read terms and cond开发者_C百科itions text (since text is modr i need ScrollView in EditText field). How can I do this?
You should't use EditText for reading purposes. Use TextView inside ScrollView:
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fillViewport="true">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:singleLine="false"
android:text="@string/terms_and_conditions" />
</ScrollView>
you can simply display your conditions and terms in a TextView, and to use scrolling ,you can just put your TextView in a ScrollView like this :
<ScrollView android:id="@+id/scrollTerms"
android:layout_width="match_parent"
android:layout_heigth="match_parent"
>
<TextView android:id="@+id/txtTerms"
android:layout_width="match_parent"
android:layout_heigth="wrap_content"
android:text="put your terms and conditions here ..."
>
</ScrollView>
加载中,请稍侯......
精彩评论