This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// All requesting permissions needs to happen inside of an Activity. | |
// When you request a permission it is like calling startActivityForResult() | |
// So you need to be able to have the call back that will handle whether the | |
// permission was granted or not. Checking permissions can be done from any context | |
// Also keep in mind for this implementation of runtime permissions you need to | |
// have included the support library in your build.gradle file. | |
// this is for your use only so this just needs to be distinct for your purposes. | |
private static final int REQUEST_LOCATION_PERMISSION = 101; | |
// Check for the permission you need | |
String permission = Manifest.permission.ACCESS_FINE_LOCATION; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.app.Activity; | |
import android.content.Context; | |
import android.util.AttributeSet; | |
import android.view.KeyEvent; | |
import android.view.View; | |
import android.view.inputmethod.InputMethodManager; | |
import android.widget.RelativeLayout; | |
/** | |
* Created by mgarner on 3/8/2016. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.mgarner.blankslate; | |
import android.os.Handler; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.view.View; | |
import android.widget.Button; | |
import android.widget.EditText; | |
import android.widget.TextView; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.app.Presentation; | |
import android.content.Context; | |
import android.location.Location; | |
import android.provider.CalendarContract; | |
import android.widget.Toast; | |
import java.util.ArrayList; | |
/** | |
* Created by mgarner on 12/11/2015. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.app.Presentation; | |
import android.content.Context; | |
import android.location.Location; | |
import android.provider.CalendarContract; | |
import android.widget.Toast; | |
import java.util.ArrayList; | |
/** | |
* Created by mgarner on 12/11/2015. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context; | |
import android.graphics.PointF; | |
import android.support.v7.widget.LinearSmoothScroller; | |
import android.support.v7.widget.RecyclerView; | |
import android.util.AttributeSet; | |
import android.util.DisplayMetrics; | |
import android.util.TypedValue; | |
import android.view.MotionEvent; | |
/** |