Rename export action and move to overflow menu

pull/157/merge
Alinson S. Xavier 9 years ago
parent e46fd58664
commit ab0c510fda

@ -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:

@ -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"

@ -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>

@ -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());
} }

Loading…
Cancel
Save