java - android scale tab image -


I set an image for each tab and the result is expected but on some devices (tablets or some smartphone models) Image is seen bigger and above text How to solve it? Thank you

Activity,

  state selector selector = new state listdable (); Selector.addState (new int [] (android.R.attr.state_selected}, DSL); icon.setImageDrawable (selector);  

layout,

  & Nbsp; TabHost xmlns: android = "http://schemas.android.com/apk/res/android" Android: id = "@ Android: id / tabhost" Android: layout_width = "fill_preview" Android: layout_heil = " Fill_parant "> gt; RelativeLayout Android: layout_width =" fill_parent "Android: layout_height =" fill_parent ">  & Lt; / LinearLayout & gt; & Lt; / RelativeLayout & gt;  

Enter image details here

< P> I believe these links will guide you to solve your problem.


Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -