This file contains hidden or 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
/* | |
Sample Parameter: | |
String: "file:///storage/emulated/0/Android/data/com.example.disappeardents/cache/roof_1.jpg" | |
*/ | |
fun uriStringToBitmap(uriString : String) : Bitmap { | |
val uri = uriString.toUri() | |
val uriPath = uri.path | |
val bitmap = BitmapFactory.decodeFile(uriPath) |
This file contains hidden or 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
fun createBasicAlertDialog(){ | |
val builder = AlertDialog.Builder(this) | |
builder.setTitle("[DIALOG TITLE]") | |
builder.setMessage("[DIALOG MESSAGE]") | |
builder.setPositiveButton("[YES TEXT]") { dialog, which -> | |
// Action on click yes | |
} | |
builder.setCancelable(false) |
NewerOlder