
package com.example.star.zhihudaily.base;

import android.annotation.SuppressLint;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

public class BaseActivity extends AppCompatActivity {

    @SuppressLint("NewApi")
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

//        if (getSupportActionBar() != null) {
//            getSupportActionBar().setDisplayHomeAsUpEnabled(true);
//            getSupportActionBar().setDisplayShowTitleEnabled(true);
//            getSupportActionBar().setElevation(0);
//            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
////                Drawable up = getResources().getDrawable(R.drawable.ic_action_arrow_back);
////                DrawableCompat.setAutoMirrored(up, true);
////                getSupportActionBar().setHomeAsUpIndicator(up);
//            }
//        }
    }

    @Override
    public void onStart() {
        super.onStart();
//        GoogleAnalytics.getInstance(this).reportActivityStart(this);
//        FlurryAgent.onStartSession(this, ShouApplication.FLURRY_KEY);
    }

    @Override
    public void onStop() {
        super.onStop();
//        GoogleAnalytics.getInstance(this).reportActivityStop(this);
//        FlurryAgent.onEndSession(this);
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
    }

//    @Override
//    public boolean onOptionsItemSelected(MenuItem item) {
//        switch (item.getItemId()) {
//            case android.R.themeId.home:
//                finish();
//                return true;
//        }
//        return super.onOptionsItemSelected(item);
//    }

}

@@ -151,16 +151,46 @@
 ctivity;
+%0Aimport android.view.MenuItem;
 %0A%0Apublic
@@ -385,972 +385,151 @@
 e);%0A
-%0A//        if (getSupportActionBar() != null) %7B%0A//            getSupportActionBar().setDisplayHomeAsUpEnabled(true);%0A//            getSupportActionBar().setDisplayShowTitleEnabled(true);%0A//            getSupportActionBar().setElevation(0);%0A//            if (Build.VERSION.SDK_INT %3E= Build.VERSION_CODES.KITKAT) %7B%0A////                Drawable up = getResources().getDrawable(R.drawable.ic_action_arrow_back);%0A////                DrawableCompat.setAutoMirrored(up, true);%0A////                getSupportActionBar().setHomeAsUpIndicator(up);%0A//            %7D%0A//        %7D%0A    %7D%0A%0A    @Override%0A    public void onStart() %7B%0A        super.onStart();%0A//        GoogleAnalytics.getInstance(this).reportActivityStart(this);%0A//        FlurryAgent.onStartSession(this, ShouApplication.FLURRY_KEY);%0A    %7D%0A%0A    @Override%0A    public void onStop() %7B%0A        super.onStop();%0A//        GoogleAnalytics.getInstance(this).reportActivityStop(this);%0A//        FlurryAgent.onEndSession(this
+    %7D%0A%0A    @Override%0A    public void onStart() %7B%0A        super.onStart();%0A    %7D%0A%0A    @Override%0A    public void onStop() %7B%0A        super.onStop(
 );%0A 
@@ -615,18 +615,16 @@
 %0A    %7D%0A%0A
-//
     @Ove
@@ -629,18 +629,16 @@
 verride%0A
-//
     publ
@@ -683,26 +683,24 @@
 tem item) %7B%0A
-//
         swit
@@ -723,18 +723,16 @@
 Id()) %7B%0A
-//
         
@@ -754,22 +754,17 @@
 d.R.
-themeI
+i
 d.home:%0A
 //  
@@ -759,18 +759,16 @@
 d.home:%0A
-//
         
@@ -785,18 +785,16 @@
 nish();%0A
-//
         
@@ -814,18 +814,16 @@
 n true;%0A
-//
         
@@ -824,18 +824,16 @@
       %7D%0A
-//
         
@@ -878,10 +878,8 @@
 m);%0A
-//
     

remove unused code