Android :: Actualice The Positions Of The Items In A Googlemap?
Nov 18, 2010
Hi, i have a googlemap app that displays two items (itemizedoverlay class) and i have a Update button. When i press the update button, i want to remove the items from the map, and put again the same items but with the new latitude and longitude values (i have a service that actualice the latitude and longitude fields that i have in sharedPreferences, and also i recibe the other position by a bundle)
what i am doing wrong? when i try my code, the items of the map doesn't be removed.... just new items appear... but i want to remove the old ones
CODE:...........
And these are my two functions:
CODE:............
I also tryed with invalidate() on the mapview but it doesn't works... still paint the old items...
View 1 Replies
Nov 18, 2010
I actualice the positions of the items of mi googlemap but they only get repainted when i move or zoom the map...
I want that every time the possitions got updated then they get repainted on the map without having to move or zoom it with my finger
Invalidate is not the answer, because it makes a full repaint of all and needs to redownload the map from internet...
My code:..........................
View 1 Replies
View Related
May 17, 2010
I made an android application with googlemap api, and draw some 16x16 png (about 200 count) on overlay. When I move or zoom on/in mapview, "out of memory" error occurs very often.
I also used the googlemap appication in my htc itself. Seams that it uses about 14+MB memmory, and never happens "out of memory".
How to save memmory usage in a googlemap api, or how to enlarge android api memmory limit.
View 1 Replies
View Related
Sep 22, 2010
I have a very simple app showing current Position using GPS-Provider in emulator. (Location is being picked up from emulator Control). If I send any updated location, the new location also getting picked (showing toast) and able to animate to new point. I'm working behind a firewall (proxy enabled). - App is showing the MapView but background is Grey with line-Grids (not real google maps visible) - Proxy is working fine. What can be the reason for actual maps not getting visible? Do we need to get access 'enabled' for any kind of URL (which might getting blocked by firewall)?
View 6 Replies
View Related
Feb 5, 2010
I am able to display multiple overlayItems on Googlemap, now I want to change icon of any specific overlayItem (to show it is currently selected event). I want to do it through navigation buttons (next, previous) as on Google maps.
I am using StateListDrawable to display icons for OverlayItems. code...
Now my question is how do I change the state of any overlayItem/Icon on map when user click on one of navigation keys?
View 1 Replies
View Related
Nov 17, 2010
I need that my user interface haves 3 sections
NORTH SECTION: four textviews with info about a user MIDDLE SECTION: a googlemap view with the position of the user SOUTH SECTION: a textview with time of last position, and a button to actualice the position (retrieving it from a database)
is this possible? i can't find any information about that on google or android developers guide...
View 8 Replies
View Related
Jan 27, 2013
I am working on an app that uses a GoogleMap and lots of overlays/markers. Controls and navigation is handled automatically (no direct user interaction with the map needed so far).
Things work the way I want right until the app pauses and goes into the background. When I resume the app the map has zoomed out to 0:0 and it doesn't react to animateMap or anything anymore. I can't seem to figure how I get it back to the state where it doesn't react to user interaction and actually updates with my markers and stuff..
Below are the three methods handling the map, and it doesn't seem to react on any of it after a resume.
Code:
private void setupMap(){
getSupportFragmentManager().beginTransaction().replace(R.id.trackeractivity_map, new SupportMapFragment()).commit();[code]......
View 1 Replies
View Related
Jan 27, 2013
I am working on an app that uses a GoogleMap and lots of overlays/markers. Controls and navigation is handled automatically (no direct user interaction with the map needed so far).
Things work the way I want right until the app pauses and goes into the background. When I resume the app the map has zoomed out to 0:0 and it doesn't react to animateMap or anything anymore. I can't seem to figure how I get it back to the state where it doesn't react to user interaction and actually updates with my markers and stuff..
Below are the three methods handling the map, and it doesn't seem to react on any of it after a resume.
Code:
private void setupMap(){
getSupportFragmentManager().beginTransaction().replace(R.id.trackeractivity_map, new SupportMapFragment()).commit();
FragmentManager fragmentManager = getSupportFragmentManager();
SupportMapFragment supportMapFragment = (SupportMapFragment) fragmentManager.findFragmentById(R.id.trackeractivity_map);
[Code] .....
View 2 Replies
View Related
Jul 21, 2010
Had no problem getting my phone to play nice with our exchange server at work and emails are coming/going fine.
However, there are some configuration items I have a big issue with as it relates to the 'look' of the email (coming from a BlackBerry).
1. Is there any way to have a single folder show my received items and sent items combined? My BB had this and it was very useful.
2. How can I edit the way my folders are displayed at the top horizontal bar? The sidescrolling folder display is awkward, it puts my inbox first (good) but then all subsequent folders are listed alphabetically; it pays no attention to their order on my desktop and also shows sub-folders of other files. Any way to change this?
3. Is there a way to change the way emails show as unread? The difference b/n read and unread is only a shade of grey, and difficult to see outside.
View 1 Replies
View Related
Oct 19, 2010
My question today relates to the android home screen and where it stores icon / widget positions. Specifically, I am interested in accessing the positions and sizes of any icons that are currently being displayed. I have, so far, been unable to find a method of retrieving the positions of other applications but i figure it must be possible in some way due to the presence of third-party home screen applications. Ideally, I am hoping to query the positions of whatever is on the screen at the moment from a live wallpaper and adjust my rendering accordingly.
View 1 Replies
View Related
Sep 30, 2009
I need to implement a screen containing a list of blocks one below the other. Each block will contain mutiple superimpose elements (Images, text) for which the relative position needs to be specified with respect to the top left corner of the block.
For creating the list of blocks i have used listview. For each block i tried to use relative layout.This works ok when the phone is in landscape mode and absolute position is specified relative to left edge of the phone. But when the phone is put in the portrait mode the layout gets distorted.
1) What layout can be used for this scenario?
2) Can relative positions be specified in terms of percentage of screen width/height instead of pixels?
View 3 Replies
View Related
Aug 27, 2009
How can I retrieve the positions of the selected item in a multichoice listView ? The getSelectedItemPosition method returns only the first one...
View 1 Replies
View Related
Mar 30, 2010
Seeking help to design a layout as shown here:
http://docs.google.com/Doc?docid=0AQhgDtGvE2HgZGZ6cmtua185MTd0eGdyZmc&hl=en
The major challenge I face is aligning the components at desired positions. Please refer the three buttons(icons) and the way they are positioned.
Literally, going nuts, thinking how to position those exactly at the desired places.
View 2 Replies
View Related
Jul 21, 2010
Suppose I have the following layout
CODE:......................
How could I swap position of button01 with button02? And would it work also for swapping button01 with button05?
Before asking what I have tried so far, I don't even know where to start. I googled but the only answer I could find was about AbsoluteLayout.
View 1 Replies
View Related
Jun 7, 2010
I'm currently working on a very simple aplication, and I intended to make it change the visual aspect depending on the screen size. The application just has 6 buttons like this:
I'm using the AbsoluteLayout, and changing the x and y of the buttons with the methods offsetLeftAndRight and offsetTopAndBottom. I'm not changing the layout of the buttons in the xml file, so the all start in the same place.
However, if I use this methods inside the onClickMethod they sometimes appear where I want them, sometimes don't (can't figure out why), but if i use them in the onCreate method, nothing happens.
View 2 Replies
View Related
Oct 16, 2010
I am trying to create a gradient drawable to depict a ratio of something. As a general example, lets say you were looking at a listview containing a fleet of cars. The background could be a fuel gauge - I don't want a smooth, wide transition. I want a very tight transition, and I want to be able to set where that transition takes place.
Here's what I'm staring with, but I'm not getting very far.
CODE:......................
View 1 Replies
View Related
Jul 15, 2009
What are the differences in ant script we should take care to compile the application which uses maps api. Tried with bootlcasspath with both android and maps.jar file. but it fails to create dex file.
View 2 Replies
View Related
Jan 10, 2010
I thought it may have been my eyes, when I thought I saw an upside-down Android icon for a contact the other day, on my Android 1.5 device - Samsung Moment. I was playing with contacts just now, and I saw the upside down icon again. Then I was curious, went to see other contacts, and I noticed the Android icon facing right, then facing left in other instances. There is no rhyme or reason as to when the Android icon will change positions, but it is there.
View 1 Replies
View Related
Jun 15, 2010
I am trying to draw a cupola circles at random positions in an Android application. I draw them on a bitmap and then draw that bitmap on the canvas. This is the function where a draw the circles:
private void drawRandomCircles(int numOfCircles) {
Canvas c = new Canvas(b);
Paint cPaint = new Paint;
cPaitn.setColor(Color.RED);
for(int i = 0; i < numOfCircles; i++) {
int x = Math.Random % 100;
int y = Math.Random % 100;
c.drawCircle(x, y, 20, cPaint)
}
}
The Bitmap b is global. And after calling this function I just draw the bitmap in the onDraw method. Now the problem is that I only get one circle drawn on the screen, no matter the size of numOfCircles.
View 1 Replies
View Related
Nov 24, 2010
I have two ListViews. Is there any way to synchronize the position of ListViews when I scroll any one of the Lists
View 1 Replies
View Related
Sep 2, 2010
I have rectangles and images and i want to show that images on that positions that rectangle holds in it...it is all dynamic. and i am using bitmap class to display but now i have to set positions according to that rectangle...
View 1 Replies
View Related
Jun 1, 2009
Is there a way to manipulate the positions of *background* images in an ImageButton?
View 2 Replies
View Related
Jul 20, 2010
I have a mapview where I want to track the user's current location. GPS as well as 'use wireless networks' is activated in my phone settings.
Nevertheless, since I'm indoor I don't get a GPS fix, therefore the location is determined via network; wifi spot is available.
I have the Google Maps app running as well as my application running.
Strangely, the current location differes between Google Maps and my application, where the Google Maps is very accurate while in my app the location is somehow off a few 100 meters.
In my application I basically do the following (for debugging purposes now):
1) initially place one marker on the map: geopoint retrieved via locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
2) initially place another marker on the map: geopoint retrieved via locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);
This will put the last known locations of both providers onto the map (eventually last known from outside my app).
3) then for the regular updates (since I don't get a GPS fix anyway indoor here), I do:
locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, baseLocationListener);
You can see for the frequency and distance I pass the 0 param in both cases.
In the app manifest, the following permissions are granted:
android.permission.ACCESS_COARSE_LOCATION
android.permission.ACCESS_FINE_LOCATION
android.permission.ACCESS_MOCK_LOCATION
Actually my baseLocationListener does get called, which I see in the log, but the updated location is somehow the same as the last known current position (of LocationManager.NETWORK_PROVIDER), same lat/lng.
I thought maybe I overlooked something or missed a parameter or setting, or my code has a bug. Therefore I installed some other (3 in total) LBS apps from the Android market that also show the current user's location. The current locations displayed in those apps are equals to the one in my application - and they're all some 100 meters off - but at least all the same.
See the screenshot here:
http://img33.imageshack.us/img33/8679/mapproblem.png
Now I am wondering:
1) as I understand, getLastKnowLocation is system-wide and not app-wide, why are there differences between the location in Google maps and all the other apps?
2) does Google Maps not update the lastKnownLocation of a provider?
3) does Google Maps use a different custom location provider (i.e. due to licensing reasons) other than GPS_PROVIDER or NETWORK_PROVIDER as they are in the SDK?
4) how do achieve the same accurate result with the NETWORK_PROVIDER like Google Maps does?
View 2 Replies
View Related
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
Jul 20, 2010
It seems that the problem is in the data quality of the different map provider that are used for Google Maps and MapView in SDK, which differ.
The map tiles coordinates don't seem to be very accurate, just like in the public google maps web api / tiles.
See this screenshot for an example, where I pinned the same geo point. http://img339.imageshack.us/i/gmaps2.png/
The map using the public map api is off a few hundred meters. Seems that we just have to live with it.
CODE:................
View 2 Replies
View Related
Dec 30, 2009
I've been trying to figure out how to make some sense of a dumped XML layout, and it's progressing 'pretty good'. The only thing I'm currently unsure about is the following:
When I use the command:
aapt dump xmltree <pathofapk> <pathofxmlfile>
I get the following result:
CODE:.............
That's all good, but what I'm trying to figure out is how to convert the following code into the XML layout file:
CODE:.................
Converting those values to decimal would result in:
CODE:.................
All good, but I've been trying to figure out what the (type 0x5 means). With all other types, the result is defined in the Android.util.TypedValue.class file
Decompiling that, gives the following result for 0x5:
CODE:...............
Makes sense, in a way. But, I need to know what kind of value it is, so looking down, I find the following value:
CODE:.............
But, when I try to use 2561mm and 1025mm (It's a tad much anyway, 25cm is.. larger than my screen), The whole screen is filled with the 'parent LinearLayout'.
View 3 Replies
View Related
Oct 16, 2010
I have 2 ScrollViews in my android layout. How can I synchronise their scroll positions?
View 1 Replies
View Related
May 31, 2009
Is there a way i can say 3 items in the top row and 1 icon in the second row?
View 4 Replies
View Related
May 28, 2010
I'm just getting my feet wet with Android and have built a UI that contains a TabHost with three tabs. Each tab is powered by its own Activity. The first Tab contains a listview with a prepopulated set of rows and is built from a custom ArrayAdapter.
The problem I'm running into is that none of the ListView rows are tappable. In other words, when I tap on them there is no orange selection. If I use the scroll ball on my Nexus One it will select, but any touch gestures don't seem to be responding. All the UI is being handled using XML files with a main.xml housing the TabHost -> LinearLayout -> TabWidget/FrameLayout and a nearby_activity.xml file containing my ListView UI
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"............
View 1 Replies
View Related
Aug 27, 2009
I cannot get the data from SqLite using order by because the data is encrypted, so the sort wouldn't work there. Is it possible to sort the items in the ListView?
View 5 Replies
View Related