How do I programmatically add a button into the inflated layout from an adapter?

Have two view files for each scenario. You will overkill yourself with the problem to add views at the desired place by code Or have one view that holds the button, and set visibility to GONE to dismiss when you don't needed ((TextView) inflatedview. FindViewById(R.id.

Custombut)). SetVisibility(View. GONE).

Have two view files for each scenario. You will overkill yourself with the problem to add views at the desired place by code. Or have one view that holds the button, and set visibility to GONE to dismiss when you don't needed.((TextView) inflatedview.

FindViewById(R.id. Custombut)). SetVisibility(View.

GONE).

Yeah, my first instinct was to have additional layouts and just inflate the correct one at runtime. Though I would need several layouts. Its not a bad solution just wondered if this was a best practice or not.

The other solution was to have all the widgets Ill ever need but have them hidden, and reveal as needed at runtime. – Eno Apr 2 '10 at 20:40.

You will overkill yourself with the problem to add views at the desired place by code. Or have one view that holds the button, and set visibility to GONE to dismiss when you don't needed.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions