Я добавляю ScrollView
и несколько TextView
вместе. Я заполняю данные с помощью веб-службы (данные php/mysql с сервера). Все в порядке, кроме одного вопроса. Когда пользователь прокручивает страницу/действие, прокрутка не такая гладкая, как listview
.ScrollView не плавно прокручивается
Я отправляю мой XML здесь:
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:focusable="true"
android:id="@+id/scrolFullText"
tools:context=".FullText" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<TextView
android:id="@+id/HEAD"
android:text="@string/HEAD"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="20sp"
android:textColor="@color/blue"
/>
<TextView
android:id="@+id/WRITER"
android:text="@string/WRITER"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="18sp"
android:textColor="@color/darkgreen"
/>
<TextView
android:id="@+id/CATEGORY"
android:text="@string/CATEGORY"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingTop="6dp"
/>
<TextView
android:id="@+id/TEXT"
android:text="@string/TEXT"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingTop="6dp"
/>
</LinearLayout>
</ScrollView>
Как я могу сделать мой свиток немного ровнее?
Не могли бы вы опубликовать свой код адаптера? Может быть, что-то делать, как вы заполняете свой scrollview –
Я просто использую AyncTask и устанавливаю свой текст с помощью 'textview.setText (DataFromServer)'; –