我正在尝试将drawable缩放到其原始大小的两倍.我正在尝试使用它:
Drawable Resouces.我当前的代码是:
绘制对象:
<?xml version="1.0" encoding="utf-8"?> <scale xmlns:android="http://schemas.android.com/apk/res/android" android:drawable="@drawable/ic_launcher" android:scaleHeight="80%" android:scaleWidth="80%" > </scale>
布局:
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_launcher" /> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/scale2" /> </LinearLayout>
可绘制
原文链接:https://www.f2er.com/xml/293005.html<?xml version="1.0" encoding="utf-8"?> <scale xmlns:android="http://schemas.android.com/apk/res/android" android:drawable="@drawable/logo" android:scaleGravity="center_vertical|center_horizontal" android:scaleHeight="80%" android:scaleWidth="80%" />
布局
<ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/scale" />
尝试这样或你可以查看此链接.
http://developer.android.com/guide/topics/resources/drawable-resource.html