@@ -0,0 +1,2490 @@
+package com.mcxiaoke.commons.app;%0A%0Aimport android.app.Activity;%0Aimport android.os.Bundle;%0Aimport android.view.MenuItem;%0Aimport com.mcxiaoke.commons.utils.LogUtils;%0A%0A/**%0A * User: mcxiaoke%0A * Date: 14-3-5%0A * Time: 11:49%0A */%0Apublic abstract class NextActivity extends Activity %7B%0A    private static final String BASE_TAG = NextActivity.class.getSimpleName();%0A    public static final boolean DEBUG = false;%0A%0A    private boolean mPaused;%0A%0A    @Override%0A    protected void onCreate(Bundle savedInstanceState) %7B%0A        super.onCreate(savedInstanceState);%0A        if (DEBUG) %7B%0A            LogUtils.d(BASE_TAG, %22onCreate() activity=%22 + getActivity());%0A        %7D%0A    %7D%0A%0A    @Override%0A    protected void onResume() %7B%0A        super.onResume();%0A        mPaused = false;%0A    %7D%0A%0A    @Override%0A    protected void onPause() %7B%0A        super.onPause();%0A        mPaused = true;%0A    %7D%0A%0A    protected boolean isPaused() %7B%0A        return mPaused;%0A    %7D%0A%0A    @Override%0A    protected void onPostResume() %7B%0A        super.onPostResume();%0A    %7D%0A%0A    @Override%0A    protected void onDestroy() %7B%0A        super.onDestroy();%0A        if (DEBUG) %7B%0A            LogUtils.d(BASE_TAG, %22onDestroy() activity=%22 + getActivity());%0A        %7D%0A    %7D%0A%0A    @Override%0A    public void onBackPressed() %7B%0A        super.onBackPressed();%0A        LogUtils.v(BASE_TAG, %22onBackPressed() activity=%22 + getActivity());%0A    %7D%0A%0A    protected void onHomeClick() %7B%0A        if (isFinishing()) %7B%0A            return;%0A        %7D%0A%0A        LogUtils.v(BASE_TAG, %22onHomeClick() activity=%22 + getActivity());%0A        onBackPressed();%0A    %7D%0A%0A    protected NextActivity getActivity() %7B%0A        return this;%0A    %7D%0A%0A    @Override%0A    public boolean onOptionsItemSelected(MenuItem item) %7B%0A        if (android.R.id.home == item.getItemId()) %7B%0A            onHomeClick();%0A            return true;%0A        %7D%0A        return super.onOptionsItemSelected(item);%0A    %7D%0A%0A    public void showProgressIndicator() %7B%0A        setProgressBarIndeterminateVisibility(true);%0A    %7D%0A%0A    public void hideProgressIndicator() %7B%0A        setProgressBarIndeterminateVisibility(false);%0A    %7D%0A%0A    public void setActionBarTitle(CharSequence text) %7B%0A        getActionBar().setTitle(text);%0A    %7D%0A%0A    public void setActionBarTitle(int resId) %7B%0A        getActionBar().setTitle(resId);%0A    %7D%0A%0A    public void setActionBarSubtitle(CharSequence text) %7B%0A        getActionBar().setSubtitle(text);%0A    %7D%0A%0A    public void setActionBarSubtitle(int resId) %7B%0A        getActionBar().setSubtitle(resId);%0A    %7D%0A%0A%7D%0A

add nextactiity