Skip to content
Snippets Groups Projects
Commit a53df038 authored by Vitalii Nikitchyn's avatar Vitalii Nikitchyn Committed by Vitalii Nikitchyn
Browse files

mapview layout update

Change-Id: Ib4b11dfe835c7082033a0cbc39cf626464fbecc9
parent 34b650a9
No related branches found
No related tags found
No related merge requests found
...@@ -454,15 +454,13 @@ class ConversationFragment : BaseSupportFragment<ConversationPresenter, Conversa ...@@ -454,15 +454,13 @@ class ConversationFragment : BaseSupportFragment<ConversationPresenter, Conversa
fun expandMapView() { fun expandMapView() {
// The binding.root view must have android:animateLayoutChanges="true" // The binding.root view must have android:animateLayoutChanges="true"
binding!!.root.layoutTransition.enableTransitionType(LayoutTransition.CHANGING) binding!!.root.layoutTransition.enableTransitionType(LayoutTransition.CHANGING)
val params = binding!!.mapCard.layoutParams as RelativeLayout.LayoutParams
if (params.width != ViewGroup.LayoutParams.MATCH_PARENT) {
val margin = resources.getDimensionPixelSize(R.dimen.location_sharing_minmap_margin) val margin = resources.getDimensionPixelSize(R.dimen.location_sharing_minmap_margin)
val params = binding!!.mapCard.layoutParams as RelativeLayout.LayoutParams
params.setMargins(0, 0, 0, binding!!.cvMessageInput.height + margin) params.setMargins(0, 0, 0, binding!!.cvMessageInput.height + margin)
params.width = ViewGroup.LayoutParams.MATCH_PARENT params.width = ViewGroup.LayoutParams.MATCH_PARENT
params.height = ViewGroup.LayoutParams.MATCH_PARENT params.height = ViewGroup.LayoutParams.MATCH_PARENT
binding!!.mapCard.layoutParams = params binding!!.mapCard.layoutParams = params
} }
}
override fun startShareLocation(accountId: String, conversationId: String) { override fun startShareLocation(accountId: String, conversationId: String) {
showMap(accountId, conversationId, true) showMap(accountId, conversationId, true)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment