3
工作我在执行adjustViewBounds=true
工程完全按照预期的是Android 5.1 但不会做相同的4.1的Android ImageView的,adjustViewBounds不是安卓4.1
4.1在左边,5.1右边
adjustViewBounds=true
adjustViewBounds=false
MainFragment
<GridView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:columnWidth="150dp"
android:numColumns="auto_fit"
android:verticalSpacing="0dp"
android:horizontalSpacing="0dp"
android:stretchMode="columnWidth"
tools:context=".MainFragment"
android:id="@+id/movie_gridView">
</GridView>
ImageView
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_height="match_parent">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="fitXY"
android:id="@+id/gridView_moviePoster"
android:adjustViewBounds="true"/>
</FrameLayout>
参考http://stackoverflow.com/问题/ 7719617/imageview的-adjustviewbounds - 不工作 – sasikumar