Android : Can I Get Absolute Screen Position?

Nov 4, 2009

View.getLeft() and View.getTop() give the position of the view relative to the parent.

Is there a way to get the absolute screen position of that view?

Either a way to translate those coordinates into screen coordinates to make a call to get the position in screen coordinates.

Android : Can i get absolute screen position?


Android : Setup Absolute Position Of A View In Droid?

Jul 20, 2010

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?

View 1 Replies View Related

Android : Change Absolute Position Of A View Programmatically?

Aug 9, 2010

If you use an AbsoluteLayout (I know that it is deprecated, but it was the only way to solve my problem ) you can give the childViews the tag "android:layout_x" and "android:layout_y" to set their absolute position within the AbsoluteLayout.

However I dont want to set these informationen in the xml, because I only know them at runtime. So how can I set these parameters at runtime programmatically? I dont see any method on the View like view.setLayoutX(int x) or something.

Here is my XML, which works fine, when I set the layout_x and layout_y values. code...

View 1 Replies View Related

Android : Setup Images Position In Absolute Layout?

Nov 21, 2010

I have an image setup inside an absolute panel.I am trying to set it's position via code.But I do not see any applicable method/property to set its position.

Here is my layout.

<?xml version="1.0" encoding="utf-8"?>
<AbsoluteLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
>

<ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/marker" android:src="@drawable/marker" android:layout_y="106dp" android:layout_x="290dp"></ImageView>
</AbsoluteLayout>

Here is my code to set its position...

View 1 Replies View Related

HTC EVO 4G :: Screen Rotation - Delay When Switch From Horizontal Position To Vertical Position

Sep 29, 2010

On 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.

View 1 Replies View Related

HTC Incredible :: Verizon Screen Protectors Are Absolute Disappointment

May 1, 2010

First post and already I am complaining. I guess most of you know already that they don't fit the entire front plate, only the center screen. But I was willing to live with that till better ones came out, but what really got me (unless I did something wrong) was the second tab you are supposed to pull off after installing the shield is stuck on like a sticker that has glue on the back side and left part of the sticker stuck on the screen.On my second attempt I used Goo Gone to get the sticker off first but the application for applying still came out messy.Anyway just a heads up stay away.On a side note one thing that doesnt suck was the red and black gradient case I got for the phone. It feels nice and I believe will absorb most falls to the ground while still protecting the phone. It also looks great and seems to sit flush to the ground so that the camera is not touching the surface directly.

View 39 Replies View Related

Android : How To Know Screen Position Where User Touched Screen?

Sep 7, 2010

In my app I draw an image covering the entire screen. I want to now how can I know where the user touched the screen?

View 2 Replies View Related

Android :: Screen Rotation - Keep Notification Bar Etc In Same Position

Aug 22, 2009

I have an activity which I have defined to keep in portrait position.

However I would still like to change things (slightly) when the screen is rotated, what is the best way of doing this? I notice onConfigurationChanged is still called, but this still reports portrait mode.

I want to keep the notification bar etc in the same position if possible.

View 4 Replies View Related

Android :: Change Position Of A Bitmap Where Ever I Touch On Screen?

Oct 28, 2010

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 Related

Android :: Setupe Position Of A AlertDialog Off Screen At Top In Droid?

Jul 1, 2010

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 Related

Android :: My Location Overlay - Customizing Compass Position On Screen?

Nov 3, 2010

I am using these three lines to add a compass on the MapView: mMyLocationOverlay = new MyLocationOverlay (this,mapView);mMyLocationOverlay. enableCompass(); mapView.getOverlays() .add(mMyLocation Overlay) ; However the default position of the compass showing on the screen is not too good for my apps, and I want to move it to somewhere else. Anyone knows how I can achieve that?

View 2 Replies View Related

Android :: Draw Custom View On Specific Position Of Screen?

Apr 5, 2010

I have a custom component which consists of 2 text view and 4 toggle buttons. I want to draw this view at some specific position on the screen. How is that possible?

View 1 Replies View Related

HTC Incredible :: Way To Change Home Screen Position?

Sep 18, 2010

So I have had the Incredible for a while now and I absolutely love the phone. The only thing that has really bugged me from day one is the positioning of the home screen. The phone is suppose to be fully customizable but it seems that the one thing I have yet to figure out is how to change where my home screen is located. I would much rather have my home screen set as the left most screen instead of having it directly in the middle of my seven available screens. You know, sort of like how the iphone is and what not. Does anyone know if something like this is possible?

View 1 Replies View Related

HTC EVO 4G :: Move Screen With Extra Apps To That Position?

Jun 6, 2010

When i slide to the right i get my contact screen. I want to move the screen with my extra apps to that position. how do I do that?

View 6 Replies View Related

HTC EVO 4G : Landscape Position Line Divided Screen Left Right

Jun 16, 2010

I was sitting at my local Dunn Bros surfing the web on my EVO when I noticed a line that divided the screen in half. If held in the landscape postion the line divided the screen left right and if in portrait upper and lower. As time went on I noticed a lot of off color streaks that ran the length of the screen. Now about an hour later the whole screen is very washed out looking, and no my brightness is not on high either. Text is almost unreadable. It almost looks like when you take a magnet to a CRT screen. And no my EVO has never gotten wet, dropped, or abused in anyway.

Anyone out there experienced this. It really sucks because I don't have the screen separation issue or any other issues that people are experiencing but now my screen is completely dying.

View 16 Replies View Related

HTC Droid Eris :: Camera Screen Dims In The Horizontal Position

Jun 25, 2010

After 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 Related

HTC Hero :: Touchscreen - Screen Takes Right Horizontal Position Of My Finger - Not The Vertical

Feb 8, 2010

I have got one big problem with the touch input of my Hero. The screen is too sensitive. I can navigate on the screen while my finger is about 5 cm away from it. I can choose what I want, but the screen takes the right horizontal position of my finger, but not the vertical. Anything I want to take, the screen takes the one on the bottom of the screen. The same when I want to write a message or something like this. I choose the "W" or "E", but the screen takes the "X" or "C". If the display goes on Standby and I wake it again, everything is good for a few seconds, but than the same mistake comes again. I already tried to wipe and install a new MCR, but nothing helps. I think, but I am not sure, that I have that problem after I have installed the htc keyboard on android 2.1, as I tried it for a few hours.

View 5 Replies View Related

Android :: How To Get Absolute Time?

Aug 20, 2010

I'll notify something to user after 30 minutes for example. so I need to get a time which is not changable by user or anything. Does it call UTC? I guess I need to get current time and it should have nothing to do with user handle or location actually, I'm focusing '30minutes from now' rather than current time. It also should work even in case of power off and on. Can I use alarm manager for this?

View 12 Replies View Related

Android : Get Absolute Coordinates Of A View?

Feb 8, 2010

I'm trying to get the absolute screen pixel coordinates of the top left corner of a view. However, all methods I can find such as getLeft() and getRight() don't work as they all seem to be relative to the parent of the view, thus giving me 0. What is the proper way to do this?

If it helps, this is for a 'put the picture back in order' game. I want the user to be able to draw a box to select multiple pieces. My assumption is that the easiest way to do that is to getRawX() and getRawY() from the MotionEvent and then compare those values against the top left corner of the layout holding the pieces. Knowing the size of the pieces, I can then determine how many pieces have been selected. I realise I can use getX() and getY() on the MotionEvent, but as that returns a relative position that makes determining which pieces were selected more difficult. (Not impossible, I know, but it seems unnecessarily complicated).

View 4 Replies View Related

Android : Absolute Best Droid Performance?

Oct 29, 2010

I am trying to go widget-free, using Zeam launcher instead of LauncherPro which seems to randomly have issues for me, I'm just wondering what tips you all may have for getting the best performance possible from your phone. I'm on a Captivate. I care more about in-app performance and stability over bells and whistles. What do you suggest?

View 6 Replies View Related

Android : Know MotionEvent Is Relative / Absolute?

Sep 11, 2009

I am implementing OnTouchListener and am receiving MotionEvent objects. Some ACTION_MOVE events reports absolute X/Y coordinates, while some reports relative coordinates.

How can I ask a MotionEvent what kind of coordinates it currently represents?

View 3 Replies View Related

Android :: Get Absolute File Path From URI Instance

Sep 2, 2009

