Skip to content

Commit

Permalink
fix #87: store cache to multiple lists
Browse files Browse the repository at this point in the history
- Added n:m relationship between caches and lists
- List of Lists in CacheDetailActivity
- Added CopyToList Command
- CacheDetailActivity Menu adjustments
- Fixed basicDebugUnitTests
- Adjusted CachePopup Dialog
- GPX Import with multilist support
- CleanIfNeeded
- Code Review adjustments
  • Loading branch information
pstorch committed Mar 17, 2016
1 parent 0b9779f commit e1419df
Show file tree
Hide file tree
Showing 28 changed files with 615 additions and 265 deletions.
65 changes: 37 additions & 28 deletions main/res/layout/cachedetail_details_page.xml
Expand Up @@ -106,45 +106,54 @@
android:visibility="gone" />

<Button
android:id="@+id/offline_store"
android:id="@+id/offline_drop"
style="@style/button_small"
android:layout_width="wrap_content"
android:layout_marginLeft="2dip"
android:minWidth="60dip"
android:text="@string/cache_offline_store" />
android:text="@string/cache_offline_drop" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>

<!-- list box -->
</RelativeLayout>

<RelativeLayout
android:id="@+id/list_box"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone" >
<View
style="@style/separator_horizontal"
android:layout_marginBottom="9dp"
android:layout_marginTop="9dp" />

<TextView
android:id="@+id/list_text"
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_alignParentLeft="true"
android:layout_marginLeft="6dip"
android:layout_marginRight="130dip"
android:paddingRight="3dip"
android:textColor="?text_color"
android:textSize="14sp"
android:text="@string/list_list_headline"/>

<Button
android:id="@+id/offline_store"
style="@style/button_small"
android:layout_width="wrap_content"
android:layout_marginLeft="2dip"
android:layout_alignParentRight="true"
android:layout_gravity="right"
android:minWidth="60dip"
android:text="@string/cache_store_list" />
</RelativeLayout>

<LinearLayout android:id="@+id/list_list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_gravity="left"
android:layout_marginLeft="6dip"
android:layout_marginRight="130dip"
android:paddingRight="3dip"
android:textColor="?text_color"
android:textSize="14sp" />
android:orientation="vertical" >

<Button
android:id="@+id/change_list"
style="@style/button_small"
android:layout_alignParentRight="true"
android:text="@string/cache_list_change"
android:visibility="visible" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>

<!-- Watchlist box -->

Expand Down
27 changes: 27 additions & 0 deletions main/res/layout/list_list_item.xml
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/cache_list_item"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical">

<TextView
android:id="@+id/list_text"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_gravity="left"
android:layout_marginLeft="6dip"
android:layout_marginRight="130dip"
android:paddingRight="3dip"
android:textColor="?text_color"
android:textSize="14sp" />

<Button
android:id="@+id/remove_from_list"
style="@style/button_small"
android:layout_alignParentRight="true"
android:text="@string/cache_list_remove_from"
android:visibility="visible" />
</RelativeLayout>
13 changes: 13 additions & 0 deletions main/res/layout/popup.xml
Expand Up @@ -74,6 +74,19 @@
android:layout_alignParentRight="true"
android:text="@string/cache_offline_store" />
</RelativeLayout>

<TextView
android:id="@+id/offline_lists"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_marginLeft="6dip"
android:layout_marginRight="6dip"
android:paddingRight="3dip"
android:textColor="?text_color"
android:textIsSelectable="false"
android:textSize="14sp" />

</LinearLayout>
</ScrollView>

