如何旋转圆角ImageView

时间:2016-07-19 07:44:32

标签: android rotation rounded-corners rotatetransform

当我旋转ImageView时,我遇到了问题:

NOW

但我希望这张照片在我ImageView成为第一个之后是这样的:

how it should be

那么,我该怎么做?这是我的xml代码:

<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/main_content"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="#f1f1f1">

    <LinearLayout
        android:id="@+id/linear_propotionalimageview"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:gravity="center"
        android:orientation="vertical"
        android:weightSum="1">

        <ImageView
            android:id="@+id/bg_imageview"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:layout_centerHorizontal="true"
            android:layout_centerInParent="true"
            android:adjustViewBounds="true"
            android:background="@drawable/background_vouchers_rounded_shadow"
            android:fitsSystemWindows="true"
            android:rotation="90"
            android:scaleType="centerCrop"
            android:src="@drawable/bg_background" />

     </LinearLayout>
</android.support.design.widget.CoordinatorLayout

0 个答案:

没有答案