2010-11-04 5 views
3

Привет, Я пишу приложение для DroidX, которое является 480x854. Я настроил свой AVD следующим образом:Android LinearLayout не растягивает весь экран

цель: уровень API 7
кожи: 480x854
hw.lcd.density: 160

Вот так. Эмулятор загружается отлично и отлично выглядит, но по какой-то причине мое приложение не заполняет_parent. Смотрите здесь:

alt text

Он не масштабируется весь путь, и я не знаю, почему. Вот мой XML:

<?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"> 

<ImageView android:src="@drawable/logo_recruiting" 
    android:background="#FF000000" 
    android:adjustViewBounds="true" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:padding="30dip" /> 

<LinearLayout android:orientation="vertical" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:layout_weight="1" 
    android:gravity="center" 
    android:background="@drawable/menu_background"> 
    <Button android:layout_height="wrap_content" 
     android:layout_width="wrap_content" 
     android:layout_marginBottom="25dip" 
     android:text="@string/events" 
     android:textColor="#FFFFFFFF" 
     android:textSize="22dip" 
     android:paddingBottom="5dip" 
     android:background="@drawable/events_button" 
     android:onClick="launchEventsMap" 
     android:id="@+id/events_button" 
     /> 
    <Button android:layout_height="wrap_content" 
     android:layout_width="wrap_content" 
     android:layout_marginBottom="25dip" 
     android:text="@string/jobs" 
     android:textColor="#FFFFFFFF" 
     android:textSize="22dip" 
     android:paddingBottom="5dip" 
     android:background="@drawable/jobs_button" 
     android:id="@+id/jobs_button" 
     /> 
    <Button android:layout_height="wrap_content" 
     android:layout_width="wrap_content" 
     android:layout_marginBottom="25dip" 
     android:text="@string/applicants" 
     android:textColor="#FFFFFFFF" 
     android:textSize="22dip" 
     android:paddingBottom="5dip" 
     android:background="@drawable/applicants_button" 
     android:id="@+id/applicants_button" 
     /> 
    <Button android:layout_height="wrap_content" 
     android:layout_width="wrap_content" 
     android:layout_marginBottom="25dip" 
     android:text="@string/resumes" 
     android:textColor="#FFFFFFFF" 
     android:textSize="22dip" 
     android:paddingBottom="5dip" 
     android:background="@drawable/resumes_button" 
     android:id="@+id/resumes_button" 
     /> 
    <Button android:layout_height="wrap_content" 
     android:layout_width="wrap_content" 
     android:layout_marginBottom="25dip" 
     android:text="@string/settings" 
     android:textColor="#FFFFFFFF" 
     android:textSize="22dip" 
     android:paddingBottom="5dip" 
     android:background="@drawable/settings_button" 
     android:id="@+id/settings_button" 
     /> 
    </LinearLayout> 
</LinearLayout> 
+0

Я бы предположил, что layout_width = "fill_parent" и layout_height = "fill_parent" должны это сделать .... –

ответ

0

Я думаю, что его, потому что ваш ImageView находится вне LinearLayout, может попытаться обернуть все это в разрешении RelativeLayout

+0

Нет, его ImageView внутри предыдущего LinearLayout. –

Смежные вопросы