为什么我的TabWidget的标准出不来

so_and_so 2013-07-15 04:17:10

其实可以看到一点点,貌似被前面挡住了.


<?xml version="1.0" encoding="utf-8"?>
<TabHost android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
>
<LinearLayout android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TabWidget android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="@dimen/tab_height"
android:layout_gravity="top"
android:layout_margin="0dp"
android:layout_weight="0.0" />
<FrameLayout android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1.0" >
</FrameLayout>
</LinearLayout>
</TabHost>



代码

LayoutInflater inflater_tab1 = LayoutInflater.from(this);
inflater_tab1.inflate(R.layout.task_list, tabhost.getTabContentView());
inflater_tab1.inflate(R.layout.map_activity_geocoder, tabhost.getTabContentView());

tabhost.addTab(tabhost.newTabSpec("0") .setIndicator("List",getResources().getDrawable(R.drawable.title_menu_normal)) .setContent(R.id.task_list));

tabhost.addTab(tabhost.newTabSpec("1") .setIndicator("Map",getResources().getDrawable(R.drawable.icon_marki)) .setContent(R.id.map_main_Layout));




...全文
53 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
标准出不来?什么意思?

80,351

社区成员

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

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