Rename export action and move to overflow menu

This commit is contained in:
2017-03-18 22:22:07 -04:00
parent e46fd58664
commit ab0c510fda
4 changed files with 8 additions and 8 deletions

View File

@@ -60,7 +60,7 @@ public class ShowHabitsMenu extends BaseMenu
this.exportCSVFactory = exportCSVFactory; this.exportCSVFactory = exportCSVFactory;
} }
public void downloadHabit() public void exportHabit()
{ {
List<Habit> selected = new LinkedList<>(); List<Habit> selected = new LinkedList<>();
selected.add(habit); selected.add(habit);
@@ -80,8 +80,8 @@ public class ShowHabitsMenu extends BaseMenu
screen.showEditHabitDialog(); screen.showEditHabitDialog();
return true; return true;
case R.id.download: case R.id.export:
this.downloadHabit(); this.exportHabit();
return true; return true;
default: default:

View File

@@ -22,10 +22,9 @@
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:app="http://schemas.android.com/apk/res-auto">
<item <item
android:id="@+id/download" android:id="@+id/export"
android:icon="?iconDownload" android:title="@string/export"
android:title="@string/download" app:showAsAction="never"/>
app:showAsAction="ifRoom"/>
<item <item
android:id="@+id/action_edit_habit" android:id="@+id/action_edit_habit"

View File

@@ -203,4 +203,5 @@
<string name="by_color">By color</string> <string name="by_color">By color</string>
<string name="by_score">By score</string> <string name="by_score">By score</string>
<string name="download">Download</string> <string name="download">Download</string>
<string name="export">Export</string>
</resources> </resources>

View File

@@ -61,7 +61,7 @@ public class ShowHabitsMenuTest extends BaseUnitTest
@Test @Test
public void testOnDownloadHabit() public void testOnDownloadHabit()
{ {
onItemSelected(R.id.download); onItemSelected(R.id.export);
verify(taskRunner).execute(any()); verify(taskRunner).execute(any());
} }