This repository has been archived by the owner on Jun 23, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
3.12 Add map intent from new menu item
- Loading branch information
Lyla
committed
Mar 4, 2015
1 parent
cdd3f2c
commit 745a01e
Showing
4 changed files
with
47 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
<menu xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
tools:context="com.example.android.sunshine.app.DetailActivity"> | ||
<item android:id="@+id/action_settings" android:title="@string/action_settings" | ||
android:orderInCategory="100" app:showAsAction="never" /> | ||
tools:context="com.example.android.sunshine.app.DetailActivity" > | ||
<item android:id="@+id/action_settings" | ||
android:title="@string/action_settings" | ||
android:orderInCategory="100" | ||
app:showAsAction="never" /> | ||
</menu> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
<menu xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
xmlns:tools="http://schemas.android.com/tools" tools:context=".MainActivity"> | ||
<item android:id="@+id/action_settings" android:title="@string/action_settings" | ||
android:orderInCategory="100" app:showAsAction="never" /> | ||
<item android:id="@+id/action_settings" | ||
android:title="@string/action_settings" | ||
android:orderInCategory="100" | ||
app:showAsAction="never" /> | ||
<item android:id="@+id/action_map" | ||
android:title="@string/action_map" | ||
app:showAsAction="never" /> | ||
</menu> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
745a01e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, I have two questions:
745a01e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dswallow - i'll do my best to answer as far as I understand:
745a01e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got a question that why the format for map query can not match that on google official documents for Map Intents?**(geo:0,0?someString)**I just copied the code of openPreferredLocationInMap(),and my map app told me the parameter can not be parsed.
Here is the link below
https://developer.android.com/guide/components/intents-common.html
745a01e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Google Maps in emulator is crashed because not founded my location with the location save in preferences.
Please, how to resolve this call to Google Maps?
745a01e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when loading settings (sharedPref.getString) you provide a skey The name of the preference to retrieve. and a defValues Values to return if this preference does not exist. (line 73-75).
You should still be able to open the settings and change the value.