有時候要做出 滿版的圖片,並且不會歪掉,可以參考 Android ImageView: Fit Width

<ImageView 
    android:id="@+id/background"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:adjustViewBounds="true"
    android:scaleType="centerCrop"/>

詳細說明請見 ImageView的android:adjustViewBounds属性

另外一種作法,在抓圖的時候,自動切割圖片並且置中
Universal Image Loader: Crop center image

Comments

comments powered by Disqus
Copyright © 2013 Andro Chen
Powered by Logdown and Greyshade
Favicon from The Noun Project