Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix force close that occured when tapping randomly on a view to show …

…quickaction dialog.

Thanx to Zammbi (http://github.com/zammbi)
  • Loading branch information...
commit 944cdb588b6e1add9a2d345d6dca995f78bab40b 1 parent 68b6feb
@lorensiuswlt authored
View
7 .classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="gen"/>
+ <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
View
33 .project
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>NewQuickAction3D</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.ApkBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.android.ide.eclipse.adt.AndroidNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
View
23 readme.md
@@ -0,0 +1,23 @@
+NewQuickAction3D
+================
+
+NewQuickAction3D is a small android library to show quickaction dialog just like quickaction on Gallery3D app.
+
+**See http://www.londatiga.net/it/how-to-create-quickaction-dialog-in-android/ for more information.**
+
+![Example Image] [1]
+
+Developed By
+============
+
+* Lorensius W. L. T - <lorenz@londatiga.net>
+
+Changes
+=======
+
+2011-10-05:
+- Fix force close that occured when tapping randomly on a view to show quickaction dialog.
+ Thanx to [Zammbi][2] for bug fix..
+
+[1]: http://github.com/zammbi
+[2]: http://londatiga.net/images/quickactions/gl3d2.jpg
View
8 src/net/londatiga/android/QuickAction.java
@@ -69,6 +69,11 @@ public void setRootViewId(int id) {
mScroller = (ScrollView) mRootView.findViewById(R.id.scroller);
+ //This was previously defined on show() method, moved here to prevent force close that occured
+ //when tapping fastly on a view to show quickaction dialog.
+ //Thanx to zammbi (github.com/zammbi)
+ mRootView.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
+
setContentView(mRootView);
}
@@ -150,7 +155,8 @@ public void show (View anchor) {
Rect anchorRect = new Rect(location[0], location[1], location[0] + anchor.getWidth(), location[1]
+ anchor.getHeight());
- mRootView.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
+ //mRootView.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
+
mRootView.measure(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
int rootHeight = mRootView.getMeasuredHeight();
Please sign in to comment.
Something went wrong with that request. Please try again.