2017-10-04 15 views
1

ドロー可能なフォルダから画像を表示したい。画像サイズは400kですが、高さが長すぎます。 400 * 3777(幅*高さ)その画像を表示したいだけです。私が完全に見える別のイメージを使用する場合。nestedscrollview画像ビューに大きな高さの画像が表示されないandroid

<?xml version="1.0" encoding="utf-8"?> 
    <android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android" 
     xmlns:app="http://schemas.android.com/apk/res-auto" 
     xmlns:card_view="http://schemas.android.com/apk/res-auto" 
     xmlns:tools="http://schemas.android.com/tools" 

     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
> 

     <LinearLayout 
      android:layout_width="match_parent" 
      android:layout_height="match_parent" 
      android:orientation="vertical"> 

      <android.support.design.widget.AppBarLayout 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:theme="@style/AppTheme.AppBarOverlay"> 

       <android.support.v7.widget.Toolbar 
        android:id="@+id/toolbar" 
        android:layout_width="match_parent" 
        android:layout_height="?attr/actionBarSize" 
        android:background="@color/apps_color" 
        app:popupTheme="@style/AppTheme.PopupOverlay"> 

       </android.support.v7.widget.Toolbar> 

      </android.support.design.widget.AppBarLayout> 

      <ImageView 
       android:layout_width="match_parent" 
       android:layout_height="match_parent" 
       android:adjustViewBounds="true" 
       android:scaleType="fitXY" 
       android:src="@drawable/support_faq" 

       /> 
     </LinearLayout> 

    </android.support.v4.widget.NestedScrollView> 
+0

400dpなどの画像ビューの高さを指定します。 –

+0

固定高さ画像が良く見えない場合 – Tariqul

+0

次に入れ子になったスクロールビューを削除します。 –

答えて

0

同じイメージを使用しますが、そのイメージの解像度を下げます。 400 x 3777から400 x 1080まで使用できます。

+0

400×3777(幅*高さ)の画像をどのように縮小できますか? – Tariqul

+0

あなたはPhotoshopか何かのような他のイメージエディタを使用する必要があります。ペイントを使用することもできます(ウィンドウで作業している場合) –

+1

ビットマップyourBitmap; ビットマップのサイズ変更= Bitmap.createScaledBitmap(yourBitmap、newWidth、newHeight、true); –

関連する問題