From 3c7c950e3421ba820a5e319461daa09ce6bb91e8 Mon Sep 17 00:00:00 2001 From: Chumva Date: Wed, 8 Aug 2018 17:59:36 +0300 Subject: [PATCH] hide textInArea --- OsmAnd-telegram/res/layout/my_location_sharing_chat.xml | 4 +++- .../src/net/osmand/telegram/ui/MyLocationTabFragment.kt | 9 ++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/OsmAnd-telegram/res/layout/my_location_sharing_chat.xml b/OsmAnd-telegram/res/layout/my_location_sharing_chat.xml index f63390dda8..5c405229a4 100644 --- a/OsmAnd-telegram/res/layout/my_location_sharing_chat.xml +++ b/OsmAnd-telegram/res/layout/my_location_sharing_chat.xml @@ -94,8 +94,10 @@ android:paddingRight="@dimen/content_padding_half" android:textColor="?attr/ctrl_active_color" android:textSize="14sp" + android:visibility="gone" app:typeface="@string/font_roboto_medium" - tools:text="+ 30 min" /> + tools:text="+ 30 min" + tools:visibility="visible" /> diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/MyLocationTabFragment.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/MyLocationTabFragment.kt index 150356e860..1a135f275e 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/MyLocationTabFragment.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/MyLocationTabFragment.kt @@ -111,9 +111,6 @@ class MyLocationTabFragment : Fragment(), TelegramListener { setImageResource(R.drawable.img_my_location_user) } - imageContainer = mainView.findViewById(R.id.image_container) - titleContainer = mainView.findViewById(R.id.title_container) - optionsBtn = mainView.findViewById(R.id.options).apply { setImageDrawable(app.uiUtils.getThemedIcon(R.drawable.ic_action_other_menu)) setOnClickListener { showPopupMenu() } @@ -123,7 +120,10 @@ class MyLocationTabFragment : Fragment(), TelegramListener { setImageDrawable(app.uiUtils.getThemedIcon(R.drawable.ic_action_other_menu)) setOnClickListener { showPopupMenu() } } - + + imageContainer = mainView.findViewById(R.id.image_container) + titleContainer = mainView.findViewById(R.id.title_container) + textContainer = mainView.findViewById(R.id.text_container).apply { if (Build.VERSION.SDK_INT >= 16) { layoutTransition.enableTransitionType(LayoutTransition.CHANGING) @@ -564,7 +564,6 @@ class MyLocationTabFragment : Fragment(), TelegramListener { Date(System.currentTimeMillis() + (content.expiresIn * 1000)) val df = SimpleDateFormat("HH:mm", Locale.getDefault()) val formattedDate = df.format(currentTime) - holder.textInArea?.text = "+ 30 min" holder.stopSharingFirstPart?.text = time holder.stopSharingSecondPart?.text = formattedDate }