I need to get the absolute path of the file associated with a specific android.net.Uri instance. I know how to get the URI instance based on the file instance (with Uri.fromFile(file)) and i need the inverse action.

View 4 Replies View Related

Android :: What Is Absolute Path Of Assets Folder?

Nov 9, 2010

What is the absolute path of the assets folder? I need it to reference some images saved in this folder from a html file saved in the memory device.

View 1 Replies View Related

Android :: Absolute Path Of Assets Folder

Nov 11, 2010

How do I reference the assets from phone memory? I need it to write the absolute path into a html file to load some images which are in assets folderThis html is saved in the phone memory but I can't to save these images in the memory phone because these are very big.

View 1 Replies View Related

Android : Way To Get Absolute Path And Filename From VideoView Object

Jan 10, 2010

Just started writing java / android and I am trying to use android.widget.VideoView.

I set the video by using the setVideoPath('/path/filename') method, but can't seem to figure out how to get the path on an existing object?

I'm using methods such as 'getDuration()', and 'getCurrentPosition()' and they work great.. but where is a getPath method?

View 1 Replies View Related

Android : Retrieve Video Thumbnail From An Absolute Path?

Mar 31, 2010

I know this has to be trivial but I just don't find the right resource, I guess.
So all I want to do is retrieving a thumbnail for a video. All I have is the absolute path to the file on the sdcard as a String. So please point me into the right direction.

View 1 Replies View Related

Android : Want To Set Full Image In Absolute Layout In Droid?

Jul 28, 2010

I have set image in AbsoluteLayout but it'll not display in full screen on G1 but when i run the same application in Nexus it is working properly.

I have set setContentView(new Test(this)) in my activity class. Test is my AbsoluteLayout class.

My code looks like...

Can anyone tell me that why i am not getting full image on G1 mobile screen?

View 1 Replies View Related

Android : Place Controls At Absolute Positions - Custom ViewGroup

Sep 26, 2010

I have a custom ViewGroup. The idea is to be able to place controls at absolute positions and then have the ViewGroup scale those controls based on the difference in the screen dimensions with respect to the original design dimensions. I am using the code below. In response to the 'onMeasure' message, I am storing the width and height of the view. Then on the 'onLayout' message I am computing new dimensions for the child controls and adjusting their sizes proportionally. This all works to some degree. However for certain controls (e.g. button controls), the control resizes, but the text inside does not remain centered within the control. I am thinking that there is some other call I need to make to update the child controls after I change their size.

View 3 Replies View Related

Android : Add View Progamatically To Activity's Absolute Layoute Setting It's Possition?

Oct 7, 2010

I have a form with several Views on it, the last one is a Spinner that is bound to an adapter to get it's data from a Web Server via a POST request, at the end I append an additional entry for "Other...". If this option is selected on the spinner, a new EditText View at the bottom where the user enters a custom value, I've managed to get the EditText View to show on the screen, but it's positioned at the very top, over my other Views and I can't seem to find the way to make it appear at the bottom, below the Spinner as I want it to, here is the code I have so far:

EditText suggestCarrierField = new EditText(getBaseContext());
suggestCarrierField.setLayoutParams(new ViewGroup.LayoutParams(
ViewGroup.LayoutParams.FILL_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT));
suggestCarrierField.setHint("Suggest your carrier");

((AbsoluteLayout) findViewById(R.id.createAccountView)).addView(suggestCarrierField);
((AbsoluteLayout) findViewById(R.id.createAccountView)).invalidate();

View 2 Replies View Related

HTC EVO 4G :: Syncing Music Absolute Nightmare

Jun 13, 2010

I got my Evo 4g and I'm absolutely in love with it, but getting music to show up in ANY music player without a flaw is an absolute nightmare. If I use Tunesync the music all gets onto the card, but the playlists don't appear. If I use Doubletwist, not only does the sync take millennia, the playlists do not show up and I get duplicate playlists. If I use Salling Media, I have the same problem I have with playlist, and I get an error about source files not being htere. After over 6 hours of googling and more than 5 sd card reformats, I'm abotu to give up. Have any users succeeded in getting all the playlists to show up with no duplicates and all of the songs they wanted? If so, how?

View 38 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved