2016-05-04 9 views
0

meine XML-Datei.Welche Bilddimensionen würden für jedes Gerät angezeigt?

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="horizontal" android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:baselineAligned="false" 
    android:background="@color/white"> 

    <ScrollView android:layout_height="match_parent" 
     android:layout_width="match_parent" 
     android:scrollbarAlwaysDrawVerticalTrack="true" 
     android:layout_weight="1"> 
     <ImageView 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:adjustViewBounds="true" 
      android:scrollbars="vertical" 
      android:src="@drawable/three_content_map" 
      /> 
    </ScrollView> 

    <ScrollView android:layout_height="match_parent" 
     android:layout_width="match_parent" 
     android:scrollbarAlwaysDrawVerticalTrack="true" 
     android:layout_weight="1"> 
     <ImageView 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:adjustViewBounds="true" 
      android:scrollbars="vertical" 
      android:src="@drawable/three_content_com"/> 
    </ScrollView> 

</LinearLayout> 

an zweiter Stelle Imageview ist zeigt nicht Bild, „three_content_com“ Abmessungen sind 401 x 6114 und vielleicht ist es sehr groß ?! welche Größe Bildabmessungen würde jedes Gerät perfectly.please jemand zu zeigen, geben Sie mir advice.thank Sie

+0

u tun Möchten Sie zwei Bildlaufansichten verwenden? –

+0

ja, ich mache keine zwei scrollbaren Bilder – vano

+0

Willkommen bei StackOverflow! Bitte nimm die [Tour] (http://stackoverflow.com/tour) und lies [Wie stelle ich eine gute Frage?] (Http://stackoverflow.com/help/how-to-ask). Dann komm zurück und redest deine Frage entsprechend. – Jan

Antwort

0

Sie Scaletype Eigenschaft wie folgt verwenden können ..

android:scaleType="fitXY" 

Weitere Informationen finden this

+0

Ich benutze es, aber Bild noch verschwunden:/ – vano

+0

@ vano..I gab meine Antwort nach dem Thema Ihrer Frage ... und für Ihr aktuelles Problem ... Sie müssen die Höhe und Breite sowohl Ihre Scrollview als auch verwalten Bildansichten –

Verwandte Themen