I am splitting the screen with 2 linear layouts containing text view and this may contain large number of lines hence using scrolls but the first we lines are scrapped off and cannot view it.
Following is a code snippet
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="200dp"
android:orientation="vertical" >
<ScrollView
android:id="@+id/ScrollView01"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TextView
android:id="@+id/question"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="Question"
android:textSize="20dp" >
</TextView>
</ScrollView>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="250dp"
android:orientation="vertical" >
<ScrollView
android:id="@+id/ScrollView"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TextView
android:id="@+id/answer"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="Answer"
android:textSize="20dp"
android:visibility="invisible" >
</TextView>
</ScrollView>
</LinearLayout>
Rather than going for two seperate ScrollViews you can always opt out for few properties setting in your layout.
Set the
android:maxLinesandandroid:scrollbars = "vertical"property for both the textview’s and then in your corresponding activity do this for both the textview’sHope this helps.You might also want to have a look at this link