@@ -0,0 +1,2488 @@
+package com.andela.voluminotesapp.activities;%0A%0Aimport android.content.Context;%0Aimport android.content.Intent;%0Aimport android.graphics.Typeface;%0Aimport android.os.Bundle;%0Aimport android.support.v4.view.ViewPager;%0Aimport android.support.v7.app.AppCompatActivity;%0Aimport android.support.v7.widget.Toolbar;%0Aimport android.widget.TextView;%0A%0Aimport com.andela.voluminotesapp.R;%0Aimport com.andela.voluminotesapp.adapters.CreateNewAdapter;%0Aimport com.andela.voluminotesapp.adapters.OpenExistingAdapter;%0Aimport com.andela.voluminotesapp.utilities.Launcher;%0Aimport com.andela.voluminotesapp.utilities.MsgBox;%0A%0A%0Apublic class WriteNoteActivity extends AppCompatActivity %7B%0A    private Context context = WriteNoteActivity.this;%0A    private ViewPager viewPager;%0A%0A    @Override%0A    protected void onCreate(Bundle savedInstanceState) %7B%0A        super.onCreate(savedInstanceState);%0A        setContentView(R.layout.activity_write_note);%0A%0A        manageToolbar();%0A%0A        viewPager = (ViewPager) findViewById(R.id.noteViewPager);%0A%0A        Intent intent = getIntent();%0A        Bundle bundle = intent.getBundleExtra(Launcher.TRANSPORT);%0A%0A        int position = bundle.getInt(MainActivity.POSITION, Integer.MAX_VALUE);%0A        int type = bundle.getInt(MainActivity.TYPE, Integer.MAX_VALUE);%0A%0A        if (position != Integer.MAX_VALUE) %7B%0A            openExistingNote(position);%0A        %7D else if (type != Integer.MAX_VALUE) %7B%0A            createNewNote(type);%0A        %7D%0A    %7D%0A%0A    private void manageToolbar()%7B%0A        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);%0A        Typeface alwaysInMyHeart = Typeface.createFromAsset(getAssets(), getString(R.string.heart_font));%0A        TextView toolbarTitle = (TextView) toolbar.findViewById(R.id.toolbar_title);%0A        toolbarTitle.setTypeface(alwaysInMyHeart);%0A        setSupportActionBar(toolbar);%0A    %7D%0A%0A    private void createNewNote(int type) %7B%0A        CreateNewAdapter createNewAdapter = new CreateNewAdapter(getSupportFragmentManager(), type);%0A        viewPager.setAdapter(createNewAdapter);%0A        viewPager.setCurrentItem(type);%0A    %7D%0A%0A    private void openExistingNote(int position) %7B%0A        OpenExistingAdapter openExistingAdapter = new OpenExistingAdapter(getSupportFragmentManager(), context);%0A        viewPager.setAdapter(openExistingAdapter);%0A        viewPager.setCurrentItem(position);%0A    %7D%0A%0A    @Override%0A    public void onBackPressed() %7B%0A        MsgBox.show(context, getString(R.string.canceled));%0A        super.onBackPressed();%0A    %7D%0A%7D%0A

Add WriteNoteActivity class [Starts #113640151]