import cn.jpush.android.api.JPushInterface;
public class BaseActivity extends FragmentActivity implements MyRequestCallBack.SuccessResult ,View.OnClickListener{
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
this.requestWindowFeature(Window.FEATURE_NO_TITLE);//
super.onCreate(savedInstanceState);
AppManager.getAppManager().addActivity(this);
JPushInterface.setDebugMode(true);
JPushInterface.init(this);
MyLog.showLog(getClass().getCanonicalName());
}
ProgressDialog mProgressDialog;
/*
* 显示进度框
*/
public void showProgressDialog(String msg) {
if (mProgressDialog == null) {
mProgressDialog = new ProgressDialog(this);
mProgressDialog.setCancelable(true);
mProgressDialog.setMessage(msg);
}
if(!mProgressDialog.isShowing())
mProgressDialog.show();
}
public void showProgressDialog(String msg ,boolean cancleble) {
if (mProgressDialog == null) {
mProgressDialog = new ProgressDialog(this);
mProgressDialog.setCancelable(cancleble);
mProgressDialog.setMessage(msg);
}
if(!mProgressDialog.isShowing())
mProgressDialog.show();
}
/*
* 隐藏进度框
*/
public void cancelProgressDialog() {
if(mProgressDialog!=null&&mProgressDialog.isShowing())
mProgressDialog.cancel();
}
@Override
public void onSuccessResult(String str, int flag) {
}
@Override
public void onFaileResult(String str, int flag) {
}
@Override
protected void onResume() {
// TODO Auto-generated method stub
super.onResume();
JPushInterface.setDebugMode(true);
JPushInterface.init(this);
}
@Override
protected void onDestroy() {
// TODO Auto-generated method stub
super.onDestroy();
//AppManager.getAppManager().finishActivity();
}
@Override
public void onClick(View v) {
}
}