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

mapview layout

Change-Id: Ic5e5319d3deb9d8edcfb89b77277f6531df8f865
parent fc9080e0
No related branches found
No related tags found
No related merge requests found
......@@ -445,6 +445,7 @@ class ConversationFragment : BaseSupportFragment<ConversationPresenter, Conversa
if (params.width != mapWidth) {
params.width = mapWidth
params.height = mapHeight
params.updateMargins(top = resources.getDimensionPixelSize(R.dimen.location_sharing_minmap_margin))
binding!!.mapCard.layoutParams = params
}
if (!isSharing) hideMap()
......@@ -455,7 +456,8 @@ class ConversationFragment : BaseSupportFragment<ConversationPresenter, Conversa
binding!!.root.layoutTransition.enableTransitionType(LayoutTransition.CHANGING)
val params = binding!!.mapCard.layoutParams as RelativeLayout.LayoutParams
if (params.width != ViewGroup.LayoutParams.MATCH_PARENT) {
params.setMargins(0, 0,0, binding!!.cvMessageInput.height)
val margin = resources.getDimensionPixelSize(R.dimen.location_sharing_minmap_margin)
params.setMargins(0, 0,0, binding!!.cvMessageInput.height + margin)
params.width = ViewGroup.LayoutParams.MATCH_PARENT
params.height = ViewGroup.LayoutParams.MATCH_PARENT
binding!!.mapCard.layoutParams = params
......
......@@ -260,7 +260,7 @@ class LocationSharingService : Service(), LocationListener {
HomeActivity::class.java
)
.putExtra(ConversationFragment.EXTRA_SHOW_MAP, true)
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP or Intent.FLAG_ACTIVITY_CLEAR_TOP)
if (contactCount == 1) {
stopIntent.data = firsPath.toUri()
title = getString(R.string.notif_location_title, conversation.title)
......
......@@ -215,8 +215,8 @@ class NotificationServiceImpl(
val profile = getProfile(conversation)
val path = ConversationPath.toUri(conversation)
val intentConversation = Intent(Intent.ACTION_VIEW, path, mContext, ConversationActivity::class.java)
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
val intentConversation = Intent(Intent.ACTION_VIEW, path, mContext, HomeActivity::class.java)
.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP or Intent.FLAG_ACTIVITY_CLEAR_TOP)
.putExtra(ConversationFragment.EXTRA_SHOW_MAP, true)
val messageNotificationBuilder = NotificationCompat.Builder(mContext, NOTIF_CHANNEL_MESSAGE)
.setCategory(NotificationCompat.CATEGORY_MESSAGE)
......
......@@ -39,6 +39,7 @@ along with this program; if not, write to the Free Software
<dimen name="location_sharing_avatar_size">36dp</dimen>
<dimen name="location_sharing_minmap_width">260dp</dimen>
<dimen name="location_sharing_minmap_height">160dp</dimen>
<dimen name="location_sharing_minmap_margin">16dp</dimen>
<dimen name="activity_horizontal_margin">32dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment