package com.beepscore.android.myappportfolio;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Toast;


public class MainActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    @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);
    }

    public void spotifyTapped(View view) {
        showToast(getString(R.string.spotify_tapped));
    }

    public void scoresTapped(View view) {
        showToast(getString(R.string.scores_tapped));
    }

    public void libraryTapped(View view) {
        showToast(getString(R.string.library_tapped));
    }

    public void buildItBiggerTapped(View view) {
        showToast(getString(R.string.build_it_bigger_tapped));
    }

    public void XYZReaderTapped(View view) {
        showToast(getString(R.string.xyz_reader_tapped));
    }

    public void myOwnAppTapped(View view) {
        showToast(getString(R.string.my_own_app_tapped));
    }

    public void showToast(String text) {
        Context context = getApplicationContext();
        int duration = Toast.LENGTH_SHORT;
        Toast toast = Toast.makeText(context, text, duration);
        toast.show();
    }

}

@@ -127,16 +127,45 @@
 Bundle;%0A
+import android.view.Gravity;%0A
 import a
@@ -2059,24 +2059,98 @@
  duration);%0A
+        toast.setGravity(Gravity.TOP%7C Gravity.CENTER_HORIZONTAL, 0, 200);%0A
         toas

Move toast up from default bottom position so it isn't obscured by finger that tapped a button.