I'm having issues while coding for my Evo. While touching the screen, the Evo interprets me touching the buttons as another press on the screen instead of a onKeyDown, onBackPressed, etc. (It actually sets the MotionEvent pointer count to 2, and I can get the co-ords that I'm touching that are off the main screen, for example, 830*190 when touching the back button.)
Short of coding in the locations of the buttons (which would be different for every phone with capacitive buttons, if they all have the same issue), is there any way to get around this? Does anyone else have this issue with a different capacitive buttoned device?
On the Evo, the area where the buttons are uses the same capacitive touch sensor as the screen. You can test this by loading up a webpage and scrolling until your finger is in the buttons region. Instead of pressing those buttons, you just continue to scroll around on the webpage, because as far as the phone is concerned you're still touching the "screen".
Related
I don't know exaclty how it is called, but I got a screenshot:
Basically, in this case, I press a button and this window from "FC Barcelona" pops up, occupying about 3/4 of the screen. After it is opened I can drag it up and down. If I drag it up, it occupies the whole screen, if I drag it down, it disappear.
How can I use this tool or how it is called in android?
What you want is a BottomSheet. You can find an example on how to do it there at the Design Support Library: Bottom Sheets section.
http://android-developers.blogspot.de/2016/02/android-support-library-232.html
I need your help with my application.
I'm writing a program that displays big images in tiles, using the SWT MapWidget (http://mappanel.sourceforge.net/swt/).
The user has the ability to place markers on the map, when he pressed the mouse for a couple seconds. Additionally, I also need a little ZoomBox next to the cursor that shows the area around the cursor, so that the user has better precision when placing a marker. This ZoomBox is to be displayed while the user keeps the mouse pressed. Placing the markers ia already working fine.
I have problems with implementing the ZoomBox, specifically displaying it. I found a post that does just what I need (Zoom box for area around mouse location on screen). The problem is, this post is for Swing and not for SWT.
I have already built a SWT_AWT-Bridge, so I have the ZoomPanel already in my shell. What I need is the functionality of displaying it on top of the MapWidget, while the user keeps the mouse pressed.
I figured, I need to use a StackLayout, but I don't know how.
EDIT
To clarify, my question is, how can I display the composite containing my ZoomBox on top of my image, while the user keeps the mouse pressed?
I am thinking about making a launcher for android, i dont know if i'll market it. But i'm thinking like my phone is in landscape mode, and i see 4 rows of buttons, and 4 buttons on each row. Kind of like a grid with buttons. And then, once i click a button, i want the buttons splitted in the middle and moved from each other, with an animation. And then a second screen comes in from the back. How can i do this? I thought of creating two layouts holding 4 buttons each, and once i click one, it should move the layouts from each other and the second blank screen would kind of fly in from the back, like if it was behind the buttons. How can i create these animations? Please help me and thanks so much!
You can add a middle row with width initially as 0dp, and then when opening an Activity you could animate its width, and for the second screen you can use a simple zoomIn animation with overridePendingTransition() after startActivity()
In my Android app I have a gallery which contains some TextViews. I realized that some users don't understand that they can scroll that gallery although the previous and next TextViews are partially visible. So I put an ImageView with a horizontal arrow under the gallery.
Now the users try to drag the arrow. Is it possible to redirect the touch event from the ImageView to the gallery so that dragging it would scroll the gallery?
Thanks in advance,
Fri
The simplest thing (if you don't mind scrolling one item at a time) is to detect the direction of the touch event on the arrow and then dispatchSetSelected(boolean selected) on the gallery... I believe that will work. after the user does that once, they will probably intuit that they can then just drag the gallery. Of course if you want to measure the touch event speed and do the calculation for how far to scroll based on that, you can do that too... but that seems like a lot of unnecessary trouble.
I have to develop a touch screen application based on swing for the GUI part.
The application will have to be displayed on different screen, one 15" 4/3 screen and one 20".
What kind of layout stategy should i go for, to keep the same proportion in my components from one screen to another ?
The application will have a kind of status bar at the top displaying some information coming from a server, a menu bar at the bottom, the main central part of the application will display graphs, and on the right an area that will display the same information as the graphs, but in digital format. Buttons from the menu bar and labels in display/status bar have to be quite big as the users that will play with the screen may wear gloves...
Thanks you for help.
any specific layout manager is not gonna do the trick....Handling the window size is not a problem as that can be taken care of (use ToolKit for that). Only problem is that u gotta make sure that, the component sizes are not fixed, cos when screen size changes that gotta change as well. This is a peculiar problem, lot of trail and testing may be required.