showing map and a saving location

by Atif Musaddaq » Fri, 28 Jan 2011 22:53:31 GMT


Sponsored Links
 Hi,

I would like to show map of the current location along with a small form <a
text field with a submit button>. what exactly i want to do is:

to let user save his desired location, but with addition of that i would
like to show him on the map where he/she is.

Is it possible to do in a single activity ? any sample code, tutorial etc

-- 
Atif Musaddaq

-- 



Re: showing map and a saving location

by TreKing » Sat, 29 Jan 2011 04:01:57 GMT


 




Yes. Look up MapActivity.

-------------------------------------------------------------------------------------------------
TreKing < http://sites.google.com/site/rezmobileapps/treking> ; - Chicago
transit tracking app for Android-powered devices

-- 


Sponsored Links


Other Threads

1. How to read Gmail programmatically?

Hi,

I'm trying to query the e-mails from my Gmail account in source code.
I've tried various combinations for the URI but the cursor returned is
always null. Has anyone managed to retrieve emails programmatically
from Gmail?

Some combinations I tried for the URI are below (as I mentioned above,
the cursor which is returned is always null):

Cursor cur = this.getContentResolver().query(Uri.parse("content://
gmail-ls/conversations/<my_email>@gmail.com"), null, null, null,
null);
Cursor cur = this.getContentResolver().query(Uri.parse("content://
gmail-ls/inbox/<my_email>@gmail.com"), null, null, null, null);
Cursor cur = this.getContentResolver().query(Uri.parse("content://
gmail-ls/<my_email>@gmail.com"), null, null, null, null);
Cursor cur = this.getContentResolver().query(Uri.parse("content://
gmail-ls"), null, null, null, null);

I'd appreciate any experience you could share.

-Ali

-- 

2. ListView scrolls very very slow

Hi all,

I'm kind of to android development. I'm creating an app containing
several activities, and one of them is an ListActivity. Each row
contains a ImageView (thumbnail) and two TextViews.

When the ListActivity is loaded everything looks fine, but when I
start to scroll it scrolls very slow. I've read some posts and threads
about this, and from what I understand the problem could be that the
UI thread is getting locked up when the getView() method is called in
my adapter class (extends ArrayAdapter).

The getView() is doing some, in this case, heavy processes. It looks
like this

@Override
public View getView(int position, View convertView, ViewGroup parent)
{
        View v = convertView;
        if (v == null) {
        LayoutInflater vi =
(LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
                v = vi.inflate(R.layout.row_item, null);
        }
        Item i = items.get(position);
        if (i != null) {
                name = (TextView) v.findViewById(R.id.item_name);
                timeLeft = (TextView) v.findViewById(R.id.item_time_left);
                thumb = (ImageView) v.findViewById(R.id.item_thumb);

                name.setText(i.getShortDescription());
                timeLeft.setText(Utils.getTimeLeft(i.getEndDate()));
                try {
                        
thumb.setImageBitmap(Utils.getBitmap(i.getThumbNailLink()));
                } catch(Exception e){};
        }
        return v;
}

I've tried to speed up the getView() by using an DrawableManager class
that I found in this thread
http://stackoverflow.com/questions/541966/android-how-do-i-do-a-lazy-load-of-images-in-listview...
This gets the image (from url) in a seperate thread and handle some
simple cache for the images (HashMap). If I only add the image to the
row in the ListView it's pretty fast, especially due to the caching
done i DrawableManager. But when I fill the two TextViews with text it
still gets very slow. So that didn't help me out. (I also tried to
cache and handle the TextField values in the DrawableManager, but that
didn't help either.)

Do you guys have a good solution for me?

Thanks in advance

-- 

3. Obtaining the selected index of a spinner

4. In-App Purchasing and the Market Agreement

5. How to handle imaged background and buttons on different size/proportion displays

6. How to handle imaged background and buttons on different size/proportion displays

7. Modifying audio in real time