Skip to content

Commit 48e25fb

Browse files
Julian Cerrutitlau
Julian Cerruti
authored andcommitted
Allow firing from Trackball (move and shoot)
1 parent 9e1f7c0 commit 48e25fb

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

AndroidManifest.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
package="org.cygx1.snap"
4-
android:versionCode="1"
5-
android:versionName="1.0">
4+
android:versionCode="1" android:versionName="1.0.1">
65
<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true"
76
android:screenOrientation="landscape">
87
<activity android:name=".Snap"
@@ -15,6 +14,7 @@
1514

1615
<activity android:name=".SnapPreferences" android:label="@string/app_prefs"></activity>
1716

17+
1818
</application>
1919

2020
<uses-permission android:name="android.permission.CAMERA"></uses-permission>

src/org/cygx1/snap/Preview.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ public void onOrientationChanged(int orientation) {
4444
}
4545
};
4646
mOrientationListener.enable();
47+
setFocusable(true);
48+
requestFocus();
4749
}
4850

4951
public void surfaceCreated(SurfaceHolder holder) {
@@ -143,5 +145,4 @@ public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {
143145
mCamera.setParameters(parameters);
144146
mCamera.startPreview();
145147
}
146-
147148
}

src/org/cygx1/snap/Snap.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public void onCreate(Bundle savedInstanceState) {
143143
// Create our Preview view and set it as the content of our activity.
144144
mPreview = new Preview(this);
145145
setContentView(mPreview);
146-
146+
147147
// Set up a tap handler
148148
mPreview.setOnClickListener(new OnClickListener() {
149149
public void onClick(View v) {

0 commit comments

Comments
 (0)