Reputation: 239
I may be really thick here but is it possible to have a scroll view that has say a 100 pixel margin top and bottom so that the contents just scrolls in that area and not into the top and bottom margin?
whatever I try when I scroll the content it scrolls into the top and bottom margins
Something like a scroll able text box?
Any Ideas
Mark
Upvotes: 0
Views: 3758
Reputation: 26198
You can use padding
instead of margin
that have a padding of 100px top and bottom
sample:
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/scrollView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:paddingBottom="100dp"
android:paddingTop="100dp" >
Upvotes: 3