syncslides: Move DeckChooserActivity.

Move DeckChooserActivity and related fragments to the new project.
The main functionality of the activity is commented out, but the
navigation drawer works.

I moved all of the resources over all at once rather than trying to
do it selectively.  I don't expect to change any of these resources
as part of refactoring the code, so they will all be used as is.

Change-Id: Ia67871e89636af840c10364545ffa1836ff6198d
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index f30168e..0f1223b 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -26,11 +26,9 @@
                 <category android:name="android.intent.category.LAUNCHER"/>
             </intent-filter>
         </activity>
-
         <activity
-            android:name=".MainActivity"
-            android:label="@string/app_name"
-            android:theme="@style/AppTheme.NoActionBar">
+            android:name=".DeckChooserActivity"
+            android:label="@string/app_name" >
         </activity>
     </application>
 
diff --git a/android/app/src/main/java/io/v/syncslides/DeckChooserActivity.java b/android/app/src/main/java/io/v/syncslides/DeckChooserActivity.java
new file mode 100644
index 0000000..dba60e0
--- /dev/null
+++ b/android/app/src/main/java/io/v/syncslides/DeckChooserActivity.java
@@ -0,0 +1,90 @@
+// Copyright 2015 The Vanadium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package io.v.syncslides;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.support.v4.app.FragmentManager;
+import android.support.v4.widget.DrawerLayout;
+import android.support.v7.app.AppCompatActivity;
+import android.util.Log;
+import android.view.Menu;
+
+import io.v.syncslides.V23;
+
+public class DeckChooserActivity extends AppCompatActivity
+        implements NavigationDrawerFragment.NavigationDrawerCallbacks {
+
+    private static final String TAG = "DeckChooser";
+    /**
+     * Fragment managing the behaviors, interactions and deck of the navigation
+     * drawer.
+     */
+    private NavigationDrawerFragment mNavigationDrawerFragment;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        // Immediately initialize V23, possibly sending user to the
+        // AccountManager to get blessings.
+        V23.Singleton.get().init(getApplicationContext(), this);
+
+        setContentView(R.layout.activity_deck_chooser);
+
+        mNavigationDrawerFragment = (NavigationDrawerFragment)
+                getSupportFragmentManager().findFragmentById(R.id.navigation_drawer);
+        // Set up the drawer.
+        mNavigationDrawerFragment.setUp(
+                R.id.navigation_drawer,
+                (DrawerLayout) findViewById(R.id.drawer_layout));
+    }
+
+    @Override
+    public void onNavigationDrawerItemSelected(int position) {
+        // update the main content by replacing fragments
+        FragmentManager fragmentManager = getSupportFragmentManager();
+        fragmentManager.beginTransaction()
+                .replace(R.id.container, DeckChooserFragment.newInstance(position + 1))
+                .commit();
+    }
+
+    public void onSectionAttached(int number) {
+        switch (number) {
+            case 1:
+                Log.i(TAG, "Switched to account " + getString(R.string.title_account1));
+                break;
+            case 2:
+                Log.i(TAG, "Switched to account " + getString(R.string.title_account2));
+                break;
+            case 3:
+                Log.i(TAG, "Switched to account " + getString(R.string.title_account3));
+                break;
+        }
+    }
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        if (!mNavigationDrawerFragment.isDrawerOpen()) {
+            // Only show items in the action bar relevant to this screen
+            // if the drawer is not showing. Otherwise, let the drawer
+            // decide what to show in the action bar.
+            getMenuInflater().inflate(R.menu.deck_chooser, menu);
+            return true;
+        }
+        return super.onCreateOptionsMenu(menu);
+    }
+
+    @Override
+    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+        super.onActivityResult(requestCode, resultCode, data);
+        Log.d(TAG, "onActivityResult");
+        if (V23.Singleton.get().onActivityResult(
+                getApplicationContext(), requestCode, resultCode, data)) {
+            Log.d(TAG, "did the v23 result");
+            return;
+        }
+        // Any other activity results would be handled here.
+    }
+}
diff --git a/android/app/src/main/java/io/v/syncslides/DeckChooserFragment.java b/android/app/src/main/java/io/v/syncslides/DeckChooserFragment.java
new file mode 100644
index 0000000..f142371
--- /dev/null
+++ b/android/app/src/main/java/io/v/syncslides/DeckChooserFragment.java
@@ -0,0 +1,248 @@
+// Copyright 2015 The Vanadium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package io.v.syncslides;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Bundle;
+import android.provider.DocumentsContract;
+import android.support.v4.app.Fragment;
+import android.support.v4.provider.DocumentFile;
+import android.support.v7.widget.GridLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.ViewTreeObserver;
+import android.widget.Toast;
+
+import com.google.common.base.Charsets;
+import com.google.common.io.ByteStreams;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.UUID;
+
+/**
+ * This fragment contains the list of decks as well as the FAB to create a new
+ * deck.
+ */
+public class DeckChooserFragment extends Fragment {
+    /**
+     * The fragment argument representing the section number for this fragment.
+     */
+    private static final String ARG_SECTION_NUMBER = "section_number";
+    private static final String TAG = "DeckChooserFragment";
+    private static final int REQUEST_CODE_IMPORT_DECK = 1000;
+//    private RecyclerView mRecyclerView;
+//    private GridLayoutManager mLayoutManager;
+//    private DeckListAdapter mAdapter;
+
+    /**
+     * Returns a new instance of this fragment for the given section number.
+     */
+    public static DeckChooserFragment newInstance(int sectionNumber) {
+        DeckChooserFragment fragment = new DeckChooserFragment();
+        Bundle args = new Bundle();
+        args.putInt(ARG_SECTION_NUMBER, sectionNumber);
+        fragment.setArguments(args);
+        return fragment;
+    }
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+                             Bundle savedInstanceState) {
+        View rootView = inflater.inflate(R.layout.fragment_deck_chooser, container, false);
+//        FloatingActionButton fab = (FloatingActionButton) rootView.findViewById(R.id.new_deck_fab);
+//        fab.setOnClickListener(new View.OnClickListener() {
+//            @Override
+//            public void onClick(View v) {
+//                onImportDeck();
+//            }
+//        });
+//        mRecyclerView = (RecyclerView) rootView.findViewById(R.id.deck_grid);
+//        mRecyclerView.setHasFixedSize(true);
+//
+//        // Statically set the span count (i.e. number of columns) for now...  See below.
+//        mLayoutManager = new GridLayoutManager(getContext(), 2);
+//        mRecyclerView.setLayoutManager(mLayoutManager);
+//        // Dynamically set the span based on the screen width.  Cribbed from
+//        // http://stackoverflow.com/questions/26666143/recyclerview-gridlayoutmanager-how-to-auto-detect-span-count
+//        mRecyclerView.getViewTreeObserver().addOnGlobalLayoutListener(
+//                new ViewTreeObserver.OnGlobalLayoutListener() {
+//                    @Override
+//                    public void onGlobalLayout() {
+//                        mRecyclerView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
+//                        int viewWidth = mRecyclerView.getMeasuredWidth();
+//                        float cardViewWidth = getActivity().getResources().getDimension(
+//                                R.dimen.deck_card_width);
+//                        int newSpanCount = (int) Math.floor(viewWidth / cardViewWidth);
+//                        mLayoutManager.setSpanCount(newSpanCount);
+//                        mLayoutManager.requestLayout();
+//                    }
+//                });
+
+        return rootView;
+    }
+
+    @Override
+    public void onActivityResult(int requestCode, int resultCode, Intent data) {
+        switch (requestCode) {
+            case REQUEST_CODE_IMPORT_DECK:
+                if (resultCode != Activity.RESULT_OK) {
+                    String errorStr = data != null && data.hasExtra(DocumentsContract.EXTRA_ERROR)
+                            ? data.getStringExtra(DocumentsContract.EXTRA_ERROR)
+                            : "";
+                    toast("Error selecting deck to import " + errorStr);
+                    break;
+                }
+                Uri uri = data.getData();
+                importDeck(DocumentFile.fromTreeUri(getContext(), uri));
+                break;
+        }
+    }
+
+    @Override
+    public void onAttach(Activity activity) {
+        super.onAttach(activity);
+        ((DeckChooserActivity) activity).onSectionAttached(
+                getArguments().getInt(ARG_SECTION_NUMBER));
+    }
+
+    @Override
+    public void onStart() {
+        super.onStart();
+//        Log.i(TAG, "Starting");
+//        DB db = DB.Singleton.get(getActivity().getApplicationContext());
+//        mAdapter = new DeckListAdapter(db);
+//        mAdapter.start(getActivity().getApplicationContext());
+//        mRecyclerView.setAdapter(mAdapter);
+    }
+
+    @Override
+    public void onStop() {
+        super.onStop();
+//        Log.i(TAG, "Stopping");
+//        mAdapter.stop();
+//        mAdapter = null;
+    }
+
+    /**
+     * Import a deck so it shows up in the list of all decks.
+     */
+    private void onImportDeck() {
+        Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT_TREE);
+        startActivityForResult(intent, REQUEST_CODE_IMPORT_DECK);
+    }
+
+    /**
+     * Import a slide deck from the given (local) folder.
+     *
+     * The folder must contain a JSON metadata file 'deck.json' with the following format:
+     * {
+     *     "Title" : "<title>",
+     *     "Thumb" : "<filename>,
+     *     "Slides" : [
+     *          {
+     *              "Thumb" : "<thumb_filename1>",
+     *              "Image" : "<image_filename1>",
+     *              "Note" : "<note1>"
+     *          },
+     *          {
+     *              "Thumb" : "<thumb_filename2>",
+     *              "Image" : "<image_filename2>",
+     *              "Note" : "<note2>"
+     *          },
+     *
+     *          ...
+     *     ]
+     * }
+     *
+     * All the filenames must be local to the given folder.
+     */
+    private void importDeck(DocumentFile dir) {
+//        if (!dir.isDirectory()) {
+//            toast("Must import from a directory, got: " + dir);
+//            return;
+//        }
+//        // Read the deck metadata file.
+//        DocumentFile metadataFile = dir.findFile("deck.json");
+//        if (metadataFile == null) {
+//            toast("Couldn't find deck metadata file 'deck.json'");
+//            return;
+//        }
+//        JSONObject metadata = null;
+//        try {
+//            String data = new String(ByteStreams.toByteArray(
+//                    getActivity().getContentResolver().openInputStream(metadataFile.getUri())),
+//                    Charsets.UTF_8);
+//            metadata = new JSONObject(data);
+//        } catch (FileNotFoundException e) {
+//            toast("Couldn't open deck metadata file: " + e.getMessage());
+//            return;
+//        } catch (IOException e) {
+//            toast("Couldn't read data from deck metadata file: " + e.getMessage());
+//            return;
+//        } catch (JSONException e) {
+//            toast("Couldn't parse deck metadata: " + e.getMessage());
+//            return;
+//        }
+//
+//        try {
+//            String id = UUID.randomUUID().toString();
+//            String title = metadata.getString("Title");
+//            byte[] thumbData = readImage(dir, metadata.getString("Thumb"));
+//            Deck deck = DeckFactory.Singleton.get().make(title, thumbData, id);
+//            Slide[] slides = readSlides(dir, metadata);
+//            DB.Singleton.get(getActivity().getApplicationContext()).importDeck(deck, slides, null);
+//        } catch (JSONException e) {
+//            toast("Invalid format for deck metadata: " + e.getMessage());
+//            return;
+//        } catch (IOException e) {
+//            toast("Error interpreting deck metadata: " + e.getMessage());
+//            return;
+//        }
+    }
+
+//    private Slide[] readSlides(DocumentFile dir, JSONObject metadata)
+//            throws JSONException, IOException {
+//        if (!metadata.has("Slides")) {
+//            return new Slide[0];
+//        }
+//        JSONArray slides = metadata.getJSONArray("Slides");
+//        Slide[] ret = new Slide[slides.length()];
+//        for (int i = 0; i < slides.length(); ++i) {
+//            JSONObject slide = slides.getJSONObject(i);
+//            byte[] thumbData = readImage(dir, slide.getString("Thumb"));
+//            byte[] imageData = thumbData;
+//            if (slide.has("Image")) {
+//                imageData = readImage(dir, slide.getString("Image"));
+//            }
+//            String note = slide.getString("Note");
+//            ret[i] = new SlideImpl(thumbData, imageData, note);
+//        }
+//        return ret;
+//    }
+//
+//    private byte[] readImage(DocumentFile dir, String fileName) throws IOException {
+//        DocumentFile file = dir.findFile(fileName);
+//        if (file == null) {
+//            throw new FileNotFoundException(
+//                    "Image file doesn't exist: " + fileName);
+//        }
+//        return ByteStreams.toByteArray(
+//                getActivity().getContentResolver().openInputStream(file.getUri()));
+//    }
+//
+    private void toast(String msg) {
+        Toast.makeText(getActivity(), msg, Toast.LENGTH_LONG).show();
+    }
+}
diff --git a/android/app/src/main/java/io/v/syncslides/MainActivity.java b/android/app/src/main/java/io/v/syncslides/MainActivity.java
deleted file mode 100644
index fc3872d..0000000
--- a/android/app/src/main/java/io/v/syncslides/MainActivity.java
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright 2015 The Vanadium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package io.v.syncslides;
-
-import android.content.Intent;
-import android.os.Bundle;
-import android.support.design.widget.FloatingActionButton;
-import android.support.design.widget.Snackbar;
-import android.support.v7.app.AppCompatActivity;
-import android.support.v7.widget.Toolbar;
-import android.util.Log;
-import android.view.View;
-import android.view.Menu;
-import android.view.MenuItem;
-
-public class MainActivity extends AppCompatActivity {
-
-    private static final String TAG = "MainActivity";
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-
-        // Immediately initialize V23, possibly sending user to the
-        // AccountManager to get blessings.
-        V23.Singleton.get().init(getApplicationContext(), this);
-
-        setContentView(R.layout.activity_main);
-        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
-        setSupportActionBar(toolbar);
-
-        FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
-        fab.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View view) {
-                Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
-                        .setAction("Action", null).show();
-            }
-        });
-    }
-
-    @Override
-    public boolean onCreateOptionsMenu(Menu menu) {
-        // Inflate the menu; this adds items to the action bar if it is present.
-        getMenuInflater().inflate(R.menu.menu_main, menu);
-        return true;
-    }
-
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        // Handle action bar item clicks here. The action bar will
-        // automatically handle clicks on the Home/Up button, so long
-        // as you specify a parent activity in AndroidManifest.xml.
-        int id = item.getItemId();
-
-        //noinspection SimplifiableIfStatement
-        if (id == R.id.action_settings) {
-            return true;
-        }
-
-        return super.onOptionsItemSelected(item);
-    }
-
-    @Override
-    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
-        super.onActivityResult(requestCode, resultCode, data);
-        Log.d(TAG, "onActivityResult");
-        if (V23.Singleton.get().onActivityResult(
-                getApplicationContext(), requestCode, resultCode, data)) {
-            Log.d(TAG, "did the v23 result");
-            return;
-        }
-        // Any other activity results would be handled here.
-    }
-
-}
diff --git a/android/app/src/main/java/io/v/syncslides/NavigationDrawerFragment.java b/android/app/src/main/java/io/v/syncslides/NavigationDrawerFragment.java
new file mode 100644
index 0000000..5276e17
--- /dev/null
+++ b/android/app/src/main/java/io/v/syncslides/NavigationDrawerFragment.java
@@ -0,0 +1,288 @@
+// Copyright 2015 The Vanadium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package io.v.syncslides;
+
+import android.app.Activity;
+import android.content.SharedPreferences;
+import android.content.res.Configuration;
+import android.os.Bundle;
+import android.preference.PreferenceManager;
+import android.support.v4.app.Fragment;
+import android.support.v4.view.GravityCompat;
+import android.support.v4.widget.DrawerLayout;
+import android.support.v7.app.ActionBar;
+import android.support.v7.app.ActionBarDrawerToggle;
+import android.support.v7.app.AppCompatActivity;
+import android.view.LayoutInflater;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.AdapterView;
+import android.widget.ArrayAdapter;
+import android.widget.ListView;
+import android.widget.TextView;
+
+/**
+ * Fragment used for managing interactions for and presentation of a navigation drawer.
+ * See the <a href="https://developer.android.com/design/patterns/navigation-drawer.html#Interaction">
+ * design guidelines</a> for a complete explanation of the behaviors implemented here.
+ */
+public class NavigationDrawerFragment extends Fragment {
+    private static final String TAG = "NavigationDrawer";
+
+    /**
+     * Remember the position of the selected item.
+     */
+    private static final String STATE_SELECTED_POSITION = "selected_navigation_drawer_position";
+
+    /**
+     * Per the design guidelines, you should show the drawer on launch until the user manually
+     * expands it. This shared preference tracks this.
+     */
+    private static final String PREF_USER_LEARNED_DRAWER = "navigation_drawer_learned";
+
+    /**
+     * A pointer to the current callbacks instance (the Activity).
+     */
+    private NavigationDrawerCallbacks mCallbacks;
+
+    /**
+     * Helper component that ties the action bar to the navigation drawer.
+     */
+    private ActionBarDrawerToggle mDrawerToggle;
+
+    private DrawerLayout mDrawerLayout;
+    private ListView mDrawerListView;
+    private View mFragmentContainerView;
+    private String mUserEmail;
+    private String mUserName;
+
+    private int mCurrentSelectedPosition = 0;
+    private boolean mFromSavedInstanceState;
+    private boolean mUserLearnedDrawer;
+
+    public NavigationDrawerFragment() {
+    }
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        // Read in the flag indicating whether or not the user has demonstrated awareness of the
+        // drawer. See PREF_USER_LEARNED_DRAWER for details.
+        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getActivity());
+        mUserLearnedDrawer = prefs.getBoolean(PREF_USER_LEARNED_DRAWER, false);
+        mUserEmail = SignInActivity.getUserEmail(getActivity());
+        mUserName = SignInActivity.getUserName(getActivity());
+
+        if (savedInstanceState != null) {
+            mCurrentSelectedPosition = savedInstanceState.getInt(STATE_SELECTED_POSITION);
+            mFromSavedInstanceState = true;
+        }
+
+        // Select either the default item (0) or the last selected item.
+        selectItem(mCurrentSelectedPosition);
+    }
+
+    @Override
+    public void onActivityCreated(Bundle savedInstanceState) {
+        super.onActivityCreated(savedInstanceState);
+        // Indicate that this fragment would like to influence the set of actions in the action bar.
+        setHasOptionsMenu(true);
+    }
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+                             Bundle savedInstanceState) {
+        mDrawerListView = (ListView) inflater.inflate(
+                R.layout.fragment_navigation_drawer, container, false);
+        mDrawerListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
+            @Override
+            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+                selectItem(position);
+            }
+        });
+        mDrawerListView.setAdapter(new ArrayAdapter<String>(
+                getActionBar().getThemedContext(),
+                android.R.layout.simple_list_item_activated_2,
+                android.R.id.text1,
+                new String[]{ mUserName }) {
+            @Override
+            public View getView(int position, View convertView, ViewGroup parent) {
+                View view = super.getView(position, convertView, parent);
+                ((TextView) view.findViewById(android.R.id.text1)).setText(mUserName);
+                ((TextView) view.findViewById(android.R.id.text2)).setText(mUserEmail);
+                return view;
+            }
+        });
+        mDrawerListView.setItemChecked(mCurrentSelectedPosition, true);
+        return mDrawerListView;
+    }
+
+    public boolean isDrawerOpen() {
+        return mDrawerLayout != null && mDrawerLayout.isDrawerOpen(mFragmentContainerView);
+    }
+
+    /**
+     * Users of this fragment must call this method to set up the navigation drawer interactions.
+     *
+     * @param fragmentId   The android:id of this fragment in its activity's layout.
+     * @param drawerLayout The DrawerLayout containing this fragment's UI.
+     */
+    public void setUp(int fragmentId, DrawerLayout drawerLayout) {
+        mFragmentContainerView = getActivity().findViewById(fragmentId);
+        mDrawerLayout = drawerLayout;
+
+        // set a custom shadow that overlays the main content when the drawer opens
+        mDrawerLayout.setDrawerShadow(R.drawable.drawer_shadow, GravityCompat.START);
+        // set up the drawer's list view with items and click listener
+
+        ActionBar actionBar = getActionBar();
+        actionBar.setDisplayHomeAsUpEnabled(true);
+        actionBar.setHomeButtonEnabled(true);
+
+        // ActionBarDrawerToggle ties together the the proper interactions
+        // between the navigation drawer and the action bar app icon.
+        mDrawerToggle = new ActionBarDrawerToggle(
+                getActivity(),                    /* host Activity */
+                mDrawerLayout,                    /* DrawerLayout object */
+                R.string.navigation_drawer_open,  /* "open drawer" description for accessibility */
+                R.string.navigation_drawer_close  /* "close drawer" description for accessibility */
+        ) {
+            @Override
+            public void onDrawerClosed(View drawerView) {
+                super.onDrawerClosed(drawerView);
+                if (!isAdded()) {
+                    return;
+                }
+
+                getActivity().supportInvalidateOptionsMenu(); // calls onPrepareOptionsMenu()
+            }
+
+            @Override
+            public void onDrawerOpened(View drawerView) {
+                super.onDrawerOpened(drawerView);
+                if (!isAdded()) {
+                    return;
+                }
+
+                if (!mUserLearnedDrawer) {
+                    // The user manually opened the drawer; store this flag to prevent auto-showing
+                    // the navigation drawer automatically in the future.
+                    mUserLearnedDrawer = true;
+                    SharedPreferences sp = PreferenceManager
+                            .getDefaultSharedPreferences(getActivity());
+                    sp.edit().putBoolean(PREF_USER_LEARNED_DRAWER, true).apply();
+                }
+
+                getActivity().supportInvalidateOptionsMenu(); // calls onPrepareOptionsMenu()
+            }
+        };
+
+        // If the user hasn't 'learned' about the drawer, open it to introduce them to the drawer,
+        // per the navigation drawer design guidelines.
+        if (!mUserLearnedDrawer && !mFromSavedInstanceState) {
+            mDrawerLayout.openDrawer(mFragmentContainerView);
+        }
+
+        // Defer code dependent on restoration of previous instance state.
+        mDrawerLayout.post(new Runnable() {
+            @Override
+            public void run() {
+                mDrawerToggle.syncState();
+            }
+        });
+
+        mDrawerLayout.setDrawerListener(mDrawerToggle);
+    }
+
+    private void selectItem(int position) {
+        mCurrentSelectedPosition = position;
+        if (mDrawerListView != null) {
+            mDrawerListView.setItemChecked(position, true);
+        }
+        if (mDrawerLayout != null) {
+            mDrawerLayout.closeDrawer(mFragmentContainerView);
+        }
+        if (mCallbacks != null) {
+            mCallbacks.onNavigationDrawerItemSelected(position);
+        }
+    }
+
+    @Override
+    public void onAttach(Activity activity) {
+        super.onAttach(activity);
+        try {
+            mCallbacks = (NavigationDrawerCallbacks) activity;
+        } catch (ClassCastException e) {
+            throw new ClassCastException("Activity must implement NavigationDrawerCallbacks.");
+        }
+    }
+
+    @Override
+    public void onDetach() {
+        super.onDetach();
+        mCallbacks = null;
+    }
+
+    @Override
+    public void onSaveInstanceState(Bundle outState) {
+        super.onSaveInstanceState(outState);
+        outState.putInt(STATE_SELECTED_POSITION, mCurrentSelectedPosition);
+    }
+
+    @Override
+    public void onConfigurationChanged(Configuration newConfig) {
+        super.onConfigurationChanged(newConfig);
+        // Forward the new configuration the drawer toggle component.
+        mDrawerToggle.onConfigurationChanged(newConfig);
+    }
+
+    @Override
+    public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
+        // If the drawer is open, show the global app actions in the action bar. See also
+        // showGlobalContextActionBar, which controls the top-left area of the action bar.
+        if (mDrawerLayout != null && isDrawerOpen()) {
+            inflater.inflate(R.menu.global, menu);
+            showGlobalContextActionBar();
+        }
+        super.onCreateOptionsMenu(menu, inflater);
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        if (mDrawerToggle.onOptionsItemSelected(item)) {
+            return true;
+        }
+        return super.onOptionsItemSelected(item);
+    }
+
+    /**
+     * Per the navigation drawer design guidelines, updates the action bar to show the global app
+     * 'context', rather than just what's in the current screen.
+     */
+    private void showGlobalContextActionBar() {
+        ActionBar actionBar = getActionBar();
+        actionBar.setDisplayShowTitleEnabled(true);
+        actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
+        actionBar.setTitle(R.string.app_name);
+    }
+
+    private ActionBar getActionBar() {
+        return ((AppCompatActivity) getActivity()).getSupportActionBar();
+    }
+
+    /**
+     * Callbacks interface that all activities using this fragment must implement.
+     */
+    public interface NavigationDrawerCallbacks {
+        /**
+         * Called when an item in the navigation drawer is selected.
+         */
+        void onNavigationDrawerItemSelected(int position);
+    }
+}
diff --git a/android/app/src/main/java/io/v/syncslides/SignInActivity.java b/android/app/src/main/java/io/v/syncslides/SignInActivity.java
index 0d8408d..2e571c2 100644
--- a/android/app/src/main/java/io/v/syncslides/SignInActivity.java
+++ b/android/app/src/main/java/io/v/syncslides/SignInActivity.java
@@ -226,7 +226,7 @@
 
     private void finishActivity() {
         mProgressDialog.dismiss();
-        startActivity(new Intent(this, MainActivity.class));
+        startActivity(new Intent(this, DeckChooserActivity.class));
         finish();
     }
 
