I want this spacing between the tabs removed, How can this be achieved ?
I solved this issued by,
tabHost.getTabWidget().setDividerDrawable(null);
If your build target is Honeycomb onwards, you may use the following code also.
if (Integer.parseInt(Build.VERSION.SDK) >= Build.VERSION_CODES.HONEYCOMB) {
tabHost.getTabWidget().setShowDividers(LinearLayout.SHOW_DIVIDER_NONE);
}
Before some times i have the same problem and my problem was resolved by setting padding to "0". I thinks, its taking some padding by default. So if you don't want space between your TabWidget, try the blow code.Please let me know if my solution will resolve your problem.
for (int i = 0; i < tabHost.getTabWidget().getChildCount(); i++) {
tabHost.getTabWidget().getChildAt(i).setPadding(0, 0, 0, 0);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With