android - How to set a drawable height and width? -


i have grid shows drawables png files.

now, when press on 1 or more of drawables shows in edittext field.

the thing image bit large compared text, know how can adjust size of drawables?

i guess got next code -

    @override public drawable getdrawable(string arg0) {       int id = 0;      if(arg0.equals("zero.png")){         id = r.drawable.emoji_0030;     }      if(arg0.equals("slash.png")){         id = r.drawable.emoji_0023;     }     levellistdrawable d = new levellistdrawable();     drawable empty = getresources().getdrawable(id);     d.addlevel(0, 0, empty);     d.setbounds(0, 0, empty.getintrinsicwidth(), empty.getintrinsicheight());      return d;  } 

so tired change - d.setbounds - let's -

d.setbounds(0, 0, 10, 10); 

or next code (just see if makes difference) -

d.setbounds(5, 5, 5, 5); 

but nothing happening.

so if somone tell me should place figures height , width, nice.

or maybe there's way i'm trying on here?

thanks kind of help


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -