I need help interpreting the example below (c) commons I know that to create this custom list view Creates subclass of arredadaptors for
Although I do not understand these lines:
IconicAdapter () {super (DynamicDemo.This, R.layout.row, item); } What does Super () do? And what would be good for logic? Why do I have to pass "objects" as logic, but the other array is not called "rating"?
Full code:
Public category DynamicDemo ListActivity {private string} Item = {"Leram", "Epsom", "Dollar", "Seat", "Amet "," Mickey "," Atium "," Vale "," SaltCenter "," Adipisive "," Elite "," Morbi "," Vale "," Laguela "," Vite "," Archu " Erat "," Playtrat "," Aint "," Portter "," Sodales "," Piledek "," Agu "," Pure "}; Private string [] Rating = {"25%", "65%", "95%", "55%", "15%", "25% r", "25%", "25%", "25 % 25, "25%", "25%", "25%", "25%", "25%", "25%", "25%", "25%", "25%", and " "Over 25%", "25%", "25%", "25%"}; @ Override public wides on earth (bundle); "25%", "25%%", "25%", "25%", "25%", Avalanche); SuperContentView (R.layout.main); SetListAdapter (New IconicAdapter ());} Public void onListItemClick (ListView parent, see V, integer status, long ID) {selection.setText ( Item [Status]);} Class IconicAdapter extends ArrayAdapter & lt; string & gt; {IconicAdapter () {Super (Dynamicmodo.this, R.Lyout.ro, Item) ;} View public view getView (see intview, seeviewview, ViewGroup parents) {layoutInfleter inflater = getLayoutInflater (); line = inflater.inflate (R.layout.row, guardian, wrong); textview label = (text view) line FindVibIID (Raid Label); TextViewLabel2 = (TextView) Row.FindVibeID (R.Label2); label.setText (item [status]); Label2.setText (rating [status]); Return (line); }}
What does super () do?
This superclause causes the constructor to be executed. This is a requirement in Java.
And what would be good for the argument?
Arguments are required by the Superclass constructor.
Why do I need to pass "item" as an argument, rather the second array is called "rating"?
In my example, there is no rating . I have not written the code pasted to you.
Comments
Post a Comment