From 10f9230139f549f729f3a883760e971bedc589bf Mon Sep 17 00:00:00 2001 From: LucasGGamerM Date: Sun, 1 Jan 2023 18:06:26 -0300 Subject: [PATCH] First iteration of the bot account tag --- .../android/fragments/ProfileFragment.java | 7 ++++- .../src/main/res/drawable/ic_fluent_bot.xml | 9 ------ .../res/drawable/ic_fluent_bot_24_regular.xml | 9 ++++++ .../src/main/res/layout/fragment_profile.xml | 30 ++++++++----------- mastodon/src/main/res/values/strings_sk.xml | 1 + 5 files changed, 29 insertions(+), 27 deletions(-) delete mode 100644 mastodon/src/main/res/drawable/ic_fluent_bot.xml create mode 100644 mastodon/src/main/res/drawable/ic_fluent_bot_24_regular.xml diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java index 39eb25a25..9085c3ec9 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java @@ -35,6 +35,7 @@ import android.widget.ImageView; import android.widget.ProgressBar; import android.widget.RelativeLayout; import android.widget.TextView; +import android.widget.Toast; import android.widget.Toolbar; import org.joinmastodon.android.GlobalUserPreferences; @@ -96,7 +97,7 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList private static final int COVER_RESULT=343; private ImageView avatar; - private TextView botIcon; + private Button botIcon; private CoverImageView cover; private View avatarBorder; private TextView name, username, bio, followersCount, followersLabel, followingCount, followingLabel, postsCount, postsLabel; @@ -174,6 +175,10 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList cover=content.findViewById(R.id.cover); avatarBorder=content.findViewById(R.id.avatar_border); botIcon=content.findViewById(R.id.bot_icon); + botIcon.setOnClickListener(v ->{ + Toast.makeText(getActivity(), R.string.sk_bot_account, + Toast.LENGTH_LONG).show(); + }); name=content.findViewById(R.id.name); username=content.findViewById(R.id.username); bio=content.findViewById(R.id.bio); diff --git a/mastodon/src/main/res/drawable/ic_fluent_bot.xml b/mastodon/src/main/res/drawable/ic_fluent_bot.xml deleted file mode 100644 index fb75803ff..000000000 --- a/mastodon/src/main/res/drawable/ic_fluent_bot.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/mastodon/src/main/res/drawable/ic_fluent_bot_24_regular.xml b/mastodon/src/main/res/drawable/ic_fluent_bot_24_regular.xml new file mode 100644 index 000000000..fc4a8d74f --- /dev/null +++ b/mastodon/src/main/res/drawable/ic_fluent_bot_24_regular.xml @@ -0,0 +1,9 @@ + + + diff --git a/mastodon/src/main/res/layout/fragment_profile.xml b/mastodon/src/main/res/layout/fragment_profile.xml index 3629edcf9..7d11baf50 100644 --- a/mastodon/src/main/res/layout/fragment_profile.xml +++ b/mastodon/src/main/res/layout/fragment_profile.xml @@ -72,22 +72,6 @@ android:contentDescription="@string/profile_picture" tools:src="#0f0" /> - - - - +