Search code examples
androidandroid-tabhost

Setting TabHost layout parameters using java code?


I am in a condition that my app needs TabHost using only java code not the xml . But i need the TabHost height to be set 20dp. Is that possible using only java code?

Please help?


Solution

  • Try this. hope it may be helpful

    tabHost.getTabWidget().getChildAt(index).getLayoutParams().height =(int) height;