Je cette mise en page Android:problème de mise en page sur le HTC Sensation
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>
et ce fichier manifeste:
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>
Mon principal mise en page ne s'étend pas à la pleine largeur sur un HTC Sensation (et en émulateur sur AVD avec Android 3.0) et je ne sais pas pourquoi.
Où je peux trouver un tutoriel avec comment puis-je concevoir une interface utilisateur Android compatible avec toutes les versions supérieures Android 1.5. Aussi, j'ai besoin d'apprendre à concevoir un widget Home UI Android.
Merci
Ne fonctionne pas. Mon HTC a une densité HDPI. Mon application le détecte en tant que MDPI et la mise en page ne s'étend pas à la largeur/hauteur maximale. – bogdanmogo
Voir ma réponse modifiée. – Lars
MISE À JOUR: Cela a fonctionné avec fitCenter. Je vous remercie. – bogdanmogo