Im trying to solve this problem for about 2 hours. So Im glad for every possible answer. Ive got a custom ListViewAdapter and it takes his content from an Array. But I have 19 Arrays and I want to change the Content(therefor the Array) based on which date the User clicks(there is a Calendar on the top with 19 Dates). Here is a picture:

So by default ervy time you open the App the content from the "date_1" Array will be shown(for the 25. in the calender). And when you click on an other date the content from the Array belonging to this date will be shown(e.g. 26. -> date_2, 27. date_3 and so on). Every Array has to get load from the resources and is saved in a single Array Variable.
So my problem: I can't change the Array. Here is my code:
// this is the Array Variable:
String[] day_chosen;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.calender);
[...]
prepareArrayLits();
lview3 = (ListView) findViewById(R.id.listView1);
adapter = new ListViewCustomAdapter(this, itemList);
lview3.setAdapter(adapter);
lview3.setOnItemClickListener(this);
}
public void onItemClick1(AdapterView<?> arg0, View arg1, int position, long id) {
// TODO Auto-generated method stub
}
/* Method used to prepare the ArrayList,
*/
public void prepareArrayLits()
{
// this is where the Arrays get loaded from the resource:
day_chosen = getResources().getStringArray(R.array.date_1);
//this Array is not relvant:
String[] sports = getResources().getStringArray(R.array.sports_array);
itemList = new ArrayList<Object>();
for (int counter = 0; counter < day_chosen.length; counter+=4){
int Intparser = Integer.parseInt(day_chosen[counter+1]);
AddObjectToList(imgid(Intparser), sports[Intparser],day_chosen[counter],day_chosen[counter+3], backgroundbox(Intparser)) ;
}
}
// Add one item into the Array List
public void AddObjectToList(int image, String title, String desc, String time, int backbox)
{
bean = new ItemBean();
bean.setBackBox(backbox);
bean.setTime(time);
bean.setDescription(desc);
bean.setImage(image);
bean.setTitle(title);
itemList.add(bean);
}
[...]
}
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
// TODO Auto-generated method stub
}
// the onClick Events for every date:
public void onClick(View v) {
// TODO Auto-generated method stub
switch(v.getId()){
case R.id.d_1 :
// I tried to change the Array from here(But it didn't work):
day_chosen = getResources().getStringArray(R.array.date_1);
break;
case R.id.d_2 :
day_chosen = getResources().getStringArray(R.array.date_2);
break;
[...]
}
}
What have I tried:
I set up a Global Class but it didn't work
I tried to set up getters and setters. But also didn't work
I don't know how to solve this. Every possible solution is appreciated, Thanks.