我正在開發一個使用標籤的應用程序。我想自定義標籤外觀。我想要刪除一個小行出現在選項卡下,而不是淡出線。我嘗試了很多TabHost的方法,但無法擺脫它。我想,這很簡單,但我找不到方法。如何刪除選項卡下方的漸變線上方的線?
我檢查這個鏈接:
https://stackoverflow.com/questions/3511596/get-rid-of-the-line-under-tabwidget
How to remove black line from tabbar in Android?
不過這也解釋了刪除線的衰落,我不需要。
我想刪除圖像中紅色圓圈的線,我該怎麼做?
appriciated任何幫助。
編輯:
我的XML文件是:
<?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" android:background="#FFFFFF"
android:fadingEdge="none" android:fadeScrollbars="false"
>
<LinearLayout android:orientation="vertical"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:padding="5dp">
<ImageView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:src="@drawable/title"
/>
<View
android:layout_width="fill_parent"
android:layout_height="5dip"
/>
<View
android:layout_width="fill_parent"
android:layout_height="2dip"
android:background="#9deafa"
android:paddingLeft="5dip"
android:paddingRight="5dip"
/>
<View
android:layout_width="fill_parent"
android:layout_height="5dip"
/>
<TabWidget android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<FrameLayout android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp" />
</LinearLayout>
</TabHost>
@Paresh Mayani:我已經通過了它,但它解釋了刪除所有選項卡下的漸變線。我需要刪除它上面的那個。 – Hiral
向我們顯示您的標籤部件代碼。 –
@Yashwanth庫馬爾:我試圖做到這一點,使用tabhost.setStripeEnabled()編程方式根據上的答案,但我沒有找到任何這樣的方法。我正在使用android 2。1,所以我認爲,它不被支持。 – Hiral