最近项目开发中又用到了CheckedTextView控件,以前使用的时候文字居中设置android:gravity="center"这么一个属性就行了,可是这一次不管怎么设置,都没有一点作用,代码如下:
<CheckedTextView
android:id="@+id/activity_shop_detail_collection"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:drawableTop="@mipmap/image_shop_collection_false"
android:paddingTop="@dimen/y4"
android:paddingBottom="@dimen/y2"
android:text="@string/collection"
android:textColor="@color/hint_font_color"
android:textSize="@dimen/x13"/>
谁知道怎么才能使文字居中啊,同样的设置,为什么别人的可以,我的就不可以,我用的是AS2.0、API23、JAVA1.8,请问这个问题应该怎么解决
<CheckedTextView
android:id="@+id/activity_shop_detail_collection"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:drawableTop="@mipmap/image_shop_collection_false"
android:paddingTop="@dimen/y4"
android:paddingBottom="@dimen/y2"
android:text="@string/collection"
android:textColor="@color/hint_font_color"
android:textSize="@dimen/x13"/>
谁知道怎么才能使文字居中啊,同样的设置,为什么别人的可以,我的就不可以,我用的是AS2.0、API23、JAVA1.8,请问这个问题应该怎么解决