Android类似电商抢购倒计时源码
2021/6/11 14:23:34
本文主要是介绍Android类似电商抢购倒计时源码,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
https://github.com/CaMnter/EasyCountDownTextureView
使用说明:
1Gradledependencies {
compile 'com.camnter.easycountdowntextureview:library:1.1'
}
2Attributes<declare-styleable name="EasyCountDownTextureView">
<attr name="easyCountRectWidth" format="dimension" />
<attr name="easyCountRectHeight" format="dimension" />
<attr name="easyCountRectRadius" format="dimension" />
<attr name="easyCountRectSpacing" format="dimension" />
<attr name="easyCountTimeColor" format="color" />
<attr name="easyCountColonColor" format="color" />
<attr name="easyCountBackgroundColor" format="color" />
<attr name="easyCountColonSize" format="dimension" />
<attr name="easyCountTimeSize" format="dimension" />
<attr name="easyCountHour" format="integer" />
<attr name="easyCountMinute" format="integer" />
<attr name="easyCountSecond" format="integer" />
</declare-styleable>
3xml
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="50dp"
android:background="#ffffffff">
<ImageView
android:layout_width="196dp"
android:layout_height="158dp"
android:layout_marginTop="26dp"
android:scaleType="centerCrop"
android:src="@mipmap/bg_fruit" />
<com.camnter.easycountdowntextureview.EasyCountDownTextureView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:easyCountHour="6"
app:easyCountMinute="6"
app:easyCountSecond="26" />
</RelativeLayout>
4XML
Animatable animatable=draweeController.getAnimatable();
if (animatable.isRunning()){
animatable.stop();
}else{
animatable.start();
}
这篇关于Android类似电商抢购倒计时源码的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-01-18android.permission.read_media_video
- 2024-01-18android_getaddrinfo failed eai_nodata
- 2024-01-18androidmo
- 2024-01-15Android下三种离屏渲染技术
- 2024-01-09Android 蓝牙使用
- 2024-01-06Android对接华为AI - 文本识别
- 2023-11-15代码安全之代码混淆及加固(Android)
- 2023-11-10简述Android语音播报TTS
- 2023-11-06Android WiFi工具类
- 2023-07-22Android开发未来的出路