Skip to content

Commit

Permalink
show menu item as icons in application action bar (only if there is r…
Browse files Browse the repository at this point in the history
…oom)
  • Loading branch information
samuelregev committed Feb 1, 2015
1 parent eb4cd47 commit e342a40
Show file tree
Hide file tree
Showing 14 changed files with 45 additions and 28 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-hdpi/ic_action_refresh.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-mdpi/ic_action_refresh.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 27 additions & 10 deletions app/src/main/res/menu/menu_main.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,27 @@
<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_fetch_markers" android:title="@string/fetch_markers"
android:orderInCategory="1" app:showAsAction="ifRoom"/>
<item android:id="@+id/action_back_to_start_location" android:title="@string/back_to_start_location"
android:orderInCategory="2" app:showAsAction="ifRoom"/>
<item android:id="@+id/action_settings" android:title="@string/action_settings"
android:orderInCategory="100" app:showAsAction="never" />
</menu>
<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_fetch_markers"
android:title="@string/fetch_markers"
android:orderInCategory="1"
android:icon="@drawable/ic_action_refresh"
app:showAsAction="ifRoom"
/>

<item
android:id="@+id/action_back_to_start_location"
android:title="@string/back_to_start_location"
android:orderInCategory="2"
android:icon="@drawable/ic_action_location_found"
app:showAsAction="ifRoom"
/>

<item
android:id="@+id/action_settings"
android:title="@string/action_settings"
android:orderInCategory="100"
android:icon="@drawable/ic_action_settings"
app:showAsAction="ifRoom"
/>
</menu>
36 changes: 18 additions & 18 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<string name="app_name" translatable="false">ANYWAY</string>
<string name="zoom_in_to_display">רחוק מדי, מתקרב....</string>

<!-- Settings -->
<string name="action_settings">הגדרות</string>

<!-- Main map activity -->
<string name="back_to_start_location">מרכז</string>
<string name="fetch_markers">תאונות</string>

<!-- popup layout -->
<string name="icon">Accident logo</string>
<string name="hello_blank_fragment">Hello blank fragment</string>

</resources>
<?xml version="1.0" encoding="utf-8"?>
<resources>

<string name="app_name" translatable="false">ANYWAY</string>
<string name="zoom_in_to_display">רחוק מדי, מתקרב....</string>

<!-- Settings -->
<string name="action_settings">הגדרות</string>

<!-- Main map activity -->
<string name="back_to_start_location">עבור למיקום הנוכחי</string>
<string name="fetch_markers">רענן תאונות</string>

<!-- popup layout -->
<string name="icon">Accident logo</string>
<string name="hello_blank_fragment">Hello blank fragment</string>

</resources>

0 comments on commit e342a40

Please sign in to comment.