Code example for LocalActivityManager

Methods: destroyActivity

0
    public boolean onKeyDown(int keyCode, KeyEvent event) {
        if (keyCode == KeyEvent.KEYCODE_BACK) {
            int size = mIds.size();
            if (size > 0) {
                String topId = mIds.pop();
                View view = mActivityManager.destroyActivity(topId, true).getDecorView();
                mAnimator.removeView(view);
                if (size > 1) {
                    return true; 
                } 
            } 
        } 
        return super.onKeyDown(keyCode, event);
    } 
     
     
     
 /*    
    public static TextView makeTextView(Context context, String text, int bgColor) { 
        TextView tv = new TextView(context); 
        tv.setText(text);