public boolean checkUserLogin() { if (userManager == null || userManager.getCurrentUser() == null) { Intent intent = new Intent(); intent.setClass(this, UserLoginActivity.class); startAnimActivity(intent); return true; } return false; }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mApplication = CustomApplcation.getInstance(); DisplayMetrics metric = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(metric); mScreenWidth = metric.widthPixels; mScreenHeight = metric.heightPixels; mInFlater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE); userManager = UserManager.getInstance(this); }