<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"? ? ? ? ? ? ? ? xmlns:tools="http://schemas.android.com/tools"? ? ? ? ? ? ? ? xmlns:custom="http://schemas.android.com/apk/res-com.example.topbar"? ? ? ? ? ? ? ? android:layout_width="match_parent"? ? ? ? ? ? ? ? android:layout_height="match_parent"? ? ? ? ? ? ? ? android:padding="5dp"? ? ? ? ? ? ? ? tools:context=".MainActivity" ><com.example.topbar? ? android:layout_width="match_parent"? ? android:layout_height="40dp"? ? android:id="@+id/topbar"? ? custom:leftBackground="@drawable/shape"? ? custom:leftText="Back"? ? custom:leftTextColor="#FFFFFF"? ? custom:rightBackground="@drawable/shape"? ? custom:rightText="More"? ? custom:rightTextColor="#FFFFFF"? ? custom:title="諾蘇"? ? custom:titleTextColor="#123412"? ? custom:titleTextSize="10sp">? ??</com.example.topbar></RelativeLayout>
Android設(shè)計Topbar出錯,圖形界面沒有顯示出來,這段代碼有誤嗎?還有導(dǎo)入自己的custom格式出錯了沒有?
Darrow3343092
2016-06-13 16:42:34