Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix[BaseCountdown]: getTextBounds of rect.width() will clip text #131

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kHRYSTAL
Copy link

【预置条件】

<cn.iwgang.countdownview.CountdownView
            android:id="@+id/cv_countdownViewTest3"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:isShowHour="true"
            app:isShowMinute="true"
            app:isShowSecond="true"
            app:timeTextSize="12sp" />
<!-- 12sp较为明显-->

【测试步骤】
打开Demo 观察布局
【测试结果】
秒数展示在5,6,8,9会被clip一部分
【对比测试结果】
在宽度获取使用getTextBounds后rect.width()为37, 使用新增方法getTextWidth后获取宽度为40
【备注】

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant