1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-11-25 02:12:16 -05:00

Migrate MainActivity to use AppCompatActivity.

This commit is contained in:
Sebastian Kaspari 2015-04-24 21:51:55 +02:00
parent 19c9541307
commit 7f680f1282

View File

@ -30,6 +30,7 @@ import android.os.IBinder;
import android.support.v4.widget.DrawerLayout; import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBarActivity; import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.ActionBarDrawerToggle; import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar; import android.support.v7.widget.Toolbar;
import android.util.TypedValue; import android.util.TypedValue;
import android.view.MenuItem; import android.view.MenuItem;
@ -51,7 +52,7 @@ import org.yaaic.model.Status;
/** /**
* The main activity of Yaaic. We'll add, remove and replace fragments here. * The main activity of Yaaic. We'll add, remove and replace fragments here.
*/ */
public class MainActivity extends ActionBarActivity implements YaaicActivity, ServiceConnection { public class MainActivity extends AppCompatActivity implements YaaicActivity, ServiceConnection {
private ActionBarDrawerToggle toggle; private ActionBarDrawerToggle toggle;
private Toolbar toolbar; private Toolbar toolbar;
private DrawerLayout drawer; private DrawerLayout drawer;
@ -59,13 +60,13 @@ public class MainActivity extends ActionBarActivity implements YaaicActivity, Se
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main); setContentView(R.layout.activity_main);
initializeToolbar(); initializeToolbar();
initializeDrawer(); initializeDrawer();
super.onCreate(savedInstanceState);
if (savedInstanceState == null) { if (savedInstanceState == null) {
onOverview(null); onOverview(null);
} }