Closed luvictor closed 8 years ago
可以看下你的布局吗?
<?xml version="1.0" encoding="UTF-8"?> <TabHost xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@android:id/tabhost" android:layout_width="match_parent" android:layout_height="match_parent" tools:ignore="HardcodedText" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="match_parent"
android:layout_height="0.0dip"
android:layout_weight="1.0" />
<TabWidget
android:id="@android:id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.0"
android:visibility="gone" />
<View
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:background="@color/divider" />
<RadioGroup
android:id="@+id/mRadioGroup"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_gravity="bottom"
android:background="@color/white"
android:orientation="horizontal" >
<RadioButton
android:id="@+id/tab_bottom_1"
style="@style/tab_bottom"
android:checked="true"
android:drawableTop="@drawable/sl_tab_bottom_1"
android:text="首页" />
<RadioButton
android:id="@+id/tab_bottom_2"
style="@style/tab_bottom"
android:drawableTop="@drawable/sl_tab_bottom_2"
android:text="我的订单" />
<RadioButton
android:id="@+id/tab_bottom_3"
style="@style/tab_bottom"
android:drawableTop="@drawable/sl_tab_bottom_3"
android:text="个人中心" />
</RadioGroup>
</LinearLayout>
// 这一句是在TabActivity中设置的,不然被TabActivity包含的activity的statusbar是无效的 StatusBarCompat.setStatusBarColor(this, getResources().getColor(R.color.theme_color), 0);
最外层布局是 LinearLayout?
TabActivity的最外层是TabHost, activity的最外层是LinearLayout
好的 我试试哈
是 Android 4.4 吗?
是的,5.0以上正常,我是在genymotion4.4上测试的
我晚点再试试哈 现在没有4.4的机器
好的,谢谢。早点休息
我没有问题额..要不你试试真机?
可以加qq聊吗? 我的是468034043
在 4.4 上会有这个问题, 可以考虑给颜色加上透明度来模拟 Material Design
在TabActivity下状态栏底部也会有一条黑线