0

我遇到了这个奇怪的问题。

在我的布局 xml 中,我有一个TextView,其中有以下文本:

欢迎使用应用程序。\n”,在 中定义strings.xml

在运行 4.0 的平板电脑中显示完整的字符串。

在运行 2.3.7 的智能手机中,它显示在\n.

在我以前创建的应用程序上,\n工作正常。

有人遇到过类似的事情吗?

XML 代码:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" >

    <TextView
        android:id="@+id/textViewWelcomeNotes"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="false"
        android:layout_centerHorizontal="true"
        android:layout_centerVertical="false"
        android:layout_margin="15dp"
        android:layout_marginTop="20dp"
        android:fitsSystemWindows="false"
        android:focusableInTouchMode="true"
        android:gravity="center_vertical|center_horizontal"
        android:hint="@string/msgWelcomeNotesHint"
        android:paddingTop="10dp"
        android:text="@string/msgWelcomeNotes"
        android:textSize="14dp" />

</RelativeLayout>
4

1 回答 1

0

这是最新的一个奇怪的错误ADT 20.0,在Eclipse Juno.

我重新安装了 Eclipse Juno,因为我用插件大量加载了它,现在\n在同一个 apk 中,在 2.3 和 4.0+ Android 版本上看起来没问题。

New->Other->Android Activity此 ADT 上还存在一些其他错误,例如创建新活动 ( ) 时。

于 2012-07-13T20:15:40.270 回答