diff --git a/OsmAnd-telegram/res/layout/fragment_my_location_tab.xml b/OsmAnd-telegram/res/layout/fragment_my_location_tab.xml index db9f66b230..7c5a8e3cfa 100644 --- a/OsmAnd-telegram/res/layout/fragment_my_location_tab.xml +++ b/OsmAnd-telegram/res/layout/fragment_my_location_tab.xml @@ -28,21 +28,27 @@ android:paddingLeft="@dimen/my_location_text_sides_margin" android:paddingRight="@dimen/my_location_text_sides_margin"> - + android:layout_height="@dimen/action_bar_height"> + + + + #ffffff #cccccc + #333333 + diff --git a/OsmAnd-telegram/res/values/dimens.xml b/OsmAnd-telegram/res/values/dimens.xml index 34925140ae..a3aed34334 100644 --- a/OsmAnd-telegram/res/values/dimens.xml +++ b/OsmAnd-telegram/res/values/dimens.xml @@ -6,7 +6,7 @@ 32dp - 60dp + 56dp 24dp 60dp diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/MyLocationTabFragment.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/MyLocationTabFragment.kt index af42721c76..bf1828024f 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/MyLocationTabFragment.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/MyLocationTabFragment.kt @@ -6,6 +6,7 @@ import android.graphics.drawable.Drawable import android.graphics.drawable.GradientDrawable import android.os.Build import android.os.Bundle +import android.support.annotation.ColorRes import android.support.design.widget.AppBarLayout import android.support.v4.app.Fragment import android.support.v4.content.ContextCompat @@ -218,22 +219,32 @@ class MyLocationTabFragment : Fragment(), TelegramListener { val animatorSet = AnimatorSet() animatorSet.duration = 200 animatorSet.playTogether(cornerAnimator, marginAnimator) - if (Build.VERSION.SDK_INT >= 21) { - if (appBarCollapsed) { - animatorSet.addListener(object : AnimatorListenerAdapter() { - override fun onAnimationEnd(animation: Animator?) { - if (Build.VERSION.SDK_INT >= 21 && appBarCollapsed) { + if (appBarCollapsed) { + animatorSet.addListener(object : AnimatorListenerAdapter() { + override fun onAnimationEnd(animation: Animator?) { + if (appBarCollapsed) { + updateTitleTextColor(R.color.app_bar_title_light) + if (Build.VERSION.SDK_INT >= 21) { appBarLayout.outlineProvider = appBarOutlineProvider } } - }) - } else { + } + }) + } else { + updateTitleTextColor(R.color.ctrl_active_light) + if (Build.VERSION.SDK_INT >= 21) { appBarLayout.outlineProvider = null } } animatorSet.start() } + private fun updateTitleTextColor(@ColorRes color: Int) { + context?.also { + title.setTextColor(ContextCompat.getColor(it, color)) + } + } + private fun updateList() { val chatList = telegramHelper.getChatList() val chats: MutableList = mutableListOf()