android rotation xml,是否可以在xml描述中旋转drawable?

如果使用基于矢量的drawable,结合 ImageView ,样式和颜色状态列表,您的按钮可以重构如下:

Note: 矢量drawables明显小于图像,所以额外的,明确的定义不应该避免手动修改矢量资产,我宁愿处理更新几个文件的开销,而不是在一个文件上进行转换):

Note: Android Studio是矢量资产的绝佳来源 .

res\values\styles.xml

match_parent

match_parent

@color/button_csl

res\color\button_csl.xml

details_menu_large_button.xml

android:drawable="@drawable/and_card_details_button_down_left_onclick" />

Details_Buttons_Top_Left_Button

style="@style/Details_Buttons_Top_Left_Button"

android:src="@drawable/details_menu_large_button" />

and_card_details_button_down_left.xml (ic_play_arrow_black_24dp.xml)

android:width="24dp"

android:height="24dp"

android:viewportWidth="24.0"

android:viewportHeight="24.0">

android:fillColor="#FF000000"

android:pathData="M8,5v14l11,-7z"/>

and_card_details_button_down_left_onclick.xml (修改了ic_play_arrow_black_24dp.xml)

android:width="24dp"

android:height="24dp"

android:viewportWidth="24.0"

android:viewportHeight="24.0">

android:pivotX="12"

android:pivotY="12"

android:rotation="90" >

android:fillColor="#FF000000"

android:pathData="M8,5v14l11,-7z"/>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值