android - ScrollView how to scroll to bottom of another view -
how can scroll linearlayout in scrollview bottom of view?
i have calendar imageview @ top of view. underneath there scrollview contain list of events month. scrollview contains several linearlayouts detail events month. when user selects event touching button in linear layout re-position current linearlayout top of scrollview, how can accomplish this?
below brief snippet of layout looks brevity.
<linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/cirlinlaycontainer" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/bg_calendar"> <relativelayout> <button android:id="@+id/calleft" android:background="@drawable/btn_arrowleft_dwn"/> <button android:id="@+id/calright" android:background="@drawable/cal_rightnav_button"/> <imageview android:src="@drawable/cal_september" android:layout_width="match_parent" android:layout_centerhorizontal="true" android:layout_height="wrap_content" /> </relativelayout> <scrollview xmlns:foo="http://schemas.android.com/apk/res/com.demo.android" android:layout_width="match_parent" android:layout_height="fill_parent" android:id="@+id/septembercalendarscroller"> <linearlayout android:id="@+id/sepeventlayout01"/> <linearlayout android:id="@+id/sepeventlayout02"/> <linearlayout android:id="@+id/sepeventlayout03"/> <linearlayout android:id="@+id/sepeventlayout04"/> </scrollview> </linearlayout>
you measure height of linearlayout elements , use scrollview.scrollto() position scroll view accordingly.
Comments
Post a Comment