[英]How to rotate ImageView without loss of quailty in edges of image
I created two linearlayout with rotation and then I placed the imageview in it ...
If the app loads and imageview displayed the edges of images in imageview look like this
How can i get the imageview with proper edges.
Below is my xml content for this: 以下是我的xml内容:
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dip"
android:layout_marginTop="220dp"
android:background="@drawable/mainscreen_imageframe"
android:gravity="center"
android:rotation="-8" >
<ImageView
android:id="@+id/imgBride"
android:layout_width="150dip"
android:layout_height="132dp"
android:layout_marginBottom="15dip"
android:adjustViewBounds="true"
android:contentDescription="@string/app_name"
android:scaleType="fitXY"
android:background="@drawable/noimage" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="-47dip"
android:layout_marginTop="210dp"
android:background="@drawable/mainscreen_imageframe"
android:gravity="center"
android:rotation="9" >
<ImageView
android:id="@+id/imgGroom"
android:layout_width="150dp"
android:layout_height="132dp"
android:layout_marginBottom="15dip"
android:adjustViewBounds="true"
android:contentDescription="@string/app_name"
android:scaleType="fitXY"
android:src="@drawable/noimage" />
</LinearLayout>
</LinearLayout>
Friends hep me to solve this ... how to get proper image edges in rotation 朋友帮我解决这个问题...如何旋转获得正确的图像边缘
将此添加到XML中的imageviews中
android:antialias="true"
try making it 9 patch image with 9 patch tool . 尝试使用9补丁工具将其制作为9补丁映像。 It will make the image stretchable.
它将使图像可拉伸。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.