阿拉伯字体被削减的Andr​​oid 4.0 [英] Arabic font gets cut in Android 4.0

查看:155
本文介绍了阿拉伯字体被削减的Andr​​oid 4.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

它看起来像的Andr​​oid 4.0的连接行为。

在我的项目有一些阿拉伯文字。
当我运行该项目在仿真器与Android 4.0或任何版本那么它看起来不错。但是,当我真正的Andr​​oid 4.0的设备上运行它,然后它看起来像文正从右侧切。
看到下面的画面。

屏幕1:在仿真器

屏幕2:在真正的Andr​​oid 4.0设备

我不明白它为什么会发生这样的。我该如何解决这个问题?

code或行项目:

 <?XML版本=1.0编码=UTF-8&GT?;
< LinearLayout中的xmlns:机器人=htt​​p://schemas.android.com/apk/res/android
    机器人:layout_width =FILL_PARENT机器人:方向=横向
    机器人:layout_height =WRAP_CONTENT机器人:背景=#FFFFFF>
    <的LinearLayout机器人:方向=横向
        机器人:layout_margin =20dp的android:layout_width =FILL_PARENT
        机器人:layout_height =WRAP_CONTENT机器人:layout_gravity =右| center_vertical
        机器人:重力=右>
        < TextView的机器人:ID =@ + ID /的TopText的android:layout_width =WRAP_CONTENT
            机器人:layout_height =WRAP_CONTENT机器人:文本=标题
            机器人:paddingRight =10dp机器人:比重=正确的机器人:TEXTSIZE =16SP
            机器人:文字样式=大胆的机器人:文字颜色=#000000/>        <的TextView的android:layout_width =WRAP_CONTENT
            机器人:layout_height =WRAP_CONTENT机器人:文本=
            机器人:paddingRight =15dp机器人:比重=正确的机器人:TEXTSIZE =16SP
            机器人:文字样式=大胆的机器人:文字颜色=#000000/>    < / LinearLayout中>
< / LinearLayout中>


解决方案

作为一个工作围绕:尝试添加的右填充您的看法。

我曾与ICS TextViews类似的问题。它们从底部被切断。幸运的是,谷歌解决了这个在果冻豆版本。

It's look like wired behaviour of Android 4.0.

In my project there is some Arabic text. While I am running that project in the emulator with Android 4.0 or any version then it looks fine. But when I run it on a real Android 4.0 device then it looks like the text is getting cut from the right side. See the below Screen.

Screen 1: In Emulator

Screen 2: In Real Android 4.0 device

I can't understand why it is happen like this. How can I fix this?

code or row item:

 <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent" android:orientation="horizontal"
    android:layout_height="wrap_content" android:background="#ffffff">
    <LinearLayout android:orientation="horizontal"
        android:layout_margin="20dp" android:layout_width="fill_parent"
        android:layout_height="wrap_content" android:layout_gravity="right|center_vertical"
        android:gravity="right">
        <TextView android:id="@+id/toptext" android:layout_width="wrap_content"
            android:layout_height="wrap_content" android:text="Title"
            android:paddingRight="10dp" android:gravity="right" android:textSize="16sp"
            android:textStyle="bold" android:textColor="#000000" />

        <TextView android:layout_width="wrap_content"
            android:layout_height="wrap_content" android:text=" "
            android:paddingRight="15dp" android:gravity="right" android:textSize="16sp"
            android:textStyle="bold" android:textColor="#000000" />

    </LinearLayout>
</LinearLayout>

解决方案

As a working around: Try adding right padding to your views.

I had a similar issue with TextViews in ICS. they were cut from the bottom. Fortunately, Google solved this in Jelly Bean version.

这篇关于阿拉伯字体被削减的Andr​​oid 4.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