【发布时间】:2014-06-13 04:26:37
【问题描述】:
您好,我的 xml 中不断出现此错误:“错误:在包 'android' 中找不到属性 'textAlignment' 的资源标识符”
我已经尝试用谷歌搜索错误,但没有运气继承我的 xml 代码:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#FFe5e5e5"
android:orientation="vertical" >
<!-- <EditText -->
<!-- android:id="@+id/txtItem" -->
<!-- android:layout_width="fill_parent" -->
<!-- android:layout_height="wrap_content" -->
<!-- android:inputType="text" > -->
<!-- <requestFocus /> -->
<!-- </EditText> -->
<!-- <Button -->
<!-- android:id="@+id/btnAdd" -->
<!-- android:layout_width="fill_parent" -->
<!-- android:layout_height="wrap_content" -->
<!-- android:text="@string/add" /> -->
Error is flagging here: <TextView
android:id="@+id/txtCurrentListName"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/reminder_bg"
android:text="default"
android:textColor="#FFffffff"
android:textAlignment="gravity"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_marginTop="8dp"
android:gravity="center"
android:textSize="28sp"
/>
<ListView
android:id="@+id/listCurrentListItems"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
</ListView>
</LinearLayout>
任何帮助都会很棒
提前感谢
问候
克里斯
【问题讨论】:
-
你可以改用
android:gravity