How about creating a method outside of your onCreate() that does all of the Activities work, and in your onCreate method, it calls that to load the Activity. If you need to refresh your Activity, just call that new method. For example:
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
loadActivity();
}
private void loadActivity() {
// Do all of your work here
}
private OnClickListener ReloadActivity = new OnClickListener() {
public void onClick(View v) {
loadActivity();
}
};
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…