【问题标题】:center text and checkmark of CheckedTextViewCheckedTextView 的中心文本和复选标记
【发布时间】:2015-10-21 13:54:47
【问题描述】:

我实现的布局如下图:

我使用的代码是:

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

这是我想要的,如下图:

分享一些想法来自定义它,但不要使用自定义线性或任何其他布局..我想要一个自定义视图或 checkTextView...任何帮助将不胜感激。

谢谢..!!

【问题讨论】:

  • 我不知道为什么你们投了反对票,但我不在乎......如果你们反对我的问题,,,那么你可能知道答案...... .so 告诉我或分享给大家.....我已经在这上面浪费了很多时间

标签: android textview android-custom-view checkedtextview


【解决方案1】:

请尝试下面的代码来实现你提到的检查视图:

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

谢谢..!!

【讨论】:

猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-02-04
  • 2017-06-09
  • 1970-01-01
  • 1970-01-01
  • 2011-04-14
  • 1970-01-01
相关资源
最近更新 更多