9
0
mirror of https://gitee.com/shuto/customCamera.git synced 2026-05-02 00:07:24 +08:00

Implement leave button.

This commit is contained in:
Christophe BOUCAUT
2015-06-03 14:29:34 +02:00
parent 49338b08c5
commit 579a6fbf2a
2 changed files with 9 additions and 1 deletions
@@ -25,11 +25,12 @@
android:padding="@dimen/default_padding" >
<ImageButton
android:id="@+id/back"
android:id="@+id/leave"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:background="@android:color/transparent"
android:onClick="leaveCamera"
android:src="@drawable/back" />
<View
@@ -926,6 +926,13 @@ public class CameraActivity extends Activity {
this.finish();
}
/**
* When the leave button is pressed.
*/
public void leaveCamera(View v) {
onBackPressed();
}
/**
* Allow to enable or disable the flash of the camera.
* @param view The current view.