Git Product home page Git Product logo

android-support-v4-googlemaps's Introduction

android-support-v4-googlemaps's People

Contributors

adamp avatar dsandler avatar jsharkey avatar onoratoj avatar petedoyle avatar sganov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-support-v4-googlemaps's Issues

Please undeprecate your library

Google Maps API v2 is not ready for production. I attempted to integrate it into my application and found that really weird things happen when you switch back and forth between fragments with it, such as black screens and so on.

Implement FragmentActivity without MapActivity

In regards to:

"Currently, one downside is that ALL classes extending FragmentActivity are MapActivitys. Its possible to make a separate class (i.e. FragmentMapActivity), but it requires some refactoring of the FragmentActivity code.

Feel free to file a bug to request it or fork this project to fix it."

I would love to see an implementation of this project that supports FragmentActivity(s) both with and without extending MapView. Unfortunately Google's limitation of allowing only one MapActivity per process makes things quite awkward. Effectively I can only have one FragmentActivity per process.

I can't include both the Compatibility package from Google and this one because they share the same namespaces.

Upgrade to revision 11

There is a new revision of the Support Package, revision 11.
Everyone is excited to use nested Fragments. :)

Thanks a whole bunch, this jar really saves everyone from a huge headache.

creating jar with source attached

Hi,
Can you please create the jars with source attached for downloading? It helps a lot when trying to debug errors in the application.
The new ADT for Eclipse does not let me attach sources to the jar since it's part of the "Android dependency" now.

Thank you very much!
Shay

Getting java.lang.IllegalStateException: You are only allowed to have a single MapView in a MapActivity Exception when using MapView for fragments

Hi,
Thank you for providing a hack lib for MapView.
My implementation of mapView is successful except that I get an error when I call
getActivity().onBackPressed();
from another fragment(other then map fragment)
Here is a detailed information about the exception I am getting.

App for: Mobile
Version: Android 2.2
Supporting file used: android-support-v13-r6-googlemaps.jar

Senario:

  1. I have created a Activity which extends FramentActivity(supported from the lib provided)
  2. I have created 2 fragments.
    a. MapFragment - which has its own layout and this layout contains mapview
    b. InformationFragment - which has its own layout and DONOT have mapview. it contains table layout and other stuff
  3. I have button in layout for InformationFragment which will call getActivity().onBackPressed();

When I press this button or press back button on the device following is the exception I am getting

