0
상단에 몇 가지 안드로이드 위젯을 추가하고 그 다음에 Scrollview와 그 위의 몇 가지 위젯을 추가하고 싶습니다. Scrollview가 완전히 채워지면 위젯 (Scrollview 이후에 있어야 함)에 할당 된 공간을 차지하기 시작합니다. 궁극적으로 위젯이 부적절하게 나타납니다.스크롤 뷰 아래에 위젯 추가
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
tools:layout_editor_absoluteX="8dp"
tools:layout_editor_absoluteY="8dp"
xmlns:android="http://schemas.android.com/apk/res/android"
android:weightSum="10">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Enter Data"
android:gravity="center_horizontal"/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Submit"
android:layout_weight="1"/>
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="6">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@android:color/holo_green_light">
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="new Button"
android:background="@android:color/holo_green_light"/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="new Button"
android:background="@android:color/holo_blue_light"/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="new Button"
android:background="@android:color/holo_green_light"/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="new Button"
android:background="@android:color/holo_blue_light"/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="new Button"
android:background="@android:color/holo_green_light"/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="new Button"
android:background="@android:color/holo_blue_light"/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="new Button"
android:background="@android:color/holo_green_light"/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="new Button"
android:background="@android:color/holo_blue_light"/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="new Button"
android:background="@android:color/holo_green_light"/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="new Button"
android:background="@android:color/holo_blue_light"/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="new Button"
android:background="@android:color/holo_green_light"/>
</LinearLayout>
</ScrollView>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Enter Data Again"
android:gravity="center_horizontal"/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Submit Again"
android:layout_weight="1"/>
</LinearLayout>
고마워요, 선생님! 그것은 효과가 있었다. –
@MuradKhateebAbbasi이 대답이 도움이 되었다면,이 답변을 upvote하고 수락하십시오. 도움을 청합니다. –