且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Android镜子矢量可绘制

更新时间:2023-11-16 18:45:46

对于使用ImageViewTextViewEditText比例尺的人来说,效果很好.使用

For those who Use ImageView or TextView or EditText Scale works perfectly. Use

android:scaleX="-1" //To flip horizontally or
android:scaleY="-1" //To flip vertically

或尝试

android:rotationX="180" // for horizontal
android:rotationY="180" // for vertical

或仅rotation="180"表示垂直

android:rotation="180" // for vertical

修改:其他
如果要在更改语言RTL/LTR(从右到左"/从左到右")时翻转/镜像图标/可绘制,在android vector drawable中有一种不错的方法,只需检查ckeckbox Enable自动镜像RTL布局.

Additional
If you want to flip/mirror icons/drawable when changing language RTL/LTR ("Right To Left"/"Left To Right"), there is a nice way of doing so in android vector drawable just check the ckeckbox Enable auto mirroring for RTL layout.

=>右键单击可绘制文件夹=>新建=>矢量资产=>选择可绘制=>选中复选框

=> Right Click on drawable folder => New => Vector Asset => Select drawable => check the Checkbox

.