Skip to content

Commit 7add21c

Browse files
committed
Added/fixed double-tap zoom. Added support for onClickListener
1 parent 1a6a39b commit 7add21c

25 files changed

+439
-190
lines changed

example/AndroidManifest.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
<category android:name="android.intent.category.LAUNCHER" />
1818
</intent-filter>
1919
</activity>
20+
21+
22+
23+
<activity android:name="StandardImageProgrammaticWithOnClick"></activity>
2024
<activity android:name="StandardImageProgrammatic"></activity>
2125
<activity android:name="StandardImageXML"></activity>
2226
<activity android:name="DoubleImage"></activity>

example/src/com/polites/android/example/DoubleImage.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
package com.polites.android.example;
22

3-
import com.polites.android.GestureImageView;
4-
53
import android.app.Activity;
64
import android.os.Bundle;
75
import android.os.Handler;
86
import android.os.Message;
97
import android.view.ViewGroup;
108
import android.widget.LinearLayout.LayoutParams;
9+
import com.polites.android.GestureImageView;
1110

1211
public class DoubleImage extends Activity {
1312

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
* Copyright (c) 2011 Socialize Inc.
3+
*
4+
* Permission is hereby granted, free of charge, to any person obtaining a copy
5+
* of this software and associated documentation files (the "Software"), to deal
6+
* in the Software without restriction, including without limitation the rights
7+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
* copies of the Software, and to permit persons to whom the Software is
9+
* furnished to do so, subject to the following conditions:
10+
*
11+
* The above copyright notice and this permission notice shall be included in
12+
* all copies or substantial portions of the Software.
13+
*
14+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20+
* THE SOFTWARE.
21+
*/
22+
package com.polites.android.example;
23+
24+
import android.app.Activity;
25+
import android.os.Bundle;
26+
import android.view.Window;
27+
28+
29+
/**
30+
* @author Jason Polites
31+
*
32+
*/
33+
public class ExampleActivity extends Activity {
34+
@Override
35+
public void onCreate(Bundle savedInstanceState) {
36+
super.onCreate(savedInstanceState);
37+
requestWindowFeature(Window.FEATURE_NO_TITLE);
38+
}
39+
}

example/src/com/polites/android/example/Main.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public class Main extends ListActivity {
3737
static final String[] listItems = {
3838
"Single Image XML Layout",
3939
"Single Image Programmatic",
40+
"Single Image Programmatic with onClick event",
4041
"Double Image (With delayed load)",
4142
"ScaleType CENTER Large",
4243
"ScaleType CENTER_CROP Large",
@@ -55,6 +56,7 @@ public class Main extends ListActivity {
5556
static final Class<?>[] actvities = {
5657
StandardImageXML.class,
5758
StandardImageProgrammatic.class,
59+
StandardImageProgrammaticWithOnClick.class,
5860
DoubleImage.class,
5961
ScaleTypeCenter.class,
6062
ScaleTypeCenterCrop.class,

example/src/com/polites/android/example/ScaleTypeCenter.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
package com.polites.android.example;
22

3-
import android.app.Activity;
43
import android.os.Bundle;
54

6-
public class ScaleTypeCenter extends Activity {
5+
public class ScaleTypeCenter extends ExampleActivity {
76
@Override
87
public void onCreate(Bundle savedInstanceState) {
98
super.onCreate(savedInstanceState);

example/src/com/polites/android/example/ScaleTypeCenterCrop.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
package com.polites.android.example;
22

3-
import android.app.Activity;
43
import android.os.Bundle;
54

6-
public class ScaleTypeCenterCrop extends Activity {
5+
public class ScaleTypeCenterCrop extends ExampleActivity {
76
@Override
87
public void onCreate(Bundle savedInstanceState) {
98
super.onCreate(savedInstanceState);

example/src/com/polites/android/example/ScaleTypeCenterCropPortrait.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
package com.polites.android.example;
22

3-
import android.app.Activity;
43
import android.os.Bundle;
54

6-
public class ScaleTypeCenterCropPortrait extends Activity {
5+
public class ScaleTypeCenterCropPortrait extends ExampleActivity {
76
@Override
87
public void onCreate(Bundle savedInstanceState) {
98
super.onCreate(savedInstanceState);

example/src/com/polites/android/example/ScaleTypeCenterCropSmall.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
package com.polites.android.example;
22

3-
import android.app.Activity;
43
import android.os.Bundle;
54

6-
public class ScaleTypeCenterCropSmall extends Activity {
5+
public class ScaleTypeCenterCropSmall extends ExampleActivity {
76
@Override
87
public void onCreate(Bundle savedInstanceState) {
98
super.onCreate(savedInstanceState);

example/src/com/polites/android/example/ScaleTypeCenterCropSquare.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
package com.polites.android.example;
22

3-
import android.app.Activity;
43
import android.os.Bundle;
54

6-
public class ScaleTypeCenterCropSquare extends Activity {
5+
public class ScaleTypeCenterCropSquare extends ExampleActivity {
76
@Override
87
public void onCreate(Bundle savedInstanceState) {
98
super.onCreate(savedInstanceState);

example/src/com/polites/android/example/ScaleTypeCenterInside.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
package com.polites.android.example;
22

3-
import android.app.Activity;
43
import android.os.Bundle;
54

6-
public class ScaleTypeCenterInside extends Activity {
5+
public class ScaleTypeCenterInside extends ExampleActivity {
76
@Override
87
public void onCreate(Bundle savedInstanceState) {
98
super.onCreate(savedInstanceState);

0 commit comments

Comments
 (0)