mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 09:08:52 -06:00
Rename export action and move to overflow menu
This commit is contained in:
@@ -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());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user