Commit 6f26a55a authored by Thomas's avatar Thomas
Browse files

Merge pull request 'Add tooltips for tabs in profile (Issue #104)' (#1151)...

Merge pull request 'Add tooltips for tabs in profile (Issue #104)' (#1151) from 0xd9a/Fedilab:profile_tabs_tooltips into develop

Reviewed-on: https://codeberg.org/tom79/Fedilab/pulls/1151
parents 657b63b2 58aecf8d
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -58,6 +58,7 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.widget.TooltipCompat;
import androidx.core.app.ActivityOptionsCompat;
import androidx.core.content.ContextCompat;
import androidx.lifecycle.ViewModelProvider;
@@ -248,12 +249,15 @@ public class ProfileActivity extends BaseActivity {
                TabLayout.Tab followerTab = binding.accountTabLayout.getTabAt(2);
                if (statusTab != null) {
                    statusTab.setText(getString(R.string.status_cnt, Helper.withSuffix(account.statuses_count)));
                    TooltipCompat.setTooltipText(statusTab.view, String.valueOf(account.statuses_count));
                }
                if (followingTab != null) {
                    followingTab.setText(getString(R.string.following_cnt, Helper.withSuffix(account.following_count)));
                    TooltipCompat.setTooltipText(followingTab.view, String.valueOf(account.following_count));
                }
                if (followerTab != null) {
                    followerTab.setText(getString(R.string.followers_cnt, Helper.withSuffix(account.followers_count)));
                    TooltipCompat.setTooltipText(followerTab.view, String.valueOf(account.followers_count));
                }
            }