diff --git a/android/app/src/main/res/drawable-hdpi/drawer_shadow.9.png b/android/app/src/main/res/drawable-hdpi/drawer_shadow.9.png
new file mode 100644
index 0000000..236bff5
--- /dev/null
+++ b/android/app/src/main/res/drawable-hdpi/drawer_shadow.9.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-hdpi/ic_add_circle_black_24dp.png b/android/app/src/main/res/drawable-hdpi/ic_add_circle_black_24dp.png
new file mode 100644
index 0000000..8a92ad3
--- /dev/null
+++ b/android/app/src/main/res/drawable-hdpi/ic_add_circle_black_24dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-hdpi/ic_add_white_36dp.png b/android/app/src/main/res/drawable-hdpi/ic_add_white_36dp.png
new file mode 100644
index 0000000..8630f40
--- /dev/null
+++ b/android/app/src/main/res/drawable-hdpi/ic_add_white_36dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-hdpi/ic_arrow_back_white_24dp.png b/android/app/src/main/res/drawable-hdpi/ic_arrow_back_white_24dp.png
new file mode 100644
index 0000000..35640c6
--- /dev/null
+++ b/android/app/src/main/res/drawable-hdpi/ic_arrow_back_white_24dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-hdpi/ic_arrow_back_white_36dp.png b/android/app/src/main/res/drawable-hdpi/ic_arrow_back_white_36dp.png
new file mode 100644
index 0000000..18f3ee8
--- /dev/null
+++ b/android/app/src/main/res/drawable-hdpi/ic_arrow_back_white_36dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-hdpi/ic_arrow_forward_white_24dp.png b/android/app/src/main/res/drawable-hdpi/ic_arrow_forward_white_24dp.png
new file mode 100644
index 0000000..4f9931c
--- /dev/null
+++ b/android/app/src/main/res/drawable-hdpi/ic_arrow_forward_white_24dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-hdpi/ic_arrow_forward_white_36dp.png b/android/app/src/main/res/drawable-hdpi/ic_arrow_forward_white_36dp.png
new file mode 100644
index 0000000..7dd23b7
--- /dev/null
+++ b/android/app/src/main/res/drawable-hdpi/ic_arrow_forward_white_36dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-hdpi/ic_drawer.png b/android/app/src/main/res/drawable-hdpi/ic_drawer.png
new file mode 100644
index 0000000..c59f601
--- /dev/null
+++ b/android/app/src/main/res/drawable-hdpi/ic_drawer.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-hdpi/ic_layers_white_24dp.png b/android/app/src/main/res/drawable-hdpi/ic_layers_white_24dp.png
new file mode 100644
index 0000000..6a6f60c
--- /dev/null
+++ b/android/app/src/main/res/drawable-hdpi/ic_layers_white_24dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-hdpi/ic_layers_white_36dp.png b/android/app/src/main/res/drawable-hdpi/ic_layers_white_36dp.png
new file mode 100644
index 0000000..5d00853
--- /dev/null
+++ b/android/app/src/main/res/drawable-hdpi/ic_layers_white_36dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-hdpi/ic_live_help_white_24dp.png b/android/app/src/main/res/drawable-hdpi/ic_live_help_white_24dp.png
new file mode 100644
index 0000000..7cee5c9
--- /dev/null
+++ b/android/app/src/main/res/drawable-hdpi/ic_live_help_white_24dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-hdpi/ic_live_help_white_36dp.png b/android/app/src/main/res/drawable-hdpi/ic_live_help_white_36dp.png
new file mode 100644
index 0000000..a8eaf79
--- /dev/null
+++ b/android/app/src/main/res/drawable-hdpi/ic_live_help_white_36dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-hdpi/ic_play_arrow_white_36dp.png b/android/app/src/main/res/drawable-hdpi/ic_play_arrow_white_36dp.png
new file mode 100755
index 0000000..29adeed
--- /dev/null
+++ b/android/app/src/main/res/drawable-hdpi/ic_play_arrow_white_36dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-hdpi/ic_sync_white_36dp.png b/android/app/src/main/res/drawable-hdpi/ic_sync_white_36dp.png
new file mode 100644
index 0000000..b0c5d51
--- /dev/null
+++ b/android/app/src/main/res/drawable-hdpi/ic_sync_white_36dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-mdpi/drawer_shadow.9.png b/android/app/src/main/res/drawable-mdpi/drawer_shadow.9.png
new file mode 100644
index 0000000..ffe3a28
--- /dev/null
+++ b/android/app/src/main/res/drawable-mdpi/drawer_shadow.9.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-mdpi/ic_add_circle_black_24dp.png b/android/app/src/main/res/drawable-mdpi/ic_add_circle_black_24dp.png
new file mode 100644
index 0000000..ac376d0
--- /dev/null
+++ b/android/app/src/main/res/drawable-mdpi/ic_add_circle_black_24dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-mdpi/ic_add_white_36dp.png b/android/app/src/main/res/drawable-mdpi/ic_add_white_36dp.png
new file mode 100644
index 0000000..694179b
--- /dev/null
+++ b/android/app/src/main/res/drawable-mdpi/ic_add_white_36dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-mdpi/ic_arrow_back_white_24dp.png b/android/app/src/main/res/drawable-mdpi/ic_arrow_back_white_24dp.png
new file mode 100644
index 0000000..43026ba
--- /dev/null
+++ b/android/app/src/main/res/drawable-mdpi/ic_arrow_back_white_24dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-mdpi/ic_arrow_back_white_36dp.png b/android/app/src/main/res/drawable-mdpi/ic_arrow_back_white_36dp.png
new file mode 100644
index 0000000..a2051ce
--- /dev/null
+++ b/android/app/src/main/res/drawable-mdpi/ic_arrow_back_white_36dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-mdpi/ic_arrow_forward_white_24dp.png b/android/app/src/main/res/drawable-mdpi/ic_arrow_forward_white_24dp.png
new file mode 100644
index 0000000..e039b9a
--- /dev/null
+++ b/android/app/src/main/res/drawable-mdpi/ic_arrow_forward_white_24dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-mdpi/ic_arrow_forward_white_36dp.png b/android/app/src/main/res/drawable-mdpi/ic_arrow_forward_white_36dp.png
new file mode 100644
index 0000000..b8c16a3
--- /dev/null
+++ b/android/app/src/main/res/drawable-mdpi/ic_arrow_forward_white_36dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-mdpi/ic_drawer.png b/android/app/src/main/res/drawable-mdpi/ic_drawer.png
new file mode 100644
index 0000000..1ed2c56
--- /dev/null
+++ b/android/app/src/main/res/drawable-mdpi/ic_drawer.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-mdpi/ic_layers_white_24dp.png b/android/app/src/main/res/drawable-mdpi/ic_layers_white_24dp.png
new file mode 100644
index 0000000..e537f97
--- /dev/null
+++ b/android/app/src/main/res/drawable-mdpi/ic_layers_white_24dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-mdpi/ic_layers_white_36dp.png b/android/app/src/main/res/drawable-mdpi/ic_layers_white_36dp.png
new file mode 100644
index 0000000..1172034
--- /dev/null
+++ b/android/app/src/main/res/drawable-mdpi/ic_layers_white_36dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-mdpi/ic_live_help_white_24dp.png b/android/app/src/main/res/drawable-mdpi/ic_live_help_white_24dp.png
new file mode 100644
index 0000000..46793f1
--- /dev/null
+++ b/android/app/src/main/res/drawable-mdpi/ic_live_help_white_24dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-mdpi/ic_live_help_white_36dp.png b/android/app/src/main/res/drawable-mdpi/ic_live_help_white_36dp.png
new file mode 100644
index 0000000..9bbf988
--- /dev/null
+++ b/android/app/src/main/res/drawable-mdpi/ic_live_help_white_36dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-mdpi/ic_play_arrow_white_36dp.png b/android/app/src/main/res/drawable-mdpi/ic_play_arrow_white_36dp.png
new file mode 100755
index 0000000..57c9fa5
--- /dev/null
+++ b/android/app/src/main/res/drawable-mdpi/ic_play_arrow_white_36dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-mdpi/ic_sync_white_36dp.png b/android/app/src/main/res/drawable-mdpi/ic_sync_white_36dp.png
new file mode 100644
index 0000000..f0072e1
--- /dev/null
+++ b/android/app/src/main/res/drawable-mdpi/ic_sync_white_36dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-xhdpi/drawer_shadow.9.png b/android/app/src/main/res/drawable-xhdpi/drawer_shadow.9.png
new file mode 100644
index 0000000..fabe9d9
--- /dev/null
+++ b/android/app/src/main/res/drawable-xhdpi/drawer_shadow.9.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-xhdpi/ic_add_circle_black_24dp.png b/android/app/src/main/res/drawable-xhdpi/ic_add_circle_black_24dp.png
new file mode 100644
index 0000000..6cfd7d3
--- /dev/null
+++ b/android/app/src/main/res/drawable-xhdpi/ic_add_circle_black_24dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-xhdpi/ic_add_white_36dp.png b/android/app/src/main/res/drawable-xhdpi/ic_add_white_36dp.png
new file mode 100644
index 0000000..0fdced8
--- /dev/null
+++ b/android/app/src/main/res/drawable-xhdpi/ic_add_white_36dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-xhdpi/ic_arrow_back_white_24dp.png b/android/app/src/main/res/drawable-xhdpi/ic_arrow_back_white_24dp.png
new file mode 100644
index 0000000..77ddd7e
--- /dev/null
+++ b/android/app/src/main/res/drawable-xhdpi/ic_arrow_back_white_24dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-xhdpi/ic_arrow_back_white_36dp.png b/android/app/src/main/res/drawable-xhdpi/ic_arrow_back_white_36dp.png
new file mode 100644
index 0000000..746d775
--- /dev/null
+++ b/android/app/src/main/res/drawable-xhdpi/ic_arrow_back_white_36dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-xhdpi/ic_arrow_forward_white_24dp.png b/android/app/src/main/res/drawable-xhdpi/ic_arrow_forward_white_24dp.png
new file mode 100644
index 0000000..70abc95
--- /dev/null
+++ b/android/app/src/main/res/drawable-xhdpi/ic_arrow_forward_white_24dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-xhdpi/ic_arrow_forward_white_36dp.png b/android/app/src/main/res/drawable-xhdpi/ic_arrow_forward_white_36dp.png
new file mode 100644
index 0000000..8c4c394
--- /dev/null
+++ b/android/app/src/main/res/drawable-xhdpi/ic_arrow_forward_white_36dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-xhdpi/ic_drawer.png b/android/app/src/main/res/drawable-xhdpi/ic_drawer.png
new file mode 100644
index 0000000..a5fa74d
--- /dev/null
+++ b/android/app/src/main/res/drawable-xhdpi/ic_drawer.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-xhdpi/ic_layers_white_24dp.png b/android/app/src/main/res/drawable-xhdpi/ic_layers_white_24dp.png
new file mode 100644
index 0000000..1986ca3
--- /dev/null
+++ b/android/app/src/main/res/drawable-xhdpi/ic_layers_white_24dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-xhdpi/ic_layers_white_36dp.png b/android/app/src/main/res/drawable-xhdpi/ic_layers_white_36dp.png
new file mode 100644
index 0000000..3d40dd6
--- /dev/null
+++ b/android/app/src/main/res/drawable-xhdpi/ic_layers_white_36dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-xhdpi/ic_live_help_white_24dp.png b/android/app/src/main/res/drawable-xhdpi/ic_live_help_white_24dp.png
new file mode 100644
index 0000000..83ee58e
--- /dev/null
+++ b/android/app/src/main/res/drawable-xhdpi/ic_live_help_white_24dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-xhdpi/ic_live_help_white_36dp.png b/android/app/src/main/res/drawable-xhdpi/ic_live_help_white_36dp.png
new file mode 100644
index 0000000..2efef0f
--- /dev/null
+++ b/android/app/src/main/res/drawable-xhdpi/ic_live_help_white_36dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-xhdpi/ic_play_arrow_white_36dp.png b/android/app/src/main/res/drawable-xhdpi/ic_play_arrow_white_36dp.png
new file mode 100755
index 0000000..547ef30
--- /dev/null
+++ b/android/app/src/main/res/drawable-xhdpi/ic_play_arrow_white_36dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-xhdpi/ic_sync_white_36dp.png b/android/app/src/main/res/drawable-xhdpi/ic_sync_white_36dp.png
new file mode 100644
index 0000000..be061bf
--- /dev/null
+++ b/android/app/src/main/res/drawable-xhdpi/ic_sync_white_36dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-xxhdpi/drawer_shadow.9.png b/android/app/src/main/res/drawable-xxhdpi/drawer_shadow.9.png
new file mode 100644
index 0000000..b91e9d7
--- /dev/null
+++ b/android/app/src/main/res/drawable-xxhdpi/drawer_shadow.9.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-xxhdpi/ic_add_circle_black_24dp.png b/android/app/src/main/res/drawable-xxhdpi/ic_add_circle_black_24dp.png
new file mode 100644
index 0000000..6317302
--- /dev/null
+++ b/android/app/src/main/res/drawable-xxhdpi/ic_add_circle_black_24dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-xxhdpi/ic_add_white_36dp.png b/android/app/src/main/res/drawable-xxhdpi/ic_add_white_36dp.png
new file mode 100644
index 0000000..8b46191
--- /dev/null
+++ b/android/app/src/main/res/drawable-xxhdpi/ic_add_white_36dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-xxhdpi/ic_arrow_back_white_24dp.png b/android/app/src/main/res/drawable-xxhdpi/ic_arrow_back_white_24dp.png
new file mode 100644
index 0000000..701fd2d
--- /dev/null
+++ b/android/app/src/main/res/drawable-xxhdpi/ic_arrow_back_white_24dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-xxhdpi/ic_arrow_back_white_36dp.png b/android/app/src/main/res/drawable-xxhdpi/ic_arrow_back_white_36dp.png
new file mode 100644
index 0000000..d816e8c
--- /dev/null
+++ b/android/app/src/main/res/drawable-xxhdpi/ic_arrow_back_white_36dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-xxhdpi/ic_arrow_forward_white_24dp.png b/android/app/src/main/res/drawable-xxhdpi/ic_arrow_forward_white_24dp.png
new file mode 100644
index 0000000..540ad01
--- /dev/null
+++ b/android/app/src/main/res/drawable-xxhdpi/ic_arrow_forward_white_24dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-xxhdpi/ic_arrow_forward_white_36dp.png b/android/app/src/main/res/drawable-xxhdpi/ic_arrow_forward_white_36dp.png
new file mode 100644
index 0000000..e14d1c0
--- /dev/null
+++ b/android/app/src/main/res/drawable-xxhdpi/ic_arrow_forward_white_36dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-xxhdpi/ic_drawer.png b/android/app/src/main/res/drawable-xxhdpi/ic_drawer.png
new file mode 100644
index 0000000..9c4685d
--- /dev/null
+++ b/android/app/src/main/res/drawable-xxhdpi/ic_drawer.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-xxhdpi/ic_layers_white_24dp.png b/android/app/src/main/res/drawable-xxhdpi/ic_layers_white_24dp.png
new file mode 100644
index 0000000..83d5eb1
--- /dev/null
+++ b/android/app/src/main/res/drawable-xxhdpi/ic_layers_white_24dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-xxhdpi/ic_layers_white_36dp.png b/android/app/src/main/res/drawable-xxhdpi/ic_layers_white_36dp.png
new file mode 100644
index 0000000..4f56c0a
--- /dev/null
+++ b/android/app/src/main/res/drawable-xxhdpi/ic_layers_white_36dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-xxhdpi/ic_live_help_white_24dp.png b/android/app/src/main/res/drawable-xxhdpi/ic_live_help_white_24dp.png
new file mode 100644
index 0000000..f3963b5
--- /dev/null
+++ b/android/app/src/main/res/drawable-xxhdpi/ic_live_help_white_24dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-xxhdpi/ic_live_help_white_36dp.png b/android/app/src/main/res/drawable-xxhdpi/ic_live_help_white_36dp.png
new file mode 100644
index 0000000..bdb6bac
--- /dev/null
+++ b/android/app/src/main/res/drawable-xxhdpi/ic_live_help_white_36dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-xxhdpi/ic_play_arrow_white_36dp.png b/android/app/src/main/res/drawable-xxhdpi/ic_play_arrow_white_36dp.png
new file mode 100755
index 0000000..23bb1ba
--- /dev/null
+++ b/android/app/src/main/res/drawable-xxhdpi/ic_play_arrow_white_36dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-xxhdpi/ic_sync_white_36dp.png b/android/app/src/main/res/drawable-xxhdpi/ic_sync_white_36dp.png
new file mode 100644
index 0000000..ff51f05
--- /dev/null
+++ b/android/app/src/main/res/drawable-xxhdpi/ic_sync_white_36dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-xxxhdpi/ic_add_white_36dp.png b/android/app/src/main/res/drawable-xxxhdpi/ic_add_white_36dp.png
new file mode 100644
index 0000000..7e69913
--- /dev/null
+++ b/android/app/src/main/res/drawable-xxxhdpi/ic_add_white_36dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-xxxhdpi/ic_arrow_back_white_36dp.png b/android/app/src/main/res/drawable-xxxhdpi/ic_arrow_back_white_36dp.png
new file mode 100644
index 0000000..5d04720
--- /dev/null
+++ b/android/app/src/main/res/drawable-xxxhdpi/ic_arrow_back_white_36dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-xxxhdpi/ic_arrow_forward_white_36dp.png b/android/app/src/main/res/drawable-xxxhdpi/ic_arrow_forward_white_36dp.png
new file mode 100644
index 0000000..f8cf79f
--- /dev/null
+++ b/android/app/src/main/res/drawable-xxxhdpi/ic_arrow_forward_white_36dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-xxxhdpi/ic_layers_white_36dp.png b/android/app/src/main/res/drawable-xxxhdpi/ic_layers_white_36dp.png
new file mode 100644
index 0000000..616e25a
--- /dev/null
+++ b/android/app/src/main/res/drawable-xxxhdpi/ic_layers_white_36dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-xxxhdpi/ic_live_help_white_36dp.png b/android/app/src/main/res/drawable-xxxhdpi/ic_live_help_white_36dp.png
new file mode 100644
index 0000000..3116e5d
--- /dev/null
+++ b/android/app/src/main/res/drawable-xxxhdpi/ic_live_help_white_36dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-xxxhdpi/ic_play_arrow_white_36dp.png b/android/app/src/main/res/drawable-xxxhdpi/ic_play_arrow_white_36dp.png
new file mode 100755
index 0000000..2745c3a
--- /dev/null
+++ b/android/app/src/main/res/drawable-xxxhdpi/ic_play_arrow_white_36dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable-xxxhdpi/ic_sync_white_36dp.png b/android/app/src/main/res/drawable-xxxhdpi/ic_sync_white_36dp.png
new file mode 100644
index 0000000..7224642
--- /dev/null
+++ b/android/app/src/main/res/drawable-xxxhdpi/ic_sync_white_36dp.png
Binary files differ
diff --git a/android/app/src/main/res/drawable/nav_hint.xml b/android/app/src/main/res/drawable/nav_hint.xml
new file mode 100644
index 0000000..fb70876
--- /dev/null
+++ b/android/app/src/main/res/drawable/nav_hint.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+
+    <corners android:radius="@dimen/nav_hint_corner_radius"/>
+    <solid android:color="@color/nav_hint_background"/>
+</shape>
+
diff --git a/android/app/src/main/res/drawable/orange_border.xml b/android/app/src/main/res/drawable/orange_border.xml
new file mode 100644
index 0000000..383b26e
--- /dev/null
+++ b/android/app/src/main/res/drawable/orange_border.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+
+    <!-- view border color and width -->
+    <stroke
+        android:width="1dp"
+        android:color="@color/action_orange"></stroke>
+
+    <!-- The radius makes the corners rounded -->
+    <corners android:radius="2dp"></corners>
+
+</shape>
\ No newline at end of file
diff --git a/android/app/src/main/res/drawable/orange_circle.xml b/android/app/src/main/res/drawable/orange_circle.xml
new file mode 100644
index 0000000..c87d2d5
--- /dev/null
+++ b/android/app/src/main/res/drawable/orange_circle.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="oval">
+    <solid android:color="@color/action_orange" />
+    <size
+        android:width="@dimen/nav_question_num_circle_size"
+        android:height="@dimen/nav_question_num_circle_size"/>
+</shape>
\ No newline at end of file
diff --git a/android/app/src/main/res/drawable/thumb_deck1.png b/android/app/src/main/res/drawable/thumb_deck1.png
new file mode 100644
index 0000000..851a751
--- /dev/null
+++ b/android/app/src/main/res/drawable/thumb_deck1.png
Binary files differ
diff --git a/android/app/src/main/res/drawable/thumb_deck2.png b/android/app/src/main/res/drawable/thumb_deck2.png
new file mode 100644
index 0000000..4fff1a8
--- /dev/null
+++ b/android/app/src/main/res/drawable/thumb_deck2.png
Binary files differ
diff --git a/android/app/src/main/res/drawable/thumb_deck3.png b/android/app/src/main/res/drawable/thumb_deck3.png
new file mode 100644
index 0000000..8708a4e
--- /dev/null
+++ b/android/app/src/main/res/drawable/thumb_deck3.png
Binary files differ
diff --git a/android/app/src/main/res/layout/activity_deck_chooser.xml b/android/app/src/main/res/layout/activity_deck_chooser.xml
new file mode 100644
index 0000000..3d1e909
--- /dev/null
+++ b/android/app/src/main/res/layout/activity_deck_chooser.xml
@@ -0,0 +1,32 @@
+<!-- A DrawerLayout is intended to be used as the top-level content view using match_parent for both width and height to consume the full space available. -->
+<android.support.v4.widget.DrawerLayout
+    android:id="@+id/drawer_layout"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context=".DeckChooserActivity">
+
+    <!-- As the main content view, the view below consumes the entire
+         space available using match_parent in both dimensions. -->
+    <FrameLayout
+        android:id="@+id/container"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"/>
+
+    <!-- android:layout_gravity="start" tells DrawerLayout to treat
+         this as a sliding drawer on the left side for left-to-right
+         languages and on the right side for right-to-left languages.
+         If you're not building against API 17 or higher, use
+         android:layout_gravity="left" instead. -->
+    <!-- The drawer is given a fixed width in dp and extends the full height of
+         the container. -->
+    <fragment
+        android:id="@+id/navigation_drawer"
+        android:name="io.v.syncslides.NavigationDrawerFragment"
+        android:layout_width="@dimen/navigation_drawer_width"
+        android:layout_height="match_parent"
+        android:layout_gravity="start"
+        tools:layout="@layout/fragment_navigation_drawer"/>
+
+</android.support.v4.widget.DrawerLayout>
diff --git a/android/app/src/main/res/layout/activity_main.xml b/android/app/src/main/res/layout/activity_main.xml
deleted file mode 100644
index 6516002..0000000
--- a/android/app/src/main/res/layout/activity_main.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<android.support.design.widget.CoordinatorLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:fitsSystemWindows="true"
-    tools:context=".MainActivity">
-
-    <android.support.design.widget.AppBarLayout
-        android:layout_height="wrap_content"
-        android:layout_width="match_parent"
-        android:theme="@style/AppTheme.AppBarOverlay">
-
-        <android.support.v7.widget.Toolbar
-            android:id="@+id/toolbar"
-            android:layout_width="match_parent"
-            android:layout_height="?attr/actionBarSize"
-            android:background="?attr/colorPrimary"
-            app:popupTheme="@style/AppTheme.PopupOverlay"/>
-
-    </android.support.design.widget.AppBarLayout>
-
-    <include layout="@layout/content_main"/>
-
-    <android.support.design.widget.FloatingActionButton
-        android:id="@+id/fab"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_gravity="bottom|end"
-        android:layout_margin="@dimen/fab_margin"
-        android:src="@android:drawable/ic_dialog_email"/>
-
-</android.support.design.widget.CoordinatorLayout>
diff --git a/android/app/src/main/res/layout/content_main.xml b/android/app/src/main/res/layout/content_main.xml
deleted file mode 100644
index 1fb534d..0000000
--- a/android/app/src/main/res/layout/content_main.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:paddingLeft="@dimen/activity_horizontal_margin"
-    android:paddingRight="@dimen/activity_horizontal_margin"
-    android:paddingTop="@dimen/activity_vertical_margin"
-    android:paddingBottom="@dimen/activity_vertical_margin"
-    app:layout_behavior="@string/appbar_scrolling_view_behavior"
-    tools:showIn="@layout/activity_main"
-    tools:context=".MainActivity">
-
-    <TextView
-        android:text="Hello World!"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"/>
-</RelativeLayout>
diff --git a/android/app/src/main/res/layout/fragment_deck_chooser.xml b/android/app/src/main/res/layout/fragment_deck_chooser.xml
new file mode 100644
index 0000000..2716b62
--- /dev/null
+++ b/android/app/src/main/res/layout/fragment_deck_chooser.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.design.widget.CoordinatorLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@color/snow_2">
+
+    <!--<android.support.v7.widget.RecyclerView-->
+        <!--android:id="@+id/deck_grid"-->
+        <!--android:layout_width="match_parent"-->
+        <!--android:layout_height="match_parent"-->
+        <!--android:scrollbars="vertical"/>-->
+
+    <android.support.design.widget.FloatingActionButton
+        android:id="@+id/new_deck_fab"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="end|bottom"
+        android:layout_margin="@dimen/fab_margin"
+        android:src="@drawable/ic_add_white_36dp"
+        app:backgroundTint="@color/action_orange"
+        app:elevation="@dimen/fab_elevation"
+        app:fabSize="normal"/>
+
+</android.support.design.widget.CoordinatorLayout>
diff --git a/android/app/src/main/res/layout/fragment_navigation_drawer.xml b/android/app/src/main/res/layout/fragment_navigation_drawer.xml
new file mode 100644
index 0000000..5496987
--- /dev/null
+++ b/android/app/src/main/res/layout/fragment_navigation_drawer.xml
@@ -0,0 +1,9 @@
+<ListView xmlns:android="http://schemas.android.com/apk/res/android"
+          xmlns:tools="http://schemas.android.com/tools"
+          android:layout_width="match_parent"
+          android:layout_height="match_parent"
+          android:background="#cccc"
+          android:choiceMode="singleChoice"
+          android:divider="@android:color/transparent"
+          android:dividerHeight="0dp"
+          tools:context=".NavigationDrawerFragment"/>
diff --git a/android/app/src/main/res/menu/deck_chooser.xml b/android/app/src/main/res/menu/deck_chooser.xml
new file mode 100644
index 0000000..95f8ddb
--- /dev/null
+++ b/android/app/src/main/res/menu/deck_chooser.xml
@@ -0,0 +1,5 @@
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+      xmlns:app="http://schemas.android.com/apk/res-auto"
+      xmlns:tools="http://schemas.android.com/tools"
+      tools:context=".DeckChooserActivity">
+</menu>
diff --git a/android/app/src/main/res/menu/global.xml b/android/app/src/main/res/menu/global.xml
new file mode 100644
index 0000000..9a00fdc
--- /dev/null
+++ b/android/app/src/main/res/menu/global.xml
@@ -0,0 +1,3 @@
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+      xmlns:app="http://schemas.android.com/apk/res-auto">
+</menu>
diff --git a/android/app/src/main/res/values-v21/styles.xml b/android/app/src/main/res/values-v21/styles.xml
deleted file mode 100644
index 65d0c39..0000000
--- a/android/app/src/main/res/values-v21/styles.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<resources>>
-    <style name="AppTheme.NoActionBar">
-        <item name="windowActionBar">false</item>
-        <item name="windowNoTitle">true</item>
-        <item name="android:windowDrawsSystemBarBackgrounds">true</item>
-        <item name="android:statusBarColor">@android:color/transparent</item>
-    </style>
-</resources>
diff --git a/android/app/src/main/res/values/colors.xml b/android/app/src/main/res/values/colors.xml
index 3ab3e9c..0685668 100644
--- a/android/app/src/main/res/values/colors.xml
+++ b/android/app/src/main/res/values/colors.xml
@@ -1,6 +1,14 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
-    <color name="colorPrimary">#3F51B5</color>
-    <color name="colorPrimaryDark">#303F9F</color>
-    <color name="colorAccent">#FF4081</color>
-</resources>
+
+    <color name="snow_2">#EEE9E9</color>
+    <color name="matte_black">#424242</color>
+    <color name="toolbar_gray">#78909C</color>
+    <color name="action_orange">#FF6E00</color>
+    <color name="blue_grey_50">#ECEFF1</color>
+    <!-- When specifying a color with 8 characters instead of the usual 6, the first two
+      indicate the alpha value.  In this case, we get a slightly transparent black. -->
+    <color name="nav_hint_background">#66000000</color>
+    <color name="nav_hint_text">#FFFFFF</color>
+    <color name="nav_question_num_text">#FFFFFF</color>
+</resources>
\ No newline at end of file
diff --git a/android/app/src/main/res/values/dimens.xml b/android/app/src/main/res/values/dimens.xml
index 812cb7b..03925e3 100644
--- a/android/app/src/main/res/values/dimens.xml
+++ b/android/app/src/main/res/values/dimens.xml
@@ -2,5 +2,36 @@
     <!-- Default screen margins, per the Android Design guidelines. -->
     <dimen name="activity_horizontal_margin">16dp</dimen>
     <dimen name="activity_vertical_margin">16dp</dimen>
