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

java - NullPointerException for a 2d Array -

python - Assemble mpeg file unable to play in mediaplayer -

c# - NameSpace Manager or XsltContent to parse aspx page -