I am trying to make Scrolling Object Collection from MRTK Unity work with Android.
The problem is, that scrolling is just too slow. When I swipe across the whole screen the objects in the list barely move.
If I look at the collection, touch the screen, and then move my phone in the direction I want to scroll, everything works fine.
But that is not how I want users to scroll.
Any ideas how to make the touch behave the same way/have the same impact as moving the phone?
Related
I have an Android app that we've been developing for several years. At some point the scrolling in a WebView has gotten a bit wonky. It has to do with the "momentum" after swiping up or down. Sometimes the momentum will stop prematurely. Sometimes it will appear to bounce and backup a bit. I'm seeing this on multiple devices so I don't think it isa hardware issue.
The problem seems to happen both on external URLs that are loaded and with built-in HTML files (e.g. Help files).
This is a very plain WebView. I've commented out all the code that configures it or manages its WebViewSettings.
It seems it must have something to do with the app it is embedded in, possibly some manifest settings, but I can't imagine what.
Has anyone experienced anything like this?
Try setting the parent View of the Webview to
view.setFocusable(false);
I had a very similar issue involving scrolling a Webview that had a series of DIVs with images. When scrolling down it would spontaneously reverse scroll direction and even sometimes shoot back to the top. It only happened on hardware devices -- never on simulator or in any conventional browser I tested.
See Android reference here: https://developer.android.com/reference/android/view/View.html#setFocusable%28boolean%29
This issue is because of the default scroll behaviour of WebView. If you have a webview inside a ScrollView then, there will be cases where scroll event will be sometimes handled by the scroll view and sometimes by WebView and therefore the jitter during scroll.
In order to fix these scroll issues, please refer this
Scrolling of Webview inside ScrollView
So I am making a simple Basketball Shoot game, that use the swipe gesture (swipe down to up to throw balls).
When I use Unity remote 4 on my android device, everything works fine, when I swipe my finger, it throws a ball according to the swipe movement.
But when I build my app, and run it on my android device, the swipe gesture works, but it throw balls in other direction that doesn't match the swipe direction.
I run my app on two different devices, and they have different directions for the same swipe movement.
How can I fix that? do I need to setup something in unity player settings?
Thanks a lot :)
I am assuming that you are using RayCast to detect swipe gesture. If that so then update your question with code snippet. We have to play bit smartly while using RayCast.
I've modified an Android navigation app (kind of like Google Maps), and I want to test it. Specifically, I want to do some things like scrolling around and zooming in and out (there are two zoom buttons at the bottom of the window that allow you to zoom). However, I want to do the same test run a few times in a row. For example, scroll all the way from right to left, then wait 10 seconds, then zoom in, then scroll twice all the way from bottom to top, then zoom out after 5 seconds, etc. The problem is that I can't possibly replicate the test run exactly every time due to human error.
Is there some way I can automate the test run? Sort of like a macro that you record on Excel, but with timing as well? Maybe a script of some sort? Basically, I want a way to automate the scrolling, zooming, timing, etc.
Any tips?
I have an Android game app that populates the screen with tiny images (circles). The game is to tap the circles on the screen as quickly as possible until they all disappear. The problem is you can circumvent the game easily by swiping/moving one's finger across the screen (and making every circle touched disappear). In four swipes you're done with the game. I'm not even sure of the correct terminology.
Any ideas? onFling? onLongPress? I do not know.
So, here is the deal. I want to create a little game-like app(let me call it the game, from now on). Before I begin, I'd like to show you up the raw UI of the game.
So, as you can see, I would have:
a red ball in the middle
two walls on either sides
Procedure:
User would move the device to right side and hits the right wall (the gray ball on the right side is simulated)
Movement of device occures to left so it can reach the left wall as well. (like the gray ball on the left)
All I know regarding the program side is the sensors, especially Accelerometers. Most of the people at Stackoverflow are of the opinion that working with sensors not on its good stages, that is, the data comes from them is very noisy, processing them can be hard. However, I think a lot of games are using them to some extent...
Well, I tried moving an image by drawing it. I attempted to get data from gyroscope, accelerometer, linear accelerometer and used that data to draw my image. The problem is that if I move the device smoothly and slowly then I got almost no movement on the drawings. That gives the horrible user experience.
The question is how can I implement my game so that it can meet all my needs above even if I move my device slowly. Any approaches are welcome.