Mein ImageView aus irgendeinem seltsamen Grund zeigt immer ein Bild in der Mitte, links von meinem Bildschirm trotz der XML-Code besteht darauf, dass es in der Mitte sein.Brauchen Sie Hilfe mit einem ImageView immer falsch angezeigt
I Porträt Orientierung in meiner app zwingen und hier ist mein xml-Code für mein Layout:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent" android:gravity="center">
<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/image_view"
android:layout_weight="1.0"/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/message"
android:gravity="center_horizontal"
android:padding="10dip"/>
<Button
android:layout_gravity="center_horizontal"
android:layout_width="fill_parent"
android:textStyle="bold" android:id="@+id/action_button" android:selectAllOnFocus="false" android:layout_height="100dip" android:text="Click here to preform actions"/>
</LinearLayout>
Also, die Seite sollte in der Mitte als Bild angezeigt werden, um die Breite des Bildschirms erstreckt, wobei der Text das und der Knopf darunter. Aber aus irgendeinem Grund wird das Bild als kleines Kästchen-Thumbnail in der Mitte des Bildschirms angezeigt - irgendwelche Ideen zu einem Workaround?