diff options
author | Marvin Borner | 2018-08-31 23:07:15 +0200 |
---|---|---|
committer | Marvin Borner | 2018-08-31 23:07:15 +0200 |
commit | 02534de25c78ccb01b8fb8752483bca37e72d935 (patch) | |
tree | 9f75ad6e10705f5ac49079d493e5ae185baf041a /app/src/main/java/me/texx/Texx/CameraActivity.kt | |
parent | 770081bb0090e8867b1b6e153f8cf65cb700be86 (diff) |
Added some documentation
Diffstat (limited to 'app/src/main/java/me/texx/Texx/CameraActivity.kt')
-rw-r--r-- | app/src/main/java/me/texx/Texx/CameraActivity.kt | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/app/src/main/java/me/texx/Texx/CameraActivity.kt b/app/src/main/java/me/texx/Texx/CameraActivity.kt index 1cc4800..2cb67c2 100644 --- a/app/src/main/java/me/texx/Texx/CameraActivity.kt +++ b/app/src/main/java/me/texx/Texx/CameraActivity.kt @@ -28,9 +28,14 @@ import java.io.IOException import java.text.SimpleDateFormat import java.util.* - +/** + * Activity to either record a video or take a photo + * Output will be saved and redirected to corresponding preview activity + */ class CameraActivity : AppCompatActivity() { - + /** + * Set initial configuration + */ override fun onCreate(savedInstanceState: Bundle?) { matchDressCode() super.onCreate(savedInstanceState) @@ -125,18 +130,27 @@ class CameraActivity : AppCompatActivity() { return "Texx_$timestamp.jpg" } + /** + * Start components on activity resume (called at start) + */ override fun onResume() { super.onResume() camera.start() } + /** + * Stop components on activity pause + */ override fun onPause() { super.onPause() camera.stop() } + /** + * Destroy components on activity close + */ override fun onDestroy() { super.onDestroy() - camera.destroy() + camera.destroy() // doesn't really destroys your camera lol } } |