forked from upstream-mirrors/OpenTracks
Aggregated statistics: updated PlantUML and handle empty list. (#296)
This commit is contained in:
@@ -12,6 +12,7 @@ endlegend
|
|||||||
TrackListActivity --> TrackRecordingActivity : Start recording
|
TrackListActivity --> TrackRecordingActivity : Start recording
|
||||||
TrackListActivity --> SearchListActivity
|
TrackListActivity --> SearchListActivity
|
||||||
TrackListActivity --> MarkerListActivity : Show all markers
|
TrackListActivity --> MarkerListActivity : Show all markers
|
||||||
|
TrackListActivity --> AggregatedStatisticsActivity : Aggregated stats
|
||||||
TrackListActivity --> TrackRecordedActivity : Show track
|
TrackListActivity --> TrackRecordedActivity : Show track
|
||||||
TrackListActivity --> TrackDeleteActivity
|
TrackListActivity --> TrackDeleteActivity
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ public class AggregatedStatisticsActivity extends AbstractActivity {
|
|||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
listView = findViewById(R.id.aggregated_stats_list);
|
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);
|
final AggregatedStatisticsModel viewModel = new ViewModelProvider(this).get(AggregatedStatisticsModel.class);
|
||||||
viewModel.getAggregatedStats().observe(this, new Observer<AggregatedStatistics>() {
|
viewModel.getAggregatedStats().observe(this, new Observer<AggregatedStatistics>() {
|
||||||
|
|||||||
@@ -11,4 +11,32 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="1.0" />
|
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>
|
</LinearLayout>
|
||||||
@@ -430,6 +430,8 @@ limitations under the License.
|
|||||||
<string name="track_edit_new_track_title">New Track</string>
|
<string name="track_edit_new_track_title">New Track</string>
|
||||||
<!-- Track List -->
|
<!-- Track List -->
|
||||||
<string name="track_list_empty_message">Start recording your next adventure here</string>
|
<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 -->
|
<!-- Track Widget -->
|
||||||
<!-- Tracks -->
|
<!-- Tracks -->
|
||||||
<string name="tracks_few">%1$d tracks</string>
|
<string name="tracks_few">%1$d tracks</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user