Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

center text and checkmark of CheckedTextView

Layout i implemented like below picture :

enter image description here

And code I used is :

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

enter image description here

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.

Thanks..!!

like image 726
Reprator Avatar asked Oct 21 '15 04:10

Reprator


1 Answers

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

Thanks..!!

like image 64
AndiGeeky Avatar answered Sep 20 '22 19:09

AndiGeeky