Skip to content

Instantly share code, notes, and snippets.

View jamesgathu's full-sized avatar
🎯
Focusing

James Gathu jamesgathu

🎯
Focusing
View GitHub Profile
@jamesgathu
jamesgathu / CustomArrayAdapter.java
Last active April 3, 2020 08:25
ArrayAdapter with custom view using anonymous class
periodsAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, new String[]{"loading..."}) {
View render(View convertView, int position) {
if (convertView == null) {
convertView = getLayoutInflater().inflate(R.layout.single_month, null);
}
// TODO set some data to views
return convertView;
}