I have this layout:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#222222"
android:gravity="center_horizontal"
android:layout_gravity="center_horizontal"
android:paddingBottom="5dp">
<SeekBar
android:layout_width="200dp"
android:layout_height="wrap_content"
android:id="@+id/seekbar"
android:max="5"
android:progress="2">
</SeekBar>
<TextView android:id="@+id/fontsize00"
android:layout_width="25dp"
android:layout_height="25dp"
android:gravity="center"
android:layout_marginLeft="20dp"
android:text="C"
android:textSize="20dp"
android:background="#FFFFFF"
android:textColor="#222222">
</TextView>
</LinearLayout>
The size of the text changes with the change of the value of the spinner.
Even if at low values the text is in the center of the textview, at bigger values it is set lower.
Why is this happening?

It may be because you are setting the
android:layout_heightof the layout manually. Try changing it towrap-content.And
TextView, as you are probably aware, has some other padding methods. Where you can set some special padding.