用图像android移动我的进度条

用图像android移动我的进度条,第1张

概述我有这个代码 是一个填充红色的进度条 <?xml version="1.0" encoding="utf-8"?><layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@android:id/background"> <shape> 我有这个代码

是一个填充红色的进度条

<?xml version="1.0" enCoding="utf-8"?><@R_700_3419@ xmlns:androID="http://schemas.androID.com/apk/res/androID">    <item androID:ID="@androID:ID/background">        <shape>            <gradIEnt            androID:startcolor="#c3c3c3"                androID:centercolor="#c3c3c3"                androID:centerY="0.75"                androID:endcolor="#7f7f7f"                androID:angle="270"/>            <padding androID:left="1dp"            androID:top="1dp"            androID:right="1dp"            androID:bottom="1dp"/>         <corners androID:radius="10dp"/>     </shape></item><item androID:ID="@androID:ID/secondaryProgress">    <clip>        <shape>            <gradIEnt                androID:startcolor="#234"                androID:centercolor="#234"                androID:centerY="0.75"                androID:endcolor="#a24"                androID:angle="270"/>            <padding androID:left="1dp"                androID:top="1dp"                androID:right="1dp"                androID:bottom="1dp"/>             <corners androID:radius="10dp"/>             </shape>    </clip></item><item androID:ID="@androID:ID/progress">    <clip>       <shape>            <gradIEnt                androID:startcolor="#a42c48"                androID:centercolor="#a42c48"                androID:centerY="0.75"                androID:endcolor="#eb3e67"                androID:angle="270"/>            <padding androID:left="1dp"                androID:top="1dp"                androID:right="1dp"                androID:bottom="1dp"/>             <corners androID:radius="10dp"/>         </shape>    </clip>    </item></@R_700_3419@>

看起来像这样

现在我想添加一个图像,同时进度条填充,如下图所示

请帮我

提前致谢

解决方法@H_301_16@ 也许您可以使用图层列表设置搜索栏(而不是进度条)并将图像添加为拇指擦除器?
<Seekbar    androID:ID="@+ID/seekbar1"    androID:layout_wIDth="match_parent"    androID:layout_height="wrap_content"    androID:thumb="@drawable/your_androID_image"    androID:progressDrawable="@drawable/your_layerList_drawable"/>
总结

以上是内存溢出为你收集整理的用图像android移动我的进度条全部内容,希望文章能够帮你解决用图像android移动我的进度条所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1136789.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-30
下一篇2022-05-30

发表评论

登录后才能评论

评论列表(0条)

    保存