+
+    <!-- Per the design guidelines, navigation drawers should be between 240dp and 320dp:
+         https://developer.android.com/design/patterns/navigation-drawer.html -->
+    <dimen name="navigation_drawer_width">240dp</dimen>
+
     <dimen name="fab_margin">16dp</dimen>
+    <dimen name="fab_elevation">4dp</dimen>
+
+    <dimen name="deck_card_width">200dp</dimen>
+    <dimen name="deck_card_margin">5dp</dimen>
+    <dimen name="deck_thumb_height">115dp</dimen>
+    <dimen name="card_toolbar_height">60dp</dimen>
+    <dimen name="toolbar_and_statusbar_height">80dp</dimen>
+    <dimen name="toolbar_inset">10dp</dimen>
+    <dimen name="toolbar_text_live_now_padding">3dp</dimen>
+    <dimen name="toolbar_text_top_margin">3dp</dimen>
+    <dimen name="slide_card_recycler_width">365dp</dimen>
+    <dimen name="slide_card_margin">5dp</dimen>
+    <dimen name="slide_card_height">100dp</dimen>
+    <dimen name="slide_card_width">355dp</dimen>
+    <dimen name="slide_card_text_margin">4dp</dimen>
+
+    <dimen name="nav_bar_height">60dp</dimen>
+    <dimen name="nav_button_size">36dp</dimen>
+    <dimen name="nav_button_margin">15dp</dimen>
+    <dimen name="nav_hint_margin">5dp</dimen>
+    <!-- The nav hint's padding and corner radius need to be the same to get a circular edge. -->
+    <dimen name="nav_hint_padding">10dp</dimen>
+    <dimen name="nav_hint_corner_radius">10dp</dimen>
+    <dimen name="nav_question_num_size">15dp</dimen>
+    <dimen name="nav_question_num_circle_size">18dp</dimen>
+    <dimen name="nav_question_num_text_size">12sp</dimen>
 </resources>
diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml
index 619268c..53c9dc4 100644
--- a/android/app/src/main/res/values/strings.xml
+++ b/android/app/src/main/res/values/strings.xml
@@ -1,4 +1,23 @@
 <resources>
     <string name="app_name">DevSyncSlides</string>
+
+    <string name="title_account1">Account 1</string>
+    <string name="title_account2">Account 2</string>
+    <string name="title_account3">Account 3</string>
+
+    <string name="navigation_drawer_open">Open navigation drawer</string>
+    <string name="navigation_drawer_close">Close navigation drawer</string>
+
     <string name="action_settings">Settings</string>
+    <string name="action_delete_deck">Delete</string>
+    <string name="action_save">Save</string>
+
+    <string name="slide_list_title">Pitch deck</string>
+    <string name="notes_hint">Notes (only you see these)</string>
+    <string name="next_hint">Next</string>
+    <string name="prev_hint">Previous</string>
+    <string name="question_message">Answer questions</string>
+    <string name="handoff_message">You handed off to</string>
+    <string name="end_handoff">RESUME</string>
+    <string name="presentation_live">LIVE NOW</string>
 </resources>
diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml
index 16dbab3..6110901 100644
--- a/android/app/src/main/res/values/styles.xml
+++ b/android/app/src/main/res/values/styles.xml
@@ -1,17 +1,17 @@
 <resources>
 
