中心文本和CheckedTextView的选中标记 [英] center text and checkmark of CheckedTextView

查看:452
本文介绍了中心文本和CheckedTextView的选中标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我实现的布局如下图所示:

Layout i implemented like below picture :

我使用的代码是:

 <CheckedTextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/big_green_btn_normal"
        android:checkMark="@drawable/check_circle"
        android:gravity="center_vertical"
        android:text="@string/register_tempClickStaffingAgreement" />
    

这就是我想要的,就像下面的图片:

This what i wanted,like the following picture :

分享一些想法以对其进行自定义,但不能使用自定义线性或任何其他布局..我想要一个自定义视图或checkedTextView ...任何帮助将不胜感激.

Share some idea to customize it but not with custom linear or any other layout..i want a single custom view or checkedTextView...any help would be greatly appreciated.

谢谢.. !!

推荐答案

请尝试以下代码以实现您提到的checkview:

Please try below code to implement checkview as you mentioned :

<CheckedTextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@android:color/darker_gray"
        android:checkMark="@android:drawable/checkbox_on_background"
        android:gravity="center"
        android:text="Tempclick Staffing Agreement"
        android:textAlignment="gravity" />

谢谢.. !!

这篇关于中心文本和CheckedTextView的选中标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