为了账号安全,请及时绑定邮箱和手机立即绑定

eclipse中为什么显示不出来左右按钮

eclipse中为什么显示不出来左右按钮

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:custom="http://schemas.android.com/apk/src-com.example.titlebar"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="com.example.titlebar.MainActivity" >
 
    <com.example.titlebar.TopBar
 
        android:layout_height="50dp"
        android:layout_width="match_parent"
        android:id="@+id/topbar"
       
        custom:leftBackground="@color/black"
        custom:leftText="Bcak"
        custom:leftTextColor="#ffffff"
       
        custom:rightBackground="@color/green"
        custom:rightText="More"
        custom:rightTextColor="#ffffff"
       
        custom:titleTextSize="10sp"
        custom:title="自定义标题"
        custom:titletTextColor="#123412" >       
    </com.example.titlebar.TopBar>

正在回答

4 回答

请问你是怎么弄的?谢谢

0 回复 有任何疑惑可以回复我~
#1

圣见兮月 提问者

xmlns:custom="http://schemas.android.com/apk/res/com.example.titlebar" 改成这样好像可以了
2017-07-17 回复 有任何疑惑可以回复我~

可是为什么中间的标题显示不出来 两边的都可以了

0 回复 有任何疑惑可以回复我~

 xmlns:custom="http://schemas.android.com/apk/res/com.example.titlebar"

改成这样好像可以了

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
Android UI模板设计
  • 参与学习       76061    人
  • 解答问题       223    个

快来学习如何在Android中自定义View,本次课程一定会让你获益匪浅

进入课程

eclipse中为什么显示不出来左右按钮

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信