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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user