Android类似电商抢购倒计时源码

2021/6/11 14:23:34

本文主要是介绍Android类似电商抢购倒计时源码,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

https://github.com/CaMnter/EasyCountDownTextureView

watermark,size_14,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=

使用说明:

1Gradle

dependencies {

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类似电商抢购倒计时源码的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程