안드로이드 개발 질문/답변
(글 수 45,052)
위의 그림에서 보시면 중간에 대화식으로 주고 받는 부분이 있는데요
이게 스크롤을 달았는데 대화가 늘어나도 계속 위에만 가리키고 잇습니다.
대화 가 추가되면 스크롤이 최하단으로 내려가게 하고 싶은데 어떻게 해야하나요? ㅠㅠ
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="150px"
android:id="@+id/scr"
android:scrollbarStyle="insideInset"
android:scrollbarSize="3px"
android:scrollbarDefaultDelayBeforeFade="3000">
스크롤은 xml에서 이렇게 달았구요조언좀 부탁드립니다.
public boolean fullScroll (int direction)
Handles scrolling in response to a "home/end" shortcut press. This method will scroll the view to the top or bottom and give the focus to the topmost/bottommost component in the new visible area. If no component is a good candidate for focus, this scrollview reclaims the focus.
Parameters
FOCUS_UP
to go the top of the view orFOCUS_DOWN
to go the bottomReturns