How to update Master/Detail Flow list Android

Home / java / How to update Master/Detail Flow list Android

Question:
I have a question about Master/Detail flow Activity. The matter is I have MainActivity, where are 2 buttons and I have 1 java class which calls Support, where I am located 3 static Arraylists. Two of them are different and the third one I use as support list – signed to it one of the others depends on a button. On the third list, I build all Master/Detail Flow. This is my actions on buttons pushing at MainActivity:public void goToRandom(View v){
Support.LISTLOAD=Support.LIST;
Intent intent = new Intent(this, ProfileListActivity.class);
startActivity(intent);
}

public void goToPrimary(View v){
Support.LISTLOAD=Support.PRIMELIST;
Intent intent = new Intent(this, ProfileListActivity.class);
startActivity(intent);
}
Problem explanation: The problem is when I start the app it build the correct list of items only for the first choice, does not matter which button I’ll choose – it will be correct. But when I move back and choose another button – Item list still from the first selection. Detail list works correctly. How can I solve this problem with the list of items? I think it is possible to do by destroying that list and creating new every time when I push a button, but I don’t know how to recreate activity from other activity.


Answer:

Read more

Leave a Reply

Your email address will not be published. Required fields are marked *