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
private fun dispatchTakePictureIntent() { | |
val takePictureIntent = Intent(MediaStore.ACTION_IMAGE_CAPTURE) | |
// Ensure that there's a camera activity to handle the intent | |
if (takePictureIntent.resolveActivity(packageManager) != null) { | |
// Create the File where the photo should go | |
var photoFile: File? = null | |
try { | |
photoFile = createImageFile() |
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
private class PageChangeListener extends TabLayout.TabLayoutOnPageChangeListener { | |
private static final float THRESHOLD = 0.10f; | |
private static final int MAX_ALPHA = 255; | |
private static final float FADING_RATE = 3; | |
private int mCurrentTabPosition; | |
private float mOldPositionOffset; | |
private float mDx; |