nestedscrollview大高度图像不显示在image-view android中

时间:2017-10-04 06:10:14

标签: android xml android-layout

我想在draw-able文件夹中显示图像视图中的图像。图像尺寸仅为400 k,但高度太长。 400 * 3777(宽*高)只想显示该图像。如果我使用另一个完美显示的图像。

    <?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>

1 个答案:

答案 0 :(得分:1)

使用相同的图像,但会降低该图像的分辨率。从400 x 3777开始,你可以使用400 x 1080。