I'm not sure if i made good title (still new in android).
Question: If I make function:
public void refresh_lists() {
// wyswietlanie listy miesiecy
ArrayAdapter<String> month_adapter = new ArrayAdapter<String>(this,
android.R.layout.simple_list_item_1, miesiac_data);
month_list_v.setAdapter(month_adapter);
// wyswietlanie listy dni
ArrayAdapter<String> daily_adapter = new ArrayAdapter<String>(this,
android.R.layout.simple_list_item_1, dzien_data);
daily_list_v.setAdapter(daily_adapter);
}
(miesiac_data
and dzien_data
are String
arrays)
Then remake arrays somewhere else, like:
miesiac_data[] = new String[new_length];
dzien_data[] = new String[new_length];
Then add new records to arrays and finally, add refresh_list
function as onClick()
effect, does it create new lists everytime I push button, or just refreshes old ones?