草庐IT

autoMirror

全部标签

android - ImageButton 的 RTL 支持,带有 autoMirror for src drawable

当使用android:background="?android:attr/selectableItemBackground"和android:src="@drawable/ic_action_send"创建一个ImageButton时,添加android:autoMirror="true"没有任何明显的影响。有什么方法可以轻松支持ImageButtons上的从右到左(RTL)图像镜像? 最佳答案 制作一个XML可绘制对象并设置android:autoMirrored="true"。在API19之前该值被忽略。res/drawable

android - RTL - 是否是 android :autoMirrored work with png images?

我读到从4.4开始,android支持autoMirroring:OnpreviousversionsofAndroid,ifyourappincludesimagesthatshouldreversetheirhorizontalorientationforright-to-leftlayouts,youmustincludethemirroredimageinadrawables-ldrtl/resourcedirectory.Now,thesystemcanautomaticallymirrorimagesforyoubyenablingtheautoMirroredattrib