Combining Map view and List view

by TreKing » Thu, 05 Aug 2010 07:53:53 GMT


Sponsored Links
 On Wed, Aug 4, 2010 at 5:10 AM, Anders Bromhagen <anders.bromha...@gmail.com





I don't know about "best", but you have to have a MapActivity for a MapView.




I think you can have multiple activities within a TabActivity for the
contents, but I don't know about how much control over the tabs you have.
Based on posts I've seen, I don't think it's much.




If you want to smoothly transition between the two and they both represent
the same data, probably in the same activity.




What I would do is try to add a ViewSwitcher (or ViewFlipper?, not sure) to
the MapActivity with the MapView and ListView and use that to switch between
the two.




No, that's a View, you can't load activities into a View.

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

--



Other Threads

1. Gallery as a horizontal list

The gallery widget is almost the right thing for a horizontal list. It
works with the same adapter pattern as ListView.  But Gallery is
pretty insistent about keeping the selected item in the center of the
visible area.  Has anybody tried to modify it so it displays the first
item on the left instead of centered?  Or is there another or better
way to get a horizontal scrolling list?

-- 

2. Cannot Debug Andriod Service

Folks,

    I have a very simple service with a service started that receives
the BOOT_COMPLETED intent. When I try to launch the de{*filter*}, it never
breaks on any line, even though I have waitForDe{*filter*}() set. Any
ideas on how I could debug this service. I am debugging this on an
emulator, not on the device.

The manifest file is
--------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android=" http://www.***.com/ ;
      package="com.preciseinc.DroidLocator"
      android:versionCode="1"
      android:versionName="1.0">
        <uses-permission
android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
        <uses-permission android:name="android.permission.INTERNET" />
        <uses-permission
android:name="android.permission.ACCESS_FINE_LOCATION" />
        <uses-permission
android:name="android.permission.ACCESS_NETWORK_STATE" />
        <uses-sdk android:minSdkVersion="8" />

    <application android:icon="@drawable/icon" android:label="@string/
app_name" android:debuggable="true">
        <service android:name=".DroidService">
                <intent-filter>
                        <action 
android:name="com.preciseinc.DroidLocator.DroidService" />
                </intent-filter>
        </service>
        <receiver android:name=".ServiceAutoStarter">
                <intent-filter>
                <action
android:name="android.intent.action.BOOT_COMPLETED"/>
                </intent-filter>
        </receiver>
        </application>
</manifest>
--------------------------------------------------------

The simple code is
---------------------------------------------------------
package com.preciseinc.DroidLocator;

import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

public class ServiceAutoStarter extends BroadcastReceiver {

        @Override
        public void onReceive(Context context, Intent intent) {
                android.os.Debug.waitForDe{*filter*}();
                Intent serviceIntent = new Intent();
                serviceIntent.setComponent(new
ComponentName("com.preciseinc.DroidLocator",
                                "com.preciseinc.DroidLocator.DroidService"));
                context.startService(serviceIntent);
        }

}
----------------------------------------------------------------------

This starts up the service code, which is as follows:

package com.preciseinc.DroidLocator;

import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.location.LocationManager;
import android.os.IBinder;

public class DroidService extends Service {

        @Override
        public IBinder onBind(Intent arg0) {
                // TODO Auto-generated method stub
                return null;
        }

        @Override
        public void onCreate() {
                android.os.Debug.waitForDe{*filter*}();
                super.onCreate();
                LocationManager lm =
(LocationManager)getSystemService(Context.LOCATION_SERVICE);
                lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 1000L,
500.0f, new DroidLocationListener());
        }

         @Override
         public void onStart(final Intent intent, final int startId) {
                 android.os.Debug.waitForDe{*filter*}();
          super.onStart(intent, startId);
          LocationManager lm =
(LocationManager)getSystemService(Context.LOCATION_SERVICE);
          lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 1000L,
500.0f, new DroidLocationListener());
         }


        @Override
        public void onDestroy() {
                super.onDestroy();
        }
}
-------------------------------------------------------------------

Any and all help appreciated.

Regards,

Raj.

-- 

3. Unable to load default SVN Client

4. Animation stops timer (newbie alert!)

5. Android Tablet yang sudah tersedia di jakarta apa saja?

6. about ProGuard

7. Garmin Asus A50