Expand Down
5 changes: 5 additions & 0 deletions main/res/menu/cache_list_context.xml
Expand Up @@ -41,6 +41,11 @@
android:title="@string/cache_menu_move_list"
app:showAsAction="ifRoom|withText">
</item>
<item
android:id="@+id/menu_copy_to_list"
android:title="@string/cache_menu_copy_list"
app:showAsAction="ifRoom|withText">
</item>
<item
android:id="@+id/menu_refresh"
android:icon="@drawable/ic_menu_refresh"
Expand Down
5 changes: 5 additions & 0 deletions main/res/menu/cache_list_options.xml
Expand Up @@ -45,6 +45,11 @@
android:title="@string/cache_menu_move_list"
app:showAsAction="ifRoom|withText">
</item>
<item
android:id="@+id/menu_copy_to_list"
android:title="@string/cache_menu_copy_list"
app:showAsAction="ifRoom|withText">
</item>
<item
android:id="@+id/menu_drop_caches"
android:icon="@drawable/ic_menu_delete"
Expand Down
4 changes: 2 additions & 2 deletions main/res/menu/cache_options.xml
Expand Up @@ -50,9 +50,9 @@
app:showAsAction="ifRoom">
</item>
<item
android:id="@+id/menu_store"
android:id="@+id/menu_store_in_list"
android:icon="@drawable/ic_menu_save"
android:title="@string/cache_offline_store"
android:title="@string/cache_offline_store_in_list"
android:visible="false"
app:showAsAction="ifRoom">
</item>
Expand Down
17 changes: 17 additions & 0 deletions main/res/values/strings.xml
Expand Up @@ -334,12 +334,18 @@
<item quantity="one">Do you want to remove this cache from your device?</item>
<item quantity="other">Do you want to remove the selected %d caches from your device?</item>
</plurals>
<plurals name="caches_remove_selected_from_list_confirm">
<item quantity="one">Do you want to remove this cache from current list?</item>
<item quantity="other">Do you want to remove the selected %d caches from current list?</item>
</plurals>
<string name="caches_remove_progress">Removing caches</string>
<string name="caches_delete_events">Delete past events</string>
<string name="caches_refresh_selected">Refresh selected</string>
<string name="caches_refresh_all">Refresh all</string>
<string name="caches_move_selected">Move selected</string>
<string name="caches_move_all">Move all</string>
<string name="caches_copy_selected">Copy selected</string>
<string name="caches_copy_all">Copy all</string>
<string name="caches_map_locus">Locus</string>
<string name="caches_map_locus_export">Export to Locus</string>
<string name="caches_recaptcha_title">reCAPTCHA</string>
Expand Down Expand Up @@ -696,6 +702,7 @@
<string name="cache_offline_refresh">Refresh</string>
<string name="cache_offline_drop">Drop</string>
<string name="cache_offline_store">Store</string>
<string name="cache_offline_store_in_list">Store in list</string>
<string name="cache_offline_stored">Stored in device</string>
<string name="cache_offline_not_ready">Not available offline</string>
<string name="cache_offline_time_about">about</string>
Expand Down Expand Up @@ -808,6 +815,7 @@
<string name="cache_menu_refresh">Refresh</string>
<string name="cache_menu_share">Share cache</string>
<string name="cache_menu_move_list">Move to different list</string>
<string name="cache_menu_copy_list">Copy to different list</string>
<string name="cache_menu_whereyougo">WhereYouGo</string>
<string name="cache_menu_oruxmaps_online">OruxMaps (Online)</string>
<string name="cache_menu_oruxmaps_offline">OruxMaps (Offline)</string>
Expand Down Expand Up @@ -1456,6 +1464,11 @@
<item quantity="one">Moved %d cache</item>
<item quantity="other">Moved %d caches</item>
</plurals>
<string name="command_copy_caches_progress">Copying caches to list %1s</string>
<plurals name="command_copy_caches_result">
<item quantity="one">Copied %d cache</item>
<item quantity="other">Copied %d caches</item>
</plurals>
<string name="command_delete_caches_progress">Deleting caches</string>
<plurals name="command_delete_caches_result">
<item quantity="one">Deleted %d cache</item>
Expand Down Expand Up @@ -1483,4 +1496,8 @@
<string name="invitation_title">Invite friends to use c:geo</string>
<string name="invitation_message">Try the c:geo app for geocaching</string>

<string name="cache_list_remove_from">Remove from list</string>
<string name="list_list_headline">Lists:</string>
<string name="cache_store_list">Store in list</string>

</resources>

0 comments on commit e1419df

Please sign in to comment.