일부보기가있는 ScrollView가 있습니다. ScrollView의 내용 높이가 화면 높이보다 작 으면 마지막 뷰를 맨 아래쪽에 놓기를 원합니다. 어떻게해야합니까?내용 높이가 화면 높이보다 작 으면 ScrollView의 아래쪽에보기를 적용하십시오.
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center_horizontal">
<View ... />
<View ... />
<View ... />
<View ... /> // this one should be on bottom if LinearLayout's contents don't exceed screen height
</LinearLayout>
</ScrollView>
상대 레이아웃을 사용하고 "align_parentBottom"속성을 true로 지정 했습니까? – Umair