1

This is part of my Layout:

 <?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/scroll" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/colorGrey20" tools:context=".View.Activities.MainActivity"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:layout_marginTop="24dip" android:orientation="horizontal"> ... 

My ScrollView doesn't scroll to bottom

Screenshot

The last icon and description are never reached. What would I change in my layout?

4 Answers 4

2

use

android:layout_height="fill_parent" 

instead of "wrap_content" in your ScrollView

Sign up to request clarification or add additional context in comments.

Comments

2

Use paddings instead of margins on scrollview and its subviews and scrolling will be correct.

Comments

0

Try this :

<ScrollView android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="2dp" android:id="@+id/scrollview" android:stackFromBottom="true" android:transcriptMode="alwaysScroll"> 

Comments

0

I've had good results replacing

android:layout_height="wrap_content" 

...with this:

android:layout_height="0dp" android:layout_weight="1" 

(I still have problems understanding the root cause.)

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.