我對android非常陌生,我試圖顯示我的圖像,如下圖所示,但我的圖像不能正確顯示。請幫我解決這個問題。如何裁剪我的形象如下圖所示Android
click here for image i need like this
在此先感謝。
我對android非常陌生,我試圖顯示我的圖像,如下圖所示,但我的圖像不能正確顯示。請幫我解決這個問題。如何裁剪我的形象如下圖所示Android
click here for image i need like this
在此先感謝。
你可以使用scaleType標籤在你的佈局像這樣的例子
<LinearLayout
android:layout_width="200dp"
android:layout_height="200dp"
android:gravity="center">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/image"
android:scaleType="centerCrop" />
</LinearLayout>
更多scaleType信息可以在這裏http://developer.android.com/reference/android/widget/ImageView.html#attr_android:scaleType
需要我的形象下面的曲線形狀像我的附件@ gorio –
你可以使用下面的UIL – Haroon
ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(thisContext
.discCacheFileNameGenerator(new HashCodeFileNameGenerator()).build();
DisplayImageOptions options = new DisplayImageOptions.Builder()
.displayer(new RoundedBitmapDisplayer(10)) //rounded corner bitmap
.cacheInMemory(true)
.cacheOnDisc(true)
.build();
ImageLoader imageLoader = ImageLoader.getInstance();
imageLoader.init(config);
imageLoader.displayImage(image_url,image_view, options);
如果你想使用UIL作爲圓形悼念者 – Haroon
找到你需要的矩形圖像? –
我需要下面的圖像曲線形狀@ praval sharma –
你的問題不清楚,請詳細說明它應該看起來。你的鏈接顯示一個矩形圖像,所以你對曲線形狀的評論很混亂。 –