1
사용자가 레이아웃의 내용을 스크롤하는 경우에도 레이아웃 페이지의 상단에 머무는 부동 막대를 추가하는 방법을 아는 사람이 있습니까?Android : 레이아웃의 플로팅 바
사용자가 레이아웃의 내용을 스크롤하는 경우에도 레이아웃 페이지의 상단에 머무는 부동 막대를 추가하는 방법을 아는 사람이 있습니까?Android : 레이아웃의 플로팅 바
바를 레이아웃 상단에 추가하고 나머지 콘텐츠는 ScrollView
으로 마무리하면됩니다. 예를 들면 다음과 같습니다 헤더이 같은 사이트에 남아있는 동안
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent">
<!-- Header -->
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Your header"/>
<!-- rest of your layout -->
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_content">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Foo"/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Bar"/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Baz"/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="etc"/>
</ScrollView>
</LinearLayout>
그런 식으로,보기의 랩 부분이 스크롤 될 것입니다.
달콤한, 나는 그것을 시도 해줄거야, 고마워 크리스티안. – dhulihan
+1 나는 비슷한 것을 필요로하지만 그 대신 바닥에서 떠있는 팝업이 필요합니다. 좋은 출발점! – AgentKnopf