I’m still new to Java in general, so I decided some SOF input would be helpful on this question-
I have a Button that, when clicked, I want a ProgressBar to show next to it. I would like to do this with a style, preferably to just send the needed style via setBackgroundDrawable.
I’ve done this in CSS a number of times where I just add a class which contains the background element I need and pushes the text out a handful of pixels. I’m hoping I can do something similar because I have a lot of Button objects to perform this on.
I’ve used JS to create an example of what I want to accomplish. I’m hoping this will iterate my point better:
http://jsfiddle.net/puPdK/3/
Please feel to let me know if there is a better way. I’m all ears! Thanks.
I decided the best way to do this (to my knowledge) was to wrap my button in a horizontal
LinearLayout. When the button is clicked, I add anew ProgressBaras child zero to my the layout (egcontainer.addView(myProgressBar, 0). When the loading is done, I then remove the first child from my layoutcontainer.removeViewAt(0). Viola.