我在一个手机上遇到了问题(迄今为止)。 我的应用程序使用印地语字体。 在模拟器,平板电脑和许多其他手机上都可以显示得很好。 但是,我用于测试目的的一款手机显示的文本从两侧被切断。
我几乎尝试了所有方法来将其放置在正确的位置,但都没有起作用。 这里发布了我两个测试手机的屏幕截图和文本。
有错误的屏幕截图:
其他手机的屏幕截图:以及预期的屏幕截图:
可能的原因是什么,我该怎么解决? 请告诉我!
我正在使用的TextView配置:
<TextView
android:id="@+id/A_lbl_mandir"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/Abt_mandir"
android:textAlignment="center"
android:textColor="#80000A"
android:textSize="35sp" />
编辑:我的完整活动xml:
<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:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity" >
<TextView
android:layout_width="wrap_content"
android:id="@+id/text"
android:layout_height="wrap_content"
android:textSize="20sp"
android:text="@string/hello_world" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_below="@id/text" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20sp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:padding="5sp"
android:text="@string/test"/>
</ScrollView>
</RelativeLayout>
针对这款手机,我尝试了很多其他方法,但都无法解决这个问题!