问题描述
由于管理的ActivityGroup在视形式的活动,所以当我试图回到返回到调用的ActivityGroup孩子活动的onResume()被不会被调用父活动。
As ActivityGroup manages the Activities in the form of view, so when I try to return back to the Parent Activity that called the child Activity in ActivityGroup the onResume() is not being called.
我打过电话了OnResume()这样的。
I tried calling the OnResume() like this.
((Activity)view.getContext()).onResume();
但它不工作,而不是完成()工作就够了。
But its not working, instead finish() is working is fine for me.
((Activity)view.getContext()).finish();
所以,我能够从查看的活动,但不能够调用onResume(),任何想法将AP preciable。
So, I am able to get the Activity from the View, but not able to call the onResume(), any idea will be appreciable.
推荐答案
试试这个,按钮使用的ActivityGroup当你preSS回来。
Try this, when you press back button using ActivityGroup.
public void back()
{
if ( arrList.size() > 1 )
{
arrList.remove(arrList.size() - 1);
View v = arrList.get(arrList.size() - 1);
Activity_name object = ((Activity_name)v.getContext());
object.onResume();
setContentView(v);
}
else {
this.finish();
}
}
这篇关于OnResume()不是由$ P $叫的ActivityGroup pssing后退按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!