android - ScrollBy() is not working -


as title

i have fragment layout

<scrollview xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/host_profile_scroll_view" android:layout_width="match_parent" android:layout_height="match_parent" android:fillviewport="true" > </scrollview> 

declare scrolview:

 content = (scrollview) rootview.findviewbyid(r.id.host_profile_scroll_view); 

and set on click listener button

public void onclick(view v) { content.scrollby(0, +20); system.out.println(content.canscrollvertically(+20)); } 

but not working @ , sysout comman print out "false". question cause canscrollvertically false result , how resolved . in advance !

is content of scrollview scrollable? mean code wrote, content of scrollview should have height @ least 20px greater height of scrollview.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -