Eclipse中Topbar顯示不出
<?xml version="1.0" encoding="utf-8"?>
? ? <!-- 添加命名空間 -->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
? ? xmlns:app="http://schemas.android.com/apk/res-com.example.customerview.Topbar"
? ? android:layout_width="match_parent"
? ? android:layout_height="match_parent" >
? ??
<com.example.customerview.Topbar?
? ? android:layout_width="match_parent"
? ? android:layout_height="40dp"
? ?app:leftText="Back"
? ?app:leftBackground="@drawable/ic_launcher"
? ?app:leftColor="#FFFFFF"
? ?app:rightText="More"
? ?app:rightBackground="@drawable/ic_launcher"
? ?app:rightColor="#FFFFFF"
? ?app:title="自定義標題"
? ?app:titleTextColor="#123412"
? ?app:leftSize="10sp">
</com.example.customerview.Topbar>
</RelativeLayout>
2016-01-23
樓上正解
2016-01-11
已解決
將?xmlns:app="http://schemas.android.com/apk/res-com.example.customerview.Topbar"
改成?xmlns:app="
res/包名(此處包名為AndroidMenifest.xml中?package="com.example.testdemo")