Aggregated statistics: updated PlantUML and handle empty list. (#296)

This commit is contained in:
Román Martínez
2020-06-20 19:02:02 +02:00
committed by GitHub
parent 924ef3313e
commit 8ddadb8e6d
4 changed files with 32 additions and 0 deletions
+1
View File
@@ -12,6 +12,7 @@ endlegend
TrackListActivity --> TrackRecordingActivity : Start recording
TrackListActivity --> SearchListActivity
TrackListActivity --> MarkerListActivity : Show all markers
TrackListActivity --> AggregatedStatisticsActivity : Aggregated stats
TrackListActivity --> TrackRecordedActivity : Show track
TrackListActivity --> TrackDeleteActivity
@@ -20,6 +20,7 @@ public class AggregatedStatisticsActivity extends AbstractActivity {
super.onCreate(savedInstanceState);
listView = findViewById(R.id.aggregated_stats_list);
listView.setEmptyView(findViewById(R.id.aggregated_stats_empty_view));
final AggregatedStatisticsModel viewModel = new ViewModelProvider(this).get(AggregatedStatisticsModel.class);
viewModel.getAggregatedStats().observe(this, new Observer<AggregatedStatistics>() {
+28
View File
@@ -11,4 +11,32 @@
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1.0" />
<RelativeLayout
android:id="@+id/aggregated_stats_empty_view"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1.0">
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
<TextView
style="@style/TextLarge"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="4"
android:gravity="center_horizontal|center_vertical"
android:text="@string/aggregated_stats_empty_message"
android:textColor="@color/list_empty_text" />
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
</RelativeLayout>
</LinearLayout>
+2
View File
@@ -430,6 +430,8 @@ limitations under the License.
<string name="track_edit_new_track_title">New Track</string>
<!-- Track List -->
<string name="track_list_empty_message">Start recording your next adventure here</string>
<!-- Aggregated Statistics -->
<string name="aggregated_stats_empty_message">Record your first track to see aggregated statistics</string>
<!-- Track Widget -->
<!-- Tracks -->
<string name="tracks_few">%1$d tracks</string>