Проблема с макетом в HTC Sensation - PullRequest
0 голосов
/ 22 октября 2011

У меня есть этот макет Android:

main.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"
    android:id="@+id/mainContainer">

    <ImageView android:layout_height="wrap_content" android:id="@+id/imageView1" 
                android:src="@drawable/logo" android:layout_marginTop="30px" 
                android:layout_marginBottom="50px" android:scaleType="fitCenter"     android:layout_width="fill_parent"></ImageView>

<TextView  
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:text="@string/hello"
    />


</LinearLayout>

и этот файл манифеста:

AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.mogoolab.android.flowerforyou"
      android:versionCode="1"
      android:versionName="1.0">
    <uses-sdk android:minSdkVersion="3" />

    <application android:icon="@drawable/logo" android:label="@string/app_name"     android:name=".FlowerForYouApp"
                android:theme="@android:style/Theme.NoTitleBar.Fullscreen">

......
    </application>

</manifest>

Мой основной макет не растягивается на полную ширину в HTC Sensation (и в эмуляторе на AVD с Android 3.0), и я не знаю, почему.

Где яя могу найти учебное пособие о том, как создать интерфейс Android, совместимый со всеми более высокими версиями Android 1.5.Также мне нужно научиться создавать домашний виджет для пользовательского интерфейса Android.

Спасибо

1 Ответ

1 голос
/ 22 октября 2011

Я знаю, что именно вы хотите, но вы можете взглянуть на это

Также я не уверен в этом:

android:scaleType="fitCenter" in your main.xml

Edit: Вы уже прочитали эту ссылку

...