나는 android 2.2에서 액션 바처럼 뭔가를 구현하려고합니다. 이 내 main.xml에선형 레이아웃이 보이지 않거나 오버랩 됨
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<include
android:id="@+id/header"
layout="@layout/header"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<ScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@drawable/dark_button"
>
<Button
android:id="@+id/brand_id"
android:layout_width="fill_parent"
android:layout_height="80dip"
android:text="@string/brand_label"
android:textColor="@color/white"
android:background="@drawable/dark_button"
/>
<Button
android:id="@+id/car_id"
android:layout_width="fill_parent"
android:layout_height="80dip"
android:text="@string/car_label"
android:textColor="@color/white"
android:background="@drawable/dark_button"
android:visibility="gone"
/>
<Button
android:id="@+id/model_id"
android:layout_width="fill_parent"
android:layout_height="80dip"
android:text="@string/model_label"
android:textColor="@color/white"
android:background="@drawable/dark_button"
android:visibility="gone"
/>
<Button
android:id="@+id/location_id"
android:layout_width="fill_parent"
android:layout_height="80dip"
android:text="@string/location_label"
android:textColor="@color/white"
android:background="@drawable/dark_button"
android:visibility="gone"
/>
<Button
android:id="@+id/submit"
android:layout_width="fill_parent"
android:layout_height="80dip"
android:text="@string/submit_label"
android:textColor="@color/white"
android:layout_marginTop="10dip"
android:background="@drawable/dark_button"
android:visibility="gone"
/>
<ProgressBar
android:id="@+id/mainProgressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:visibility="gone"
/>
</LinearLayout>
</ScrollView>
</LinearLayout>
입니다 그리고 이것은 내 header.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
>
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button"
android:layout_weight="1" />
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/logo_toyota"
android:layout_weight="1" />
<Button
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button"
android:layout_weight="1" />
</LinearLayout>
내가 코드에 어떤 문제가 있는지 궁금
와 O/P를 얻고있다 . 나는 안드로이드 개발에 처음이다. 어떤 도움을 주셔서 감사합니다. 사전에
덕분에 아만 가우 탐이
이 main.xml에의 루트 레이아웃에서 기본
으로 설정되어 있기 때문에 그것은 수평 방향으로 보였다되어
문제를 설명하는 것을 잊어 버리셨습니까? – waqaslam
오우 죄송합니다! 내가 정교하게 생각해야만한다고 생각했습니다. 포함 된 부분 만 main.xml에 표시됩니다. 버튼도 표시되어야합니다. 나는 무엇이 잘못되었는지 모른다. –