android

Launch Google Maps from app

Hi, I have setup my app to launch Google maps to a set location using the code below, but the map displays zoomed full and you cant see any roads you have to zoom out manually to see anything. How can I set the zoom level with the code below I've tried setZoom(16); but this has no effect. if (mapnav == 10) { String uri = "g...

ImageGallery and ImageGrid in android

Hi, I have created an image gallery in android , now whenever i will click on image on a gallery then that particular image will get added into Grid View. my layout has image gallery on top and image grid in bottom (so i have used LinerLayout Vertical ) so can anyone tell me how to achieve this in android ? ...

Android scrolling label, how to?

How to add a scrolling label, if the label size is bigger, then xxx DIP? I want to create a scrolling label, than in the market. How to? ...

How to align a dynamically create UserInterface using RelativeLayout in Android

Hi, I want to create a relative Layout dynamically through code with 2 Textviews one below the other.How to implement android:layout_below property through code in Android. can anyone help me in sorting out this issue. Thanks in Advance, ...

Losing screen object auto-focus

I have a GridView displaying buttons to different screens of my app. When this grid screen, the first cell is selected. Is there a way to programmatically have no cells selected when the screen launches? Or do I have to hide the selector? ...

Error in receiving SMS using Broadcast receiver

Hello, I'm trying to receive SMS using broadcast receiver. MySMSReceiver : import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.telephony.SmsMessage; import android.util.Log; public class MySmsReceiver extends BroadcastReceiver { /** Tag s...

Problems with HelloMapView tutorial

Hi, map seems to load fine, i can see maps, and also i can see the mark of mexico that the expample gives you but... when i click on the MEXICO mark, my application crash, with the common message of android application crash i think that i know the problem, but i dont know how to solve it: in step 7, tuto says this: Now set up the ab...

java.lang.OutOfMemoryError: bitmap size exceeds VM budget while overlaying on Google map on Android !

Hi Everyone, What I want to do: I want to setup some routes overlay on google map in android ! What I have done so far: I have parsed the file (geo points) and have them ! I am using asynctask. My overlay class has a custom draw method. I have used destroyDrawingCache () in my draw function. Problems I faced: While running the app, it...

Android: Error when using ListActivity inside Tab Layout

My apologies in advance if this is a repeat question, I looked all over and couldn't find any solution to help me. I have followed the android dev tutorial for creating a tabbed UI that uses a separate activity for each tab. And I got it working just fine. Until... I am attempting to put a ListView inside one of the tabbed activitie...

UMTS cell id of neighbor cells

The problem is that when I use source code below, i receive cell id's only in 2G mode, if i switch to 3G mode i sometimes receive -1 for HSDPA or nothing for UMTS. Source code is: for (int i = 0; i < neighCell.size(); i++) { try { NeighboringCellInfo thisCell = neighCell.get(i); int thisNeighCID = thisCell.getCid(); ...

How to select row on list displayed records from sql lite table?

When user open activity with list displayed data from sql table i put in extras record id then i want in android code select this record and mark this with orange highlighting bar. How do this ? ...

How can I get a ListView and TextView to scroll as one unit when content is taller than the screen height?

Hi, I have a main menu screen with a simple ListView that contains "links" to further screens in my app (Browse, Bookmarks, Settings, About, etc.). Underneath the ListView there is a TextView (more accurately, a TextSwitcher that rotates TextViews) that changes every 10 seconds to display a new "tip". In portrait mode, this works fine...

Disable MapView if it is not supported

Hi, I've an application with multiple activities. One activity is a MapActivity. Can I disable MapActivity when it is not supported by the device and let the user install the application and get remaining activities or should I develop two versions of the application (one with MapActivity and another without it)? ...

Java(Android) convert SQLite date to "x days ago"

I have: String date = "2010-10-9 12:00:00"; I want to parse that string, then subtract that date/time from the current date/time so that I can output a string similar to "2 days ago". ...

How to create stub in android

Hi Can anyone describe how to create stub using Eclipse? Step by step would be great. (in Android) Thanks. ...

Android Browser output download time

I'm looking for a way to output the total download time every time a new page is opened in the Android browser. I've looked around, but can't find a place to put a timestamp for downloading a web page. There's a performance monitor in onPageStarted and onPageFinished measuring the page loading time, but nothing (that I can see) that me...

plain text display with vert. scrolling?

Is there an example that would allow a few hundred or thousand words, with paragraphs and CRs, to be displayed in a basic Hello World-style text display, complete with a vert. scroll bar (or vertical grab and move up or down)? Thanks. ...

Color street on Android MapView?

Is there any possibility to highlight a street using the Google Maps API? I want to set a color on a street, similar as it is done in the navigation function of Google Maps. If there is no generic implementation for this - and I guess there probably isn't - is there any good/simple solution for this? The only thing I could think of was ...

Thread in Java/Android

Greetings. How can I send two parameters into a thread and run methods when the user pushes buttons on the display. Having my variables in the UI thread didn't work and were erased when the UI thread randomly restarts. UI Thread ______________ Other Thread User presses button -------> Run Method Cheers. ...

how to set different color of border of rectangle using stroke

Hi How about, if just to get top border or left border using stroke. Is it possible to set different width for different borders ...