帮助理解请。 我需要在特定的框中显示。 我不喜欢这样写道:TextView在不同的显示器上
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/fon"
tools:context=".MainActivity" >
....
<TextView
android:id="@+id/textView3"
android:layout_width="200dp"
android:layout_height="210dp"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:includeFontPadding="false"
android:lineSpacingMultiplier="0.8"
android:textAlignment="center"
android:textColor="@color/black"
android:textSize="20sp" />
....
</RelativeLayout>
一切工作在四个英寸屏幕很好,但如果有一个大对角,这将是糟糕的。
随着屏幕的增加,textView的大小不会改变。
我使用“dp”和“sp”,而不是静态“px”,但不起作用... 为什么会发生这种情况?
截图:
尝试使用浸渍(显示独立的像素)。 – fedorSmirnov