J'ai essayé quelques approches différentes avec les poids, mais évidemment, il ya une mauvaise compréhension flagrante de la façon d'obtenir ce que je vise ici. Simplement ce que je tente de faire, c'est que ImageView occupe 1/3rd de l'écran sur toute la largeur, tout en ayant la disposition de textViews prendre le reste des 2/3rds de l'écran sur toute la largeur. Ce qui finit par avoir comme je l'essaye et le manipule cependant, c'est que l'ImageView est petit et ne prend pas presque l'espace qu'il devrait être. J'ai été déconner avec essayer d'obtenir les dispositions correctes toute la matinée.Malentendu poids Android
La réponse ci-dessous m'a conduit à la suivante qui était ce qui se passait dans ce cas:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:weightSum="3">
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/skeleton"
android:layout_weight="1"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_weight="2">
<EditText
android:id="@+id/editText1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ems="10" />
<EditText
android:id="@+id/editText2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ems="10" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
duplication possible de [Android Layout Weight] (http://stackoverflow.com/questions/4986861/android-layout-weight), spécifiquement cette réponse: http://stackoverflow.com/a/4987097/752320 – Geobits