Use custom TextView for map view copyright.
This commit is contained in:
parent
b455bf04aa
commit
b284b92464
@ -85,6 +85,7 @@ abstract class AbsMessageLocationItem<H : AbsMessageLocationItem.Holder> : AbsMe
|
|||||||
): Boolean {
|
): Boolean {
|
||||||
holder.staticMapPinImageView.setImageResource(R.drawable.ic_location_pin_failed)
|
holder.staticMapPinImageView.setImageResource(R.drawable.ic_location_pin_failed)
|
||||||
holder.staticMapErrorTextView.isVisible = true
|
holder.staticMapErrorTextView.isVisible = true
|
||||||
|
holder.mapCopyrightTextView.isVisible = false
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -100,6 +101,7 @@ abstract class AbsMessageLocationItem<H : AbsMessageLocationItem.Holder> : AbsMe
|
|||||||
holder.staticMapPinImageView.setImageDrawable(pinDrawable)
|
holder.staticMapPinImageView.setImageDrawable(pinDrawable)
|
||||||
}
|
}
|
||||||
holder.staticMapErrorTextView.isVisible = false
|
holder.staticMapErrorTextView.isVisible = false
|
||||||
|
holder.mapCopyrightTextView.isVisible = true
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -111,5 +113,6 @@ abstract class AbsMessageLocationItem<H : AbsMessageLocationItem.Holder> : AbsMe
|
|||||||
val staticMapImageView by bind<ImageView>(R.id.staticMapImageView)
|
val staticMapImageView by bind<ImageView>(R.id.staticMapImageView)
|
||||||
val staticMapPinImageView by bind<ImageView>(R.id.staticMapPinImageView)
|
val staticMapPinImageView by bind<ImageView>(R.id.staticMapPinImageView)
|
||||||
val staticMapErrorTextView by bind<TextView>(R.id.staticMapErrorTextView)
|
val staticMapErrorTextView by bind<TextView>(R.id.staticMapErrorTextView)
|
||||||
|
val mapCopyrightTextView by bind<TextView>(R.id.mapCopyrightTextView)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -63,10 +63,8 @@ class UrlMapProvider @Inject constructor(
|
|||||||
append(height)
|
append(height)
|
||||||
append(".png")
|
append(".png")
|
||||||
append(keyParam)
|
append(keyParam)
|
||||||
if (!localeProvider.isRTL()) {
|
// Since the default copyright font is too small we put a custom one on map
|
||||||
// On LTR languages we want the legal mentions to be displayed on the bottom left of the image
|
append("&attribution=0")
|
||||||
append("&attribution=bottomleft")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -62,4 +62,14 @@
|
|||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
app:layout_constraintGuide_percent="0.5" />
|
app:layout_constraintGuide_percent="0.5" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/mapCopyrightTextView"
|
||||||
|
style="@style/Widget.Vector.TextView.Nano.Copyright"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_margin="4dp"
|
||||||
|
android:text="@string/location_map_view_copyright"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
@ -3036,6 +3036,7 @@
|
|||||||
<string name="labs_enable_live_location_summary">Temporary implementation: locations persist in room history</string>
|
<string name="labs_enable_live_location_summary">Temporary implementation: locations persist in room history</string>
|
||||||
<string name="live_location_bottom_sheet_stop_sharing">Stop sharing</string>
|
<string name="live_location_bottom_sheet_stop_sharing">Stop sharing</string>
|
||||||
<string name="live_location_bottom_sheet_last_updated_at">Updated %1$s ago</string>
|
<string name="live_location_bottom_sheet_last_updated_at">Updated %1$s ago</string>
|
||||||
|
<string name="location_map_view_copyright">© MapTiler © OpenStreetMap contributors</string>
|
||||||
|
|
||||||
<string name="message_bubbles">Show Message bubbles</string>
|
<string name="message_bubbles">Show Message bubbles</string>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user