@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout); mRlTop = (RelativeLayout) findViewById(R.id.toprl); mllAnimllId = (LinearLayout) findViewById(R.id.animll_id); mTvLogin = (ImageView) findViewById(R.id.login_tv); mUserName = (TextView) findViewById(R.id.user_name); mIvMainLeftHead = (CircleImageView) findViewById(R.id.iv_main_left_head); mRl = (RelativeLayout) findViewById(R.id.rl); mRlTop.setOnClickListener(this); mTvLogin.setOnClickListener(this); mllAnimllId.setOnClickListener(this); mUserName.setOnClickListener(this); mIvMainLeftHead.setOnClickListener(this); initFragment(); initDrawerLayout(); initDrawerList(); initUmengStatistics(); initUmengUpdate(); }
@Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); mDrawerToggle.onConfigurationChanged(newConfig); }
@Override protected void onPostCreate(Bundle savedInstanceState) { super.onPostCreate(savedInstanceState); mDrawerToggle.syncState(); }