mirror of
https://github.com/russok/FitoTrack.git
synced 2025-10-28 00:02:11 -07:00
#52 OpenStreetMap attribution in the record screen
This commit is contained in:
parent
a336015818
commit
4a27bdba26
@ -75,6 +75,7 @@ public class RecordWorkoutActivity extends FitoTrackActivity implements Location
|
||||
private final InfoViewHolder[] infoViews = new InfoViewHolder[4];
|
||||
private TextView timeView;
|
||||
private TextView gpsStatusView;
|
||||
private TextView attribution;
|
||||
private View waitingForGPSOverlay;
|
||||
private boolean gpsFound = false;
|
||||
private boolean isResumed = false;
|
||||
@ -100,6 +101,8 @@ public class RecordWorkoutActivity extends FitoTrackActivity implements Location
|
||||
waitingForGPSOverlay= findViewById(R.id.recorderWaitingOverlay);
|
||||
waitingForGPSOverlay.setVisibility(View.VISIBLE);
|
||||
|
||||
attribution = findViewById(R.id.recordMapAttribution);
|
||||
|
||||
checkPermissions();
|
||||
|
||||
recorder= new WorkoutRecorder(this, ACTIVITY, this);
|
||||
@ -135,7 +138,9 @@ public class RecordWorkoutActivity extends FitoTrackActivity implements Location
|
||||
waitingForGPSOverlay.clearAnimation();
|
||||
waitingForGPSOverlay.animate().alpha(0f).setDuration(1000).setListener(new Animator.AnimatorListener() {
|
||||
@Override public void onAnimationStart(Animator animator) { }
|
||||
|
||||
@Override public void onAnimationCancel(Animator animator) { }
|
||||
|
||||
@Override public void onAnimationRepeat(Animator animator) { }
|
||||
|
||||
@Override
|
||||
@ -143,6 +148,11 @@ public class RecordWorkoutActivity extends FitoTrackActivity implements Location
|
||||
waitingForGPSOverlay.setVisibility(View.GONE);
|
||||
}
|
||||
}).start();
|
||||
hideOSMAttribution();
|
||||
}
|
||||
|
||||
private void hideOSMAttribution() {
|
||||
attribution.animate().alpha(0f).setDuration(1000).setStartDelay(5000).start();
|
||||
}
|
||||
|
||||
private void setupMap(){
|
||||
|
||||
@ -55,6 +55,14 @@
|
||||
android:text="@string/gps"
|
||||
android:textColor="@android:color/transparent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/recordMapAttribution"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|center"
|
||||
android:layout_margin="5dp"
|
||||
android:text="@string/OpenStreetMapAttribution" />
|
||||
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
@ -171,4 +171,5 @@
|
||||
<string name="savedToDownloads">Saved to Downloads</string>
|
||||
<string name="savingFailed">Saving failed</string>
|
||||
<string name="info">Info</string>
|
||||
<string name="OpenStreetMapAttribution">© OpenStreetMap contributors</string>
|
||||
</resources>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user