Reputation: 188
i want to insert an image to do a button. But i want insert it through the code, no with the .xml file. There is someone that have any idea?
Upvotes: 0
Views: 70
Reputation: 1347
Try This:
ImageButton ib = new ImageButton(this);
yourContainer.addView(ib);//here yourContainer is ParentLayout
Upvotes: 1