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
Post a Comment