How to Scroll to Top of Long Scrollview Layout

ScrollView goes on top of another layout Android

Follow these in simple way:

  1. You need to use a fixed height for the parent, i.e., <RelativeLayout>.
  2. Set the height of the ScrollView to match_parent.
  3. Make sure you put everything inside a LinearLayout.

Finally you would end up with this:

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
</RelativeLayout>
</LinearLayout>

Focus ScrollView On Top Of Page in android

Vipin is correct in that you can't do a listview inside a scroll view. You could also setup a tablelayout that is made dynamic in Java based off how many items are in your cursor (for loop).

So in other words, setup your XML with a scroll view. Add items to it that will show at the top, then at bottom put your table. Build table in Java with buildRow(). Then call it after you call your setContentView(R.layout.xmllayout);

ScrollView - How to scroll down while designing layout in Eclipse?

You can change screen size to custom..
try this..
click on current screen button, and select "Add Custom", then scroll down and select Custom and click "New" in right top corner..
Then write your custom size for screen and click "OK", then again "OK"..
Afterward again click on your current screen button and select your custom size.. Done!
Hope helped!

Be sure that this buttons is selected..
Sample Image



Related Topics



Leave a reply



Submit