作者热门文章
- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我正在使用 tabhost 并试图禁用标签边框线。我用过这个 android:tabStripEnabled="false"在我的 XML 中,但它似乎不起作用,该行仍然存在,我尝试其他方式,例如更改 style.xml(我从 stackoverflow 中找到),但它也不起作用。有什么想法吗?
我的标签 xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<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" >
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_above="@android:id/tabs" />
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="#FFFFFF"
android:tabStripEnabled="false"
android:layout_gravity="bottom" />
</RelativeLayout>
</TabHost>
</LinearLayout>
最佳答案
您可以使用以下语句删除选项卡的底部 strip 和选项卡之间的分隔线。
TabHost t;
t.getTabWidget().setStripEnabled(false);
t.getTabWidget().setDividerDrawable(R.drawable.ic_launcher);
关于android:tabStripEnabled ="false"不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12047693/
我正在使用 tabhost 并试图禁用标签边框线。我用过这个 android:tabStripEnabled="false"在我的 XML 中,但它似乎不起作用,该行仍然存在,我尝试其他方式,例如更改
Android 2.2 即 API 级别 8 为 TabWidget 设置了 tabStripEnabled="true"如何在旧版本的 Android 中实现相同的目标? 最佳答案 private
Android 2.2 即 API 级别 8 为 TabWidget 设置了 tabStripEnabled="true"如何在旧版本的 Android 中实现相同的目标? 最佳答案 private
我是一名优秀的程序员,十分优秀!