哪位大牛帮忙解决一下

xuegang87 2013-09-03 11:07:41
<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >

<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >

<ImageView
android:id="@+id/iv_intro"
style="@style/fill"
android:background="@drawable/home_intro"
android:scaleType="fitXY"/>


<RelativeLayout
android:id="@+id/home_tab_rlyout"
android:layout_width="fill_parent"
android:layout_height="@dimen/header_height"
android:background="@drawable/header_bar_bg" >

<LinearLayout
android:id="@+id/ll_left"
style="@style/wrap"
android:background="@drawable/header_btn_bg"
android:clickable="false"
android:gravity="center"
android:orientation="horizontal" >

<TextView
android:id="@+id/tv_left"
style="@style/white16"
android:layout_centerVertical="true"
android:layout_marginLeft="10dip"
android:layout_marginRight="10dip"
android:text="租房帮"
android:textSize="18.0sp"
android:textStyle="bold"
android:textColor="@android:color/white" />

<ImageView
style="@style/wrap"
android:background="@drawable/header_divider"
/>
</LinearLayout>

<!-- <LinearLayout-->
<!-- android:layout_width="fill_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_centerInParent="true">-->

<!-- <TextView -->
<!-- style="@style/wrap"-->
<!-- android:text="中间"-->
<!-- android:layout_centerInParent="true"-->
<!-- android:layout_toRightOf="@+id/ll_left"-->
<!-- android:layout_toLeftOf="@+id/ll_right"/>-->


<com.soufun.zf.view.SlipSwitchView
android:id="@+id/ssv_switch"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_toRightOf="@+id/ll_left"
android:layout_toLeftOf="@+id/ll_right"
android:layout_centerInParent="true"
/>
<!-- </LinearLayout>-->

<LinearLayout
android:id="@+id/ll_right"
style="@style/wrap"
android:layout_alignParentRight="true"
android:background="@drawable/header_btn_bg"
android:clickable="true"
android:gravity="center" >

<ImageView
style="@style/wrap"
android:background="@drawable/header_divider" />

<TextView
android:id="@+id/tv_right"
style="@style/white16"
android:layout_marginLeft="10dip"
android:layout_marginRight="10dip"

android:textSize="18.0sp"
android:textStyle="bold"
android:text="搜索" />
</LinearLayout>
</RelativeLayout>

<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0.0"
android:visibility="gone" />

<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="0.0dip"
android:layout_weight="1.0" />
</LinearLayout>

</TabHost>

SlipSwitchView是自定义的空间但是怎么设置其在中间的属性都不起作用,来点具体的
...全文
326 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
胖虎 2013-09-12
  • 打赏
  • 举报
回复
觉得6楼是正解~
xuegang87 2013-09-12
  • 打赏
  • 举报
回复
我不设置margin属性他一直在一个布局的左上方。
yuebanmumu 2013-09-11
  • 打赏
  • 举报
回复
<ImageView android:id="@+id/iv_intro" style="@style/fill" android:background="@drawable/home_intro" android:scaleType="fitXY"/> 这个是不是全屏的
xuegang87 2013-09-10
  • 打赏
  • 举报
回复
具体点,我是菜鸟
ManyBugs 2013-09-10
  • 打赏
  • 举报
回复
显示的是什么样? 截张图看一下 fill_parent是不是有问题? <com.soufun.zf.view.SlipSwitchView android:id="@+id/ssv_switch" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_toRightOf="@+id/ll_left" android:layout_toLeftOf="@+id/ll_right" android:layout_centerInParent="true" />
xuegang87 2013-09-10
  • 打赏
  • 举报
回复
就是继承View呀
ManyBugs 2013-09-10
  • 打赏
  • 举报
回复
SlipSwitchView 继承于什么类?
knxw0001 2013-09-03
  • 打赏
  • 举报
回复
在代码里的onmatch等方法中设置

80,351

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