How Do I Create Marginless Button Bar In Android
I want my application to have button bar at the bottom, that is similar to this one (Motorola Defy+): How can this be achieved? I've tried ButtonBar style with regular buttons in
Solution 1:
By code:
Make the bar LinearLayout horizontal. Let´s say its name in code will be bbll.
LinearLayout.LayoutParams params = bbll.LayoutParams();
params.leftMargin=0;
params.rightMargin=0;
... orparams.setMargins(0, 0, 0, 0);
bbll.setLayoutParams(params);
By layout simply set each margin to 0. That's all. If you have done it and it won't work, put the code here, please.
But you should set bbll.setPadding(0,0,0,0)
, too. Or you'll see empty space between the bar (that is invisible) and the buttons. aqs has a good thought.
Post a Comment for "How Do I Create Marginless Button Bar In Android"