Android: Dynamically create image button with click event -


I am new to Android and should have a list of image buttons in an activity based on the data I have in a database I have not made anything like Android before and so, so far I am using HTML table to show my data in grid view. I am not asking for any special code, I do not know about how to implement it now. I want to know what is the best way.

One problem I have come up with is the events of the click (the way I am doing them so far) which does not take any event erg, so I will call them the button Can not get from.

If you are certain that the OnClickListener instance is applied to a button, then you have only one button You can get the view and receive the text:

  public void onClick (see v) {// 1) Probably for example check the first button b = (button) v; String Button Text = B.Get Text () ToString (); }    

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -