android - Text align vertical doesn't work in tags -


i have problem vertical alignment. codes below;

<?xml version="1.0" encoding="utf-8"?> <co.hairmod.android.post.create.tokenlayout xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_height="20dp"     android:layout_width="wrap_content"     android:orientation="horizontal"     android:gravity="center_vertical"> <relativelayout     android:layout_width="wrap_content"     android:layout_height="20dp">      <textview android:id="@+id/name"         android:layout_width="wrap_content"         android:layout_height="20dp"         android:background="@drawable/catalog_tag_textview_cornered"         android:textcolor="@android:color/white"         android:textsize="14dp"         android:paddingleft="23dp"         android:paddingright="10dp"         android:text="deneme"/>      <textview         android:layout_width="20dp"         android:layout_height="20dp"         android:background="@drawable/white_circle"         android:textcolor="@color/main_photo_orange_circle_color"         android:gravity="center"         android:textsize="14dp"         android:text="x"/>  </relativelayout>   </co.hairmod.android.post.create.tokenlayout> 

but appearance this;

enter image description here

it not vertical align. have tried every way, paddings, margins. haven't worked still.

add android:layout_centervertical="true" attribute textview


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

java.lang.NoClassDefFoundError When Creating New Android Project -

Decoding a Python 2 `tempfile` with python-future -