안드로이드 인터페이스를 만들려고하는데, 약간의 중복 문제가 있습니다.안드로이드에서 원하지 않는 중첩을 제거하는 방법
여기 내 코드입니다. 그것은 Tab에 있지만 Tab 부분을 멀리 잘라냅니다. 필요한 경우 추가하겠습니다.
업데이트 : 나는뿐만 아니라, 하나의
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5dp" >
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ScrollView
android:orientation="vertical"
android:layout_height="fill_parent"
android:layout_width="fill_parent">
<LinearLayout
android:orientation="vertical"
android:layout_height="fill_parent"
android:layout_width="fill_parent">
<TextView
android:text="welcome"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true" />
<!-- A lot of TextView as the one above -->
</LinearLayout>
</ScrollView>
<RelativeLayout
android:id="@+id/InnerRelativeLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" >
<Button
android:id="@+id/add"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_width="fill_parent"
android:text="@string/add" />
</RelativeLayout>
</RelativeLayout>
</FrameLayout>
을 텍스트 뷰의 여지가 있음을 쓰는 것을 잊었 그리고 이것은 출력하는 것입니다. 당신이 볼 수 있듯이, 하단에 텍스트 버튼 뒤에 간다,하지만 난 두 개의 서로 다른 레이아웃
환영 인사는 어디에서 왔습니까? –
코드를 업데이트했습니다. TextView가 많이 있지만 코드에 그 중 하나만 쓰면 코드가 더 짧아집니다. –