java - Line break in TextView adds padding -


this textview:

public iconifiedtextview(context context, iconifiedtext aiconifiedtext) {     super(context);      /*      * first icon , text right (horizontal), not above ,      * below (vertical)      */     this.setorientation(horizontal);      micon = new imageview(context);     micon.setimagedrawable(aiconifiedtext.geticon());     // left, top, right, bottom     micon.setpadding(0, 3, 7, 3); // 5px right      /*      * @ first, add icon ourself (! extending linearlayout)      */     addview(micon, new linearlayout.layoutparams(layoutparams.wrap_content,             layoutparams.wrap_content));      mtext = new textview(context);     mtext.settext(aiconifiedtext.gettext());     mtext.settextsize(16);     /* text (after icon) */     addview(mtext, new linearlayout.layoutparams(layoutparams.wrap_content,             layoutparams.wrap_content));       minfo = new textview(context);     minfo.settext(aiconifiedtext.getinfo());     /* info (below text) */     addview(minfo, new linearlayout.layoutparams(layoutparams.wrap_content,             layoutparams.wrap_content)); } 

and when call object have:

this.directoryentries.add(new iconifiedtext(currentfile                     .getpath(), currenticon, "\ninfo")); 

where "\ninfo" replaced later. when run this, this:

d  info data     info dev    info system       info 

how rid of padding left of info both start @ same place?

this.directoryentries.add(new iconifiedtext(currentfile                     .getpath(), currenticon, "\r\ninfo")); 

Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -