K
korndi
Neues Mitglied
- 3
Hallo!
Ich habe meine MainView auf der ich 2 Bilder anzeige.
Um die Grafiken richtig anzuzeigen müssen die Bilder herunterskaliert werden.
Kann man das mit den richtigen Layout automatisch machen?
Idee:
Die eine Hälfte vom Layout beinhaltet das eine Bild die andere das andere (Skalierung soll automatisch geschähen)
Screenshot:
Der Button unterhalb verschwindet da das Bild zu groß ist.
Layout:
Ich habe meine MainView auf der ich 2 Bilder anzeige.
Um die Grafiken richtig anzuzeigen müssen die Bilder herunterskaliert werden.
Kann man das mit den richtigen Layout automatisch machen?
Idee:
Die eine Hälfte vom Layout beinhaltet das eine Bild die andere das andere (Skalierung soll automatisch geschähen)
Screenshot:
Der Button unterhalb verschwindet da das Bild zu groß ist.
Layout:
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="wrap_content" android:layout_width="fill_parent" android:orientation="vertical">
<TextView android:layout_height="wrap_content" android:id="@+id/mainscreen" android:layout_width="fill_parent" android:text="Selected Channel" android:gravity="center"></TextView>
<ImageView android:id="@+id/ImageView01" android:layout_width="wrap_content" android:layout_height="wrap_content"></ImageView>
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/mainscreen_state"></TextView>
<ImageView android:layout_width="wrap_content" android:layout_centerHorizontal="true" android:layout_height="wrap_content" android:id="@+id/ImageAd" android:layout_gravity="center"></ImageView> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="fill_parent"
android:layout_width="fill_parent">
<Button android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:id="@+id/mainscreen_btchange"
android:text="Change State"></Button>
</RelativeLayout>
</LinearLayout>