Android :: Need To Get The Touch Position In Droid
Aug 13, 2010I need to get the touch begin position (X, Y) , touch move position and touch end position of the screen in android.
View 3 RepliesI need to get the touch begin position (X, Y) , touch move position and touch end position of the screen in android.
View 3 RepliesI'm trying to make a ScrollView with a list of numbers in it that the user can select from. After the user touches and scrolls, after the finger is lifted I want the scroll to "snap" to the item in the middle of the ScrollView and give me the output. My ScrollView contains a vertical linear layout with TextView objects in it. The ScrollView's vertical size is about 60sp.
I think this would involve the ScrollView.onTouch with a ACTION_UP, but I don't know how to use it. Also, is there a way to get an item's index or value based on a position in the list?
I have a large image on the screen and I want to display a small image on that image where I touch the screen. but I do not know how to change the position of the image when I touch on the screen and the small image must display where ever I touch on screen.
View 3 Replies View RelatedI have a TextView with an OnTouchListener. What I want is the character index the user is pointing to when I get the MotionEvent. Is there any way to get to the underlying font metrics of the TextView?
View 1 Replies View RelatedOn my htc i was looking through display, i see g sensor calibration and i perform this calibration and after i do so the screen seems to have a delay when switch from the horizontal position to the vertical position. its weird because when i switch to the phone horizontally it switch normally and responds fast. but when i switch back to vertically it takes almost 7 seconds to actually switch back, sometimes it switch within 2 or 3 secs but never as quick as switching horizontally.
MQuote:
Originally Posted by Rigmaster
Make sure you have the latest updates, which impact speed on the device in some unpredictable and unexpected ways. During system updates, your Evo may reboot and will take the g-sensor changes as last calibrated.
If you're already updated, shut down and repower (soft reboot) should do the trick. I actually updated my phone and after it started to do this. I restarted the phone plenty of times i even took the battery out for 30 seconds. It only does it when im texting on the browser, basically everything but the camera. He camera screen rotation is perfect. I even rooted the phone but i havent figured out how to use the root to fix the problem. Should i do a firmware update? Because i just did the htc software update.
I want to created a wrapping text ontop of google maps api. I have been able to do this with a lot of code, but have been working on a better way. My latest attempt is to use the StaticLayout class and the text is wrapping, but I do not know how to position it...no matter what I try it is always starting in the top left corner of the screen....
View 1 Replies View RelatedI've got another question regarding to basic Android programming:
How can I access the GPS for getting the current Position of the mobile phone the app is running on? How long can this take to retrieve the information?
In this case the GPS might be disabled, how can I enable/disable it again.
Which permissions must be granted in the android manifest?
I have one EditText, and I want to get the current column position.
I am using SDK 1.5
How to change candidateView position in android softkeyboard?
View 2 Replies View RelatedWhen i use toast to display some text on screen it displays little bit above the bottom(default position).
now i want to display it in the middle of screen or according to my choice can any one guide me how to achieve this?
I want to set the AlertDialog position behind the status bar, when the content in my Dialog will increase, How to do that? I am creating a custom AlertDialog using my own layout.
View 1 Replies View RelatedI was wondering if it is possible to start a ListActivity and in real time decide how far down the list it should be focused on. (Example: When the activity is started it checks for certain conditions and then it may scroll down to a row partially through the list.)
View 1 Replies View RelatedIs there a way to absolutely position an UI element on Android so that it is located outside an Activity? For example: can you create a fullscreen ImageView simply by moving/resizing an ImageView inside an existing regular Activity instead of creating a new fullscreen activity?
View 1 Replies View RelatedMy friend and i develop a Android program.
Now we got to the question if it's possible to get the actual position of an ListElement.
Example: You drag the list up and down, and now you want to konw which element is on the center of the screen?
Is it possible to set the absolute position of a view in android? (I know that there is an AbsoluteLayout, but it's deprecated...)
Lets say I have a screen 240x320px, and I want to put an ImageView which is 20x20px with its center at the position (100,100).
What do I have to do?
I'm working on an application that displays the location of moving items on a Google MapView. I need a way to update the position of the icons that represent the items (as well as change the facing of the icons every two seconds as updated data comes in). I currently have an activity in the app that extends MapActivity. On to this I have overlaid a static Overlay that draws some lines on the map and an ItemizedOverlay that draws a static icon.
View 3 Replies View RelatedI am aware of setSelection(), setSelectionFromTop(), and setSelectionAfterHeaderView(), but none of them seems to do what I want.
Given an item in the list, I want to scroll so that it is in view. If the item is above the visible window of the list, I want to scroll until the item is the first visible item in the list; if the item is below the visible window, I want it to scroll up until it is the last visible item in the list. If the item is already visible, I don't want any scrolling to occur. How do I go about this?
Is there a way to make highlighting of a row in a listview delayed if the user is simply scrolling the list with their finger? To clarify, when the user puts their finger down to scroll, the intersected row (if any) gets highlighted for a short moment, before it realizes the user is just trying to scroll (then the highlight turns off). It seems like the timeout is too short - iPhone has the same behavior, just seems that the timeout is longer to discern between a real row- select-touch, and just a scroll-touch. Any way to tweak this? You can see the behavior in any of the system apps that have lists..
View 2 Replies View RelatedI purchased the IR overlay from here [URL] I got it working with my mk808b by using an idc fiile, however, it only allows one touch point which means no zoom. On the computer it is multitouch.
View 7 Replies View RelatedAfter the OTA and a factory reset my screen dims when I tilt the the phone in camera mode. It's fine when the phone is vertical but when I go to take a horizontal landscape shot it dims the screen to black. It will do the dimming proportionally to the angle the phone is rotated off the vertical axis and front to back (freaky) It will still take the shot but I have no idea how centered I am on the shot. I changed auto dimming to "off " but it still blanks it.
View 7 Replies View RelatedSince I've had the phone now for a little over a month, about half the time that I start up Maps, it shows "My Position" as being at a house I lived at about a year ago, which is about an hour drive from where I live now. Back then, I was not with Verizon, but with ATT.
After a minute or so on Maps, it brings up my correct position. That changed about 4 days ago when I received a signal extender that was ordered from Verizon. Now, Maps starts up showing that I'm near a golf course in Canyon Lake, California. About 3 minutes later, it corrects itself.
Is there such a thing for the HTC desire? also, is there a app that lets you see how many multi touch points the htc desire has? i saw some youtube vids where that have this app and they put as many fingers as they can on the screen and scribble around.
View 2 Replies View RelatedOk what I want is for whenever I move from one place or another ...maybe driving 30 mins or an hour the weather automatically updates to that location without me having to manually refresh.what do I need to turn on for that in the location services
"Use Wireless Networks/Mobile Networks" Location determined by wifi and or mobile networks
"Location Settings" Allow network to detect your position
"Enable GPS Satellite" requires more battery
These are the three options I can check...the first one is checked right now.if I check the second one will it update the weather automatically or is the first one all that is required and it says the battery will be drained in the third option but what about the 2nd option.
I'm really struggling between the EVO and the iphone 4.My HTC Touch Pro looked shiny when I bought it a year and a half ago, and now it feels obsolete. I can barely use it for more that texting/phone, far less than the device promised. In the time I've had it, there was one update which mostly just fixed bugs. And in my other pocket I have a first generation ipod touch that feels superior in every way, except the phone part.I have no confidence in HTC's ability to support it's products and improve them over time, Apple does do this, my ipod touch is better than when I bought it four years ago. But the EVO runs android and it looks like that is something that is going to develop over time.Will the device be able to rely on android in that way? I'm already seeing people suggest that HTC will lag behind android updates because they'll fail to update their android skins in a timely manner.Can the EVO run on just android if that UI experience turns out to be better than what HTC can offer?
My other primary concern is itunes syncing. I have dozens of 'smart playlists' that I've pretty carefully designed to change and improve with my listening habits, and all of my podcasts sync through itunes. Also, I've been using 'itunes U' to listen to full courses and my itunes is set up so that every time I sync my finished lectures are replaced with the next in the series.... So, I'm sure many of you have seen the EVO "tutorial" showing you how to load music onto the device, literally just dumping files onto the devices hard drive, that is effing laughable. Is there a reasonable way to sync and listen to music on the EVO?
I have a problem which is disable and enable scrollView by code. This is my layout which includes header, footer and scrollview. The scrollview contain imageView and MapView. I used scrollview to scroll image and MapView because height total of their larger than height of screen. I want to disable scrollview if I touch map and move in the map. And it is enable when I touch ImageView. So, I will listen even touch and move in the map to enable and disable scrollview.But I try to use setEnable and setHorizontalScrollBarEnabled,setVerticalScrollBar Enabled method to do it but not success.
PHP Code:
<RelativeLayout android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/white"
android:orientation="vertical"> <!-- Header --> <RelativeLayout android:id="@+id
[Code]....
I need to get an item's position in spinner knowing it's ID. I've tried to do it with Spinner and SpinnerAdapter classes but there are no corresponding methods there.
View 2 Replies View RelatedI am currently using a dumb phone and an iPod Touch for my mobile needs. I was hoping Apple would come out with a Verizon model, but that may or may not ever happen. I have been reading about the new Droid X and have been impressed with what I've read. However, I have a number of apps on my iPod that I use on a regular basis and am wondering how happy I would be with what's available for the Droid.I am using Gmail, so that's not a problem. I use Apple's address book and have not been satisfied with the way Google handles that, so I would need to be able to sync my contacts to Apple. I have tons of music and audio books in iTunes, I have a number of books from Audible.com, and I use Fluent News for the iPod for my newspaper fix (along with an AP app, the NY Times, and USA Today). I have a diet program that keeps my meals on the iPod, not on the web, and allows me to quickly enter without any fuss the foods I eat and gives me a balance of how many calories I have left (and allows me to customize the food bank without having to scan through hundreds of foods I don't eat). I have a few e-books from Project Gutenberg that I read on Stanza, though any e-book program that would allow me to access them would work fine. I also keep my ToDo list on Toodledo and use their iPod app to access it on the move.
Have any of you made the move from an iPod or iPhone to a Droid? How happy are you with the apps. Would the Droid have apps that would give me what I have above (not the same developers, of course, but something comparable)? I've done some reading and my son-in-law let me play with an older model Droid, but before I invest, I would like to know more. I can return the Droid X to Verizon within 30 days with a re-stocking fee, so a switch that didn't work wouldn't be devastating, but I hate to invest the time if I don't have a good chance of being satisfied.
Right now all I am trying to do is detect when the screen is pressed and then display a log message to confirm it happened. My code so far is modified off of the CameraPreview sample code (it will eventually take a picture) so the bulk of the code is in a class that extends SurfaceView. API for the example code from the SDK is 7.
View 1 Replies View RelatedNew to android so please bare with me here
Is it possible to detect all touch events in an Activity and capture it and then in return pass that pass event to another View. For example:
Button 1 and Button 2. When Button 1 is pressed I want to capture that touch/click event and automatically pass that touch event to Button 2, basically with one touch/press you get the click generated and that same click is passed on to the second button automatically.
I need to make a service that capture all touch events, not in a specific view or when an specific activity is open. This service is started when the boot is completed (and I have an app to stop/play this service when I want it). So it write something (in a Toast) when the user touch any place in the screen.
Can I do this? Or only in specifics things (with OnTouchListener and adding specifics views, for example)?