01-10 09:54:38.141: E/AndroidRuntime(9726): FATAL EXCEPTION: main
01-10 09:54:38.141: E/AndroidRuntime(9726): android.view.InflateException: Binary XML file line #5: Error inflating class
01-10 09:54:38.141: E/AndroidRuntime(9726): at android.view.LayoutInflater.createView(LayoutInflater.java:513)
01-10 09:54:38.141: E/AndroidRuntime(9726): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:565)
01-10 09:54:38.141: E/AndroidRuntime(9726): at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
01-10 09:54:38.141: E/AndroidRuntime(9726): at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
01-10 09:54:38.141: E/AndroidRuntime(9726): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
01-10 09:54:38.141: E/AndroidRuntime(9726): at com.mid.kew.activities.MapFragment.onCreateView(MapFragment.java:78)
01-10 09:54:38.141: E/AndroidRuntime(9726): at android.support.v4.app.FragmentManagerImpl.moveToState(Unknown Source)
01-10 09:54:38.141: E/AndroidRuntime(9726): at android.support.v4.app.FragmentManagerImpl.moveToState(Unknown Source)
01-10 09:54:38.141: E/AndroidRuntime(9726): at android.support.v4.app.BackStackRecord.popFromBackStack(Unknown Source)
01-10 09:54:38.141: E/AndroidRuntime(9726): at android.support.v4.app.FragmentManagerImpl.popBackStackState(Unknown Source)
01-10 09:54:38.141: E/AndroidRuntime(9726): at android.support.v4.app.FragmentManagerImpl.popBackStackImmediate(Unknown Source)
01-10 09:54:38.141: E/AndroidRuntime(9726): at android.support.v4.app.FragmentActivity.onBackPressed(Unknown Source)
01-10 09:54:38.141: E/AndroidRuntime(9726): at com.mid.kew.activities.CustomiseMapMainFragment$1.onClick(CustomiseMapMainFragment.java:66)
01-10 09:54:38.141: E/AndroidRuntime(9726): at android.view.View.performClick(View.java:2461)
01-10 09:54:38.141: E/AndroidRuntime(9726): at android.view.View$PerformClick.run(View.java:8888)
01-10 09:54:38.141: E/AndroidRuntime(9726): at android.os.Handler.handleCallback(Handler.java:587)
01-10 09:54:38.141: E/AndroidRuntime(9726): at android.os.Handler.dispatchMessage(Handler.java:92)
01-10 09:54:38.141: E/AndroidRuntime(9726): at android.os.Looper.loop(Looper.java:123)
01-10 09:54:38.141: E/AndroidRuntime(9726): at android.app.ActivityThread.main(ActivityThread.java:4627)
01-10 09:54:38.141: E/AndroidRuntime(9726): at java.lang.reflect.Method.invokeNative(Native Method)
01-10 09:54:38.141: E/AndroidRuntime(9726): at java.lang.reflect.Method.invoke(Method.java:521)
01-10 09:54:38.141: E/AndroidRuntime(9726): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
01-10 09:54:38.141: E/AndroidRuntime(9726): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
01-10 09:54:38.141: E/AndroidRuntime(9726): at dalvik.system.NativeStart.main(Native Method)
01-10 09:54:38.141: E/AndroidRuntime(9726): Caused by: java.lang.reflect.InvocationTargetException
01-10 09:54:38.141: E/AndroidRuntime(9726): at com.google.android.maps.MapView.(MapView.java:238)
01-10 09:54:38.141: E/AndroidRuntime(9726): at java.lang.reflect.Constructor.constructNative(Native Method)
01-10 09:54:38.141: E/AndroidRuntime(9726): at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
01-10 09:54:38.141: E/AndroidRuntime(9726): at android.view.LayoutInflater.createView(LayoutInflater.java:500)
01-10 09:54:38.141: E/AndroidRuntime(9726): ... 23 more
01-10 09:54:38.141: E/AndroidRuntime(9726): Caused by: java.lang.IllegalStateException: You are only allowed to have a single MapView in a MapActivity
01-10 09:54:38.141: E/AndroidRuntime(9726): at com.google.android.maps.MapActivity.setupMapView(MapActivity.java:379)
01-10 09:54:38.141: E/AndroidRuntime(9726): at com.google.android.maps.MapView.(MapView.java:280)
01-10 09:54:38.141: E/AndroidRuntime(9726): at com.google.android.maps.MapView.(MapView.java:255)
01-10 09:54:38.141: E/AndroidRuntime(9726): ... 27 more

Following are the code snapshot on how the things are build

MapFragment -> onCreateView()
....
view = inflater.inflate(R.layout.map_page_layout, container, false);
mapView = (MapView) view.findViewById(R.id.mapview);
....

MapFragment Layout File -> map_page_layout
.....
<com.google.android.maps.MapView
android:id="@+id/mapview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:apiKey=
android:layout_alignParentTop="true"
android:clickable="true"/>
.....

InformationFragment -> BackButton ->

Button backButton = (Button) v.findViewById(R.id.backButton);
backButton.setOnClickListener(new OnClickListener() {

        public void onClick(View v) {
            getActivity().onBackPressed();

        }});

Can you please let me know if I am missing something or is it a bug...
Its urgent as I have to meet the deadlines

Thank you
Nikhil

Create separate FragmentMapActivity class

Since all classes extend FragmentActivity it is tricky to incorporate this modified support library such that it will work on devices without google maps. Introducing a separate FragmentMapActivity class would make this easier.

For example, consider an app using a tab layout with each tab being a fragment and one of those tabs holding a map. Using the current library the app would FC immediately on devices without Google APIs (since every fragment has a reference to google maps). If a FragmentMapActivity class were created and used this could be applied to only the tab holding the map, then reflection could be used at runtime and this map could be removed for devices without access to google APIs.

Great project!

Android SDK Version 17

  • [android-sdk-path]/tools/android sdk
    Download "Android 4.2 (API 17) SDK Platform"
  • git clone git://github.com/petedoyle/android-support-v4-googlemaps.git
  • cd android-support-v4-googlemaps
  • rm -r ./support/
  • cp -R [android-sdk-path]/extras/android/support/ ./
  • cp [android-sdk-path]/platforms/android-17/android.jar lib/android-17.jar
  • rm ./lib/android-16.jar
  • Apply: c8e2716
  • Replace
    protected void onNewIntent(Intent intent) {
    with
    public void onNewIntent(Intent intent) {
    in
    ./support/v4/src/java/android/support/v4/app/FragmentActivity.java
  • Replace twice
    <include name="jellybean/**/*.java"/>
    with
    <include name="jellybean/**/*.java"/> <include name="jellybean-mr1/**/*.java"/>
    in
    ./build.xml
  • ant

Make sure ant compiles with java 1.6. Check javac -version

Worked for me. Cheers

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.