How to place a textview to the right of image view in android using java code? -
i have image view , text view.the text view coming below image view.i need textview right of image view.how it?
linearlayout thelayoutl = new linearlayout(getapplicationcontext()); thelayoutl.setorientation(linearlayout.vertical); imageview theitemimagel = new imageview(mcontextl); theitemimagel.setimagebitmap(itemimagebyteslistg.get(positionp)); theitemimagel.setscaletype(imageview.scaletype.fit_xy); theitemimagel.setlayoutparams(new listview.layoutparams(100, 100)); textview tvitemnamel = new textview(mcontextl); tvitemnamel.settext(zitemnamelistg.get(positionp)); tvitemnamel.setgravity(gravity.center); tvitemnamel.settextsize(10); tvitemnamel.settextcolor(color.parsecolor("#000000"));
try thelayoutl.setorientation(linearlayout.horizontal);
android
No comments:
Post a Comment