There is a gap between android action bar and tabs. why? -
i have created custom layout actionbar has tabview. there gap between action bar , tabs in black. kindly see below image. using theme theme.appcompat.light.darkactionbar target sdk: 19 please help.
style.xml below:
<!-- application theme. --> <style name="apptheme" parent="theme.appcompat.light.darkactionbar"> <item name="actionbarsize">36dip</item> </style> activity_main.xml
<linearlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <android.support.design.widget.tablayout android:id="@+id/sliding_tabs" android:layout_width="match_parent" android:layout_height="wrap_content" app:theme="@style/mycustomtablayout" app:tabbackground="@android:color/holo_orange_dark" app:tabindicatorcolor="@android:color/holo_green_dark" app:tabtextcolor="@android:color/white" app:tabselectedtextcolor="@android:color/black"/> <android.support.v4.view.viewpager android:id="@+id/viewpager" android:layout_width="match_parent" android:layout_height="0px" android:layout_weight="1" android:background="@android:color/white" /> custom action bar
<relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@android:color/holo_orange_dark"> <spinner android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/spinneractionbar" />
try use toolbar actionbar deprecate now. can have more functionality actionbar.
here example need use
Comments
Post a Comment