TabWidget


android:tabStripEnabled="false"


<TabWidget

            android:id="@android:id/tabs"

            style="@style/Widget.TabWidget"

            android:layout_width="fill_parent"

            android:layout_height="wrap_content"

            android:tabStripEnabled="false" />



---------------------------------------------------------------------------------------------------------------------------------------


TabWidget tw = getTabWidget();

Field mBottomLeftStrip;

Field mBottomRightStrip;


try {

mBottomLeftStrip = tw.getClass().getDeclaredField("mBottomLeftStrip");

mBottomRightStrip = tw.getClass().getDeclaredField("mBottomRightStrip");


if (!mBottomLeftStrip.isAccessible()) {

mBottomLeftStrip.setAccessible(true);

}


if (!mBottomRightStrip.isAccessible()) {

mBottomRightStrip.setAccessible(true);

}


mBottomLeftStrip.set(tw, getResources().getDrawable(R.drawable.blank));

mBottomRightStrip.set(tw, getResources().getDrawable(R.drawable.blank));


} catch (java.lang.NoSuchFieldException e) {

// possibly 2.2 and above device

try {

Method stripEnabled = tw.getClass().getDeclaredMethod("setStripEnabled", boolean.class);

stripEnabled.invoke(tw, false);


} catch (Exception e1) {

e1.printStackTrace();

}

} catch (Exception e) {

Log.e(Constants.LOG_TAG, "Failed removing tabui bottom strip", e);

}


Posted by [czar]
,