general discussion: prevent user action until we are sure, that it user driven was
Closed this issue · 20 comments
the new flash light control by wallace is an good/bad example for my point of view.
i guess we have to ensure that button driven functionality is only available when the user controls the phone.
maybe an wiped in option view is visible for 1 - 2s. each button is covered by this view.
a possible gesture: from outside to inside across bottom edge of main panel.
I'm not entirely clear on the options panel idea. Would it slide in on the cover-closed screen? That might be kind of finicky. Anyway that screen usually isn't up for that long (I set the delay to 2 seconds or so except when debugging). What kinds of options would be useful to have there?
It's a great point about the stuff for user control - I am planning to make the flashlight control configurable so it would at least be optional. For me, I set the screen delay to about 15 seconds - I'm very often using the media player controls and I find that's a good window of time to allow me to play/pause/skip as I need. It does raise the issue though of the potential for accidentally triggering any other controls when not wanted, so some kind of 2-step process (swipe to access the control, press to activate it) would be a good plan for any controls we do want. On top of the flash-light control I'm also looking into being able to add a basic camera capability - so you could press a button, see the image preview shown within the windowed area, and then hit another button to take the picture.
@durka: for example the flashlight. steps to toggle
- wipe to open option panel
- press the flashlight button
option panel closes automatically after user action or even a timeout without user action.
the biggest problem is the event handling. with closed cover we have very likely a multitouch situation.
hi, i have added an repository https://github.com/habeIchVergessen/TestInput, that contains a case study for a possible "pie menu" (pre-alpha). torch toggle works for me.
usage:
- touch the point below phone widget and start wipe gesture (option overlay opens)
- wipe to desired option and release
Sounds super cool! I am excited to see how this turns out. Your other pull request has gotten a little confusing with all the merges, but rest assured I am working on how to integrate the slide action into the phone feature.
@habeIchVergessen I started to play with TestInput. (I fought with Android Studio and lost, settled on just using gradle from the command line -- what IDE are you using?) It's cool, but a little finicky with both press and release. For the release especially, I'm thinking the area should be a cone instead of just a rectangle, so that you can swipe past the icon and still have it activate. What do you think?
i'm using AndroidStudio.
of course we need any kind of indication for selecting an option. i played with background color but couldn't see it all times. my idea is an small beam above ImageView that will be illuminated when hitting the option.
press and release makes a submenu possible (for instance music player panel or ringer mode). wipe to music icon (submenu opens) and go for next selection.
i added wallace camera stuff (more complex example). i didn't implemented a context based reconfiguring of menu.
Yeah, an indicator would help. I was saying we could also make the whole landing area (the area in which a touch-release event would be detected) into a cone so that you can overshoot.
i guess it's no problem to implement such behaviour. but I'm not sure that we have only one line icons.
we need a concept for using the rare space. in the end usability gives answers.
Good point. Some kind of highlighting would help... I don't know what kind of support Android has for non-rectangular views. Nice work on the pre-alpha.
snap circular segment implemented.
highlight selection implemented. layout has been changed (incl. smaller buttons).
please give me feedback for usability.
Hiya - I checked out your TestInput repository, but when I launch it nothing happens. Here's the console log:
[2014-01-03 16:55:22 - MainActivity] ------------------------------
[2014-01-03 16:55:22 - MainActivity] Android Launch!
[2014-01-03 16:55:22 - MainActivity] adb is running normally.
[2014-01-03 16:55:22 - MainActivity] No Launcher activity found!
[2014-01-03 16:55:22 - MainActivity] The launch will only sync the application package on the device!
[2014-01-03 16:55:22 - MainActivity] Performing sync
[2014-01-03 16:55:22 - MainActivity] Automatic Target Mode: using device 'c7d86e40'
[2014-01-03 16:55:23 - MainActivity] Application already deployed. No need to reinstall.
[2014-01-03 16:55:23 - MainActivity] \MainActivity\bin\MainActivity.apk installed on device
[2014-01-03 16:55:23 - MainActivity] Done!
Any ideas?
it's an AndroidStudio project. i'm using version 0.4.0.
Hmm. It worked for me. @Wallace0 do you maybe have some other project that also compiles to MainActivity.apk?
I can't get Android Studio to work so I'm using gradle from the command line:
gradle assemble
gradle installDefaultFlavorDebug
adb shell am start org.habeIchVergessen.testinput/.MainActivity
You have to use gradle 1.9, not 1.10.
Something is weird with the new version, though -- it starts up with everything visible:
i changed the menu to invisible by default!
When I get the menu to come up, it works great -- but I only seem to hit the right spot about 1% of the time! Is the hit target impossibly small?
i have removed clickable and focusable from menu button. it forbids event handling for coordinates on top of menu button. just the surrounding ellipse starts user actions. i found this issue in AVD.
OK, getting a new problem now - get this when I try and launch it:
01-06 15:58:11.975: E/AndroidRuntime(6723): FATAL EXCEPTION: main
01-06 15:58:11.975: E/AndroidRuntime(6723): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{org.habeIchVergessen.testinput/org.habeIchVergessen.testinput.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "org.habeIchVergessen.testinput.MainActivity" on path: DexPathList[[zip file "/data/app/org.habeIchVergessen.testinput-1.apk"],nativeLibraryDirectories=[/data/app-lib/org.habeIchVergessen.testinput-1, /vendor/lib, /system/lib]]
01-06 15:58:11.975: E/AndroidRuntime(6723): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2255)
01-06 15:58:11.975: E/AndroidRuntime(6723): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2389)
01-06 15:58:11.975: E/AndroidRuntime(6723): at android.app.ActivityThread.access$600(ActivityThread.java:153)
01-06 15:58:11.975: E/AndroidRuntime(6723): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1269)
01-06 15:58:11.975: E/AndroidRuntime(6723): at android.os.Handler.dispatchMessage(Handler.java:99)
01-06 15:58:11.975: E/AndroidRuntime(6723): at android.os.Looper.loop(Looper.java:137)
01-06 15:58:11.975: E/AndroidRuntime(6723): at android.app.ActivityThread.main(ActivityThread.java:5289)
01-06 15:58:11.975: E/AndroidRuntime(6723): at java.lang.reflect.Method.invokeNative(Native Method)
01-06 15:58:11.975: E/AndroidRuntime(6723): at java.lang.reflect.Method.invoke(Method.java:525)
01-06 15:58:11.975: E/AndroidRuntime(6723): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
01-06 15:58:11.975: E/AndroidRuntime(6723): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:555)
01-06 15:58:11.975: E/AndroidRuntime(6723): at dalvik.system.NativeStart.main(Native Method)
01-06 15:58:11.975: E/AndroidRuntime(6723): Caused by: java.lang.ClassNotFoundException: Didn't find class "org.habeIchVergessen.testinput.MainActivity" on path: DexPathList[[zip file "/data/app/org.habeIchVergessen.testinput-1.apk"],nativeLibraryDirectories=[/data/app-lib/org.habeIchVergessen.testinput-1, /vendor/lib, /system/lib]]
01-06 15:58:11.975: E/AndroidRuntime(6723): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:53)
01-06 15:58:11.975: E/AndroidRuntime(6723): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
01-06 15:58:11.975: E/AndroidRuntime(6723): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
01-06 15:58:11.975: E/AndroidRuntime(6723): at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
01-06 15:58:11.975: E/AndroidRuntime(6723): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2246)
01-06 15:58:11.975: E/AndroidRuntime(6723): ... 11 more
I'm just using the Eclipse ADT v 22.3 for building and deploying.
use gradle for eclipse (also refer here). otherwise durka's instructions works too.
i have updated the repository. code separated, option snap implemented, example implementation for interaction between OptionOverlay and application.
take a look at MainActivity.java and activity_main.xml. comments are welcome.