55.EasyCountDownTextureView

本文介绍了一种基于TextureView的高性能倒计时组件EasyCountDownTextureView,该组件可在Android平台实现类似手淘的倒计时效果。文章提供了详细的使用方法及性能表现,并附带了GitHub上的开源项目链接。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

55.EasyCountDownTextureView


仿手淘倒计时,性能稍微高一点的EasyCountDownTextureView。

Language License
Version
Download

Easy count down by TextureView


Github

Github


Attention

minSdkVersion >= 14


Gradle

dependencies {
    compile 'com.camnter.easycountdowntextureview:library:1.1'
}

Attributes

<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>

Easy use

<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>

TextureView_1

<com.camnter.easycountdowntextureview.EasyCountDownTextureView
    android:id="@+id/style_tv"
    android:layout_width="132dp"
    android:layout_height="36dp"
    app:easyCountBackgroundColor="#ffdddddd"
    app:easyCountColonColor="#ffdddddd"
    app:easyCountColonSize="20sp"
    app:easyCountHour="6"
    app:easyCountMinute="6"
    app:easyCountRectHeight="34dp"
    app:easyCountRectRadius="5dp"
    app:easyCountRectSpacing="12dp"
    app:easyCountRectWidth="36dp"
    app:easyCountSecond="26"
    app:easyCountTimeColor="#ff3A94FF"
    app:easyCountTimeSize="20sp" />

TextureView_2


Performance

Without scrolling, only time in the refreshing

EasyCounDownTextureView
ShoujiTaobao


License

Copyright (C) 2016 CaMnter yuanyu.camnter@gmail.com

Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值