From 94ea7269e2f6c515225fd8c96ee0dbf3243b9724 Mon Sep 17 00:00:00 2001 From: Austin Huang Date: Sun, 11 Jul 2021 20:14:21 -0400 Subject: [PATCH] tooltip for story viewer buttons --- .../awais/instagrabber/fragments/StoryViewerFragment.kt | 9 +++++++-- app/src/main/res/values/strings.xml | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/awais/instagrabber/fragments/StoryViewerFragment.kt b/app/src/main/java/awais/instagrabber/fragments/StoryViewerFragment.kt index d9e20b4a..771d17bc 100644 --- a/app/src/main/java/awais/instagrabber/fragments/StoryViewerFragment.kt +++ b/app/src/main/java/awais/instagrabber/fragments/StoryViewerFragment.kt @@ -15,6 +15,7 @@ import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.view.ContextThemeWrapper import androidx.appcompat.widget.PopupMenu +import androidx.appcompat.widget.TooltipCompat import androidx.core.view.GestureDetectorCompat import androidx.fragment.app.Fragment import androidx.lifecycle.MutableLiveData @@ -78,8 +79,6 @@ class StoryViewerFragment : Fragment() { private var profileVisible: Boolean = false private var player: SimpleExoPlayer? = null - private var actionBarTitle: String? = null - private var actionBarSubtitle: String? = null private var shouldRefresh = true private var currentFeedStoryIndex = 0 private var sliderValue = 0.0 @@ -258,6 +257,12 @@ class StoryViewerFragment : Fragment() { binding.storiesList.visibility = if (binding.storiesList.visibility == View.GONE) View.VISIBLE else View.GONE }) + + TooltipCompat.setTooltipText(binding.btnDownload, getString(R.string.action_download)) + TooltipCompat.setTooltipText(binding.btnShare, getString(R.string.share)) + TooltipCompat.setTooltipText(binding.btnReply, getString(R.string.reply_story)) + TooltipCompat.setTooltipText(binding.stickers, getString(R.string.story_stickers)) + TooltipCompat.setTooltipText(binding.listToggle, getString(R.string.story_list)) } @SuppressLint("ClickableViewAccessibility") diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index e18b2aaf..44bb3e95 100755 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -486,4 +486,6 @@ Disable screen transitions Invalid format Barinsta cannot launch Android\'s file manager. Please make sure it is installed and enabled on your device. + Stickers + Story list