-    <!-- Base application theme. -->
-    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
-        <!-- Customize your theme here. -->
-        <item name="colorPrimary">@color/colorPrimary</item>
-        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
-        <item name="colorAccent">@color/colorAccent</item>
+    <style name="DeckTitleFont" parent="@android:style/TextAppearance.Medium">
+        <item name="android:textColor">@android:color/black</item>
     </style>
-    <style name="AppTheme.NoActionBar">
-        <item name="windowActionBar">false</item>
-        <item name="windowNoTitle">true</item>
+
+    <style name="DeckLiveNowFont" parent="@android:style/TextAppearance.Small">
+        <item name="android:textColor">@color/action_orange</item>
+        <item name="android:background">@drawable/orange_border</item>
     </style>
-    <style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar"/>
-    <style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light"/>
+
+    <style name="DeckLastOpenedFont">
+        <item name="android:textSize">12sp</item>
+        <item name="android:textColor">@color/toolbar_gray</item>
+    </style>
 
 </resources>
diff --git a/android/app/src/main/res/values/themes.xml b/android/app/src/main/res/values/themes.xml
new file mode 100644
index 0000000..36527cd
--- /dev/null
+++ b/android/app/src/main/res/values/themes.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+
+    <!-- Base application theme. -->
+    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
+        <item name="android:actionBarStyle">@style/SyncslidesActionBar</item>
+        
+        <!-- Support library compatibility -->
+        <item name="actionBarStyle">@style/SyncslidesActionBar</item>
+    </style>
+
+    <style name="ThemeToolbar" parent="AppTheme">
+        <!-- Navigation icon color -->
+        <item name="colorControlNormal">@color/action_orange</item>
+    </style>
+
+    <!-- ActionBar styles -->
+    <style name="SyncslidesActionBar"
+        parent="@style/Widget.AppCompat.Light.ActionBar.Solid.Inverse">
+        <item name="android:background">@color/toolbar_gray</item>
+
+        <!-- Support library compatibility -->
+        <item name="background">@color/toolbar_gray</item>
+    </style>
+
+</resources>
\ No newline at end of file