¡@

Home 

2014/10/16 ¤W¤È 08:21:44

android Programming Glossary: quoteadapter

Am I creating my custom ArrayAdapter correctly?

http://stackoverflow.com/questions/3614934/am-i-creating-my-custom-arrayadapter-correctly

0 quotes new ArrayList Quote populateDefaultQuotes serializeQuotes getQuotesFromYQL this.quotesAdapter new QuoteAdapter this R.layout.mainrow quotes listView.setAdapter this.quotesAdapter listView.setOnItemClickListener new OnItemClickListener.. getApplicationContext myQuote.getName Toast.LENGTH_SHORT toast.show Quote Adapter Private Class private class QuoteAdapter extends ArrayAdapter Quote private ArrayList Quote items public QuoteAdapter Context context int textViewResourceId ArrayList.. Quote Adapter Private Class private class QuoteAdapter extends ArrayAdapter Quote private ArrayList Quote items public QuoteAdapter Context context int textViewResourceId ArrayList Quote items super context textViewResourceId items this.items items ..

How can I make my ArrayAdapter follow the ViewHolder pattern?

http://stackoverflow.com/questions/3832254/how-can-i-make-my-arrayadapter-follow-the-viewholder-pattern

example android apis view List14.html but am not sure how to accomplish this. UPDATE ViewHolder Pattern private class QuoteAdapter extends ArrayAdapter Quote private ArrayList Quote items used to keep selected position in ListView private int selectedPos.. Quote items used to keep selected position in ListView private int selectedPos 1 init value for not selected public QuoteAdapter Context context int textViewResourceId ArrayList Quote items super context textViewResourceId items this.items items public..