diff options
author | ByteHamster <info@bytehamster.com> | 2017-04-15 15:34:31 +0200 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2017-04-15 15:34:31 +0200 |
commit | 769ed8b15efb478f5ad877a71f6dc21a9c3e87b3 (patch) | |
tree | 537aa6db8fb328510a0b3d666470a3844780c1f0 /app | |
parent | 416117515c4e52727f91987e5b537256da34f09a (diff) | |
download | AntennaPod-769ed8b15efb478f5ad877a71f6dc21a9c3e87b3.zip |
Renamed type to mode
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/activity/StatisticsActivity.java | 28 | ||||
-rw-r--r-- | app/src/main/res/layout/statistics_mode_select_dialog.xml (renamed from app/src/main/res/layout/calculation_type.xml) | 8 | ||||
-rw-r--r-- | app/src/main/res/menu/statistics.xml | 4 |
3 files changed, 20 insertions, 20 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/activity/StatisticsActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/StatisticsActivity.java index 45d9ae6b7..b2ff43c43 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/StatisticsActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/StatisticsActivity.java @@ -65,7 +65,7 @@ public class StatisticsActivity extends AppCompatActivity @Override public void onResume() { super.onResume(); - refreshStats(); + refreshStatistics(); } @Override @@ -81,44 +81,44 @@ public class StatisticsActivity extends AppCompatActivity if (item.getItemId() == android.R.id.home) { finish(); return true; - } else if (item.getItemId() == R.id.calculation_type) { - selectCalculationType(); + } else if (item.getItemId() == R.id.statistics_mode) { + selectStatisticsMode(); return true; } else { return super.onOptionsItemSelected(item); } } - private void selectCalculationType() { - View contentView = View.inflate(this, R.layout.calculation_type, null); + private void selectStatisticsMode() { + View contentView = View.inflate(this, R.layout.statistics_mode_select_dialog, null); AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setView(contentView); - builder.setTitle(R.string.calculation_type); + builder.setTitle(R.string.statistics_mode); if (countAll) { - ((RadioButton) contentView.findViewById(R.id.calculation_type_count_all)).setChecked(true); + ((RadioButton) contentView.findViewById(R.id.statistics_mode_count_all)).setChecked(true); } else { - ((RadioButton) contentView.findViewById(R.id.calculation_type_normal)).setChecked(true); + ((RadioButton) contentView.findViewById(R.id.statistics_mode_normal)).setChecked(true); } builder.setPositiveButton(android.R.string.ok, (dialog, which) -> { - countAll = ((RadioButton) contentView.findViewById(R.id.calculation_type_count_all)).isChecked(); + countAll = ((RadioButton) contentView.findViewById(R.id.statistics_mode_count_all)).isChecked(); listAdapter.setCountAll(countAll); - prefs.edit().putBoolean(PREF_COUNT_ALL, countAll).commit(); - refreshStats(); + prefs.edit().putBoolean(PREF_COUNT_ALL, countAll).apply(); + refreshStatistics(); }); builder.show(); } - private void refreshStats() { + private void refreshStatistics() { progressBar.setVisibility(View.VISIBLE); totalTimeTextView.setVisibility(View.GONE); feedStatisticsList.setVisibility(View.GONE); - loadStats(); + loadStatistics(); } - private void loadStats() { + private void loadStatistics() { if (subscription != null) { subscription.unsubscribe(); } diff --git a/app/src/main/res/layout/calculation_type.xml b/app/src/main/res/layout/statistics_mode_select_dialog.xml index 9b422beb9..7918433d5 100644 --- a/app/src/main/res/layout/calculation_type.xml +++ b/app/src/main/res/layout/statistics_mode_select_dialog.xml @@ -6,14 +6,14 @@ android:padding="16dp"> <RadioButton - android:id="@+id/calculation_type_normal" + android:id="@+id/statistics_mode_normal" android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="@string/calculation_type_normal" /> + android:text="@string/statistics_mode_normal" /> <RadioButton - android:id="@+id/calculation_type_count_all" + android:id="@+id/statistics_mode_count_all" android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="@string/calculation_type_count_all" /> + android:text="@string/statistics_mode_count_all" /> </RadioGroup> diff --git a/app/src/main/res/menu/statistics.xml b/app/src/main/res/menu/statistics.xml index bc36bbb38..6ecc70707 100644 --- a/app/src/main/res/menu/statistics.xml +++ b/app/src/main/res/menu/statistics.xml @@ -3,9 +3,9 @@ xmlns:custom="http://schemas.android.com/apk/res-auto"> <item - android:id="@+id/calculation_type" + android:id="@+id/statistics_mode" android:icon="?attr/ic_filter" - android:title="@string/calculation_type" + android:title="@string/statistics_mode" custom:showAsAction="never"> </item> |