From 9bddd6b27488b3c6c897620b4537c3c32def73e0 Mon Sep 17 00:00:00 2001 From: LucasGGamerM Date: Tue, 27 Dec 2022 16:53:21 -0300 Subject: [PATCH 001/200] The ui side is ready somehow. Still need to handle it all --- .../src/main/res/layout/fragment_profile.xml | 25 ++++++++++++++++--- mastodon/src/main/res/values/strings_sk.xml | 1 + 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/mastodon/src/main/res/layout/fragment_profile.xml b/mastodon/src/main/res/layout/fragment_profile.xml index 7828f92be..775ec0ebe 100644 --- a/mastodon/src/main/res/layout/fragment_profile.xml +++ b/mastodon/src/main/res/layout/fragment_profile.xml @@ -256,11 +256,12 @@ android:textColor="?android:textColorSecondary" tools:text="\@Gargron" /> + + + + android:tint="@color/fab_icon" + tools:ignore="SpeakableTextPresentCheck,SpeakableTextPresentCheck" /> diff --git a/mastodon/src/main/res/values/strings_sk.xml b/mastodon/src/main/res/values/strings_sk.xml index 742706bdf..84c35d709 100644 --- a/mastodon/src/main/res/values/strings_sk.xml +++ b/mastodon/src/main/res/values/strings_sk.xml @@ -67,6 +67,7 @@ \@megalodon Disable swiping between tabs Set up profile + Personal note for this profile: Posting preferences Configure filters Security settings From 3104ddb4b668f0374f2ea513a58005a5c46f7fae Mon Sep 17 00:00:00 2001 From: LucasGGamerM Date: Tue, 27 Dec 2022 18:26:35 -0300 Subject: [PATCH 002/200] More polishes the UI side a little more, now also hides the private note on the personal profile --- .../android/fragments/ProfileFragment.java | 49 ++++++++++++++++++- .../src/main/res/layout/fragment_profile.xml | 1 + 2 files changed, 49 insertions(+), 1 deletion(-) 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 53dc5c636..1a6219086 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java @@ -117,7 +117,7 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList private CoverOverlayGradientDrawable coverGradient=new CoverOverlayGradientDrawable(); private float titleTransY; private View postsBtn, followersBtn, followingBtn; - private EditText nameEdit, bioEdit; + private EditText nameEdit, bioEdit, noteEdit; private ProgressBar actionProgress, notifyProgress; private FrameLayout[] tabViews; private TabLayoutMediator tabLayoutMediator; @@ -180,6 +180,7 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList name=content.findViewById(R.id.name); username=content.findViewById(R.id.username); bio=content.findViewById(R.id.bio); + noteEdit=content.findViewById(R.id.note_edit); followersCount=content.findViewById(R.id.followers_count); followersLabel=content.findViewById(R.id.followers_label); followersBtn=content.findViewById(R.id.followers_btn); @@ -444,6 +445,52 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList name.setText(ssb); setTitle(ssb); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + if(isOwnProfile){ + noteEdit.setVisibility(View.GONE); + } + boolean isSelf=AccountSessionManager.getInstance().isSelf(accountID, account); if(account.locked){ diff --git a/mastodon/src/main/res/layout/fragment_profile.xml b/mastodon/src/main/res/layout/fragment_profile.xml index 775ec0ebe..2000e718d 100644 --- a/mastodon/src/main/res/layout/fragment_profile.xml +++ b/mastodon/src/main/res/layout/fragment_profile.xml @@ -294,6 +294,7 @@ android:layout_marginLeft="16dp" android:layout_marginTop="8dp" android:layout_marginRight="16dp" + android:layout_marginBottom="4dp" android:textAppearance="@style/m3_body_large" android:textSize="16sp" android:background="@drawable/edit_text_border" From 68397bd4879a80acda67304a6ca406e6fafa8f3c Mon Sep 17 00:00:00 2001 From: LucasGGamerM Date: Tue, 27 Dec 2022 18:27:57 -0300 Subject: [PATCH 003/200] How did I add some many lines? Removing them --- .../android/fragments/ProfileFragment.java | 42 ------------------- 1 file changed, 42 deletions(-) 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 1a6219086..1864a5882 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java @@ -445,48 +445,6 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList name.setText(ssb); setTitle(ssb); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - if(isOwnProfile){ noteEdit.setVisibility(View.GONE); } From 68bb23e3b4c0a9fd2ee475c4fcb50f35b7e772fe Mon Sep 17 00:00:00 2001 From: LucasGGamerM Date: Tue, 27 Dec 2022 18:48:08 -0300 Subject: [PATCH 004/200] It actually loads something. Perfect --- .../android/fragments/ProfileFragment.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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 1864a5882..4610a3d01 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java @@ -445,10 +445,6 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList name.setText(ssb); setTitle(ssb); - if(isOwnProfile){ - noteEdit.setVisibility(View.GONE); - } - boolean isSelf=AccountSessionManager.getInstance().isSelf(accountID, account); if(account.locked){ @@ -475,6 +471,14 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList bio.setVisibility(View.VISIBLE); bio.setText(parsedBio); } + + if(isOwnProfile){ + noteEdit.setVisibility(View.GONE); + } + + + + followersCount.setText(UiUtils.abbreviateNumber(account.followersCount)); followingCount.setText(UiUtils.abbreviateNumber(account.followingCount)); postsCount.setText(UiUtils.abbreviateNumber(account.statusesCount)); @@ -671,6 +675,7 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList notifyProgress.setIndeterminateTintList(notifyButton.getTextColors()); followsYouView.setVisibility(relationship.followedBy ? View.VISIBLE : View.GONE); notifyButton.setSelected(relationship.notifying); + noteEdit.setText(relationship.note); if (getActivity() != null) notifyButton.setContentDescription(getString(relationship.notifying ? R.string.sk_user_post_notifications_on : R.string.sk_user_post_notifications_off, '@'+account.username)); } From 9d800106ccd2043f05413edf972141c6c1b42d2a Mon Sep 17 00:00:00 2001 From: LucasGGamerM Date: Tue, 27 Dec 2022 20:20:44 -0300 Subject: [PATCH 005/200] Added a framelayout just for adding the confirm button --- .../src/main/res/layout/fragment_profile.xml | 48 +++++++++++-------- 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/mastodon/src/main/res/layout/fragment_profile.xml b/mastodon/src/main/res/layout/fragment_profile.xml index 2000e718d..0ad7a898e 100644 --- a/mastodon/src/main/res/layout/fragment_profile.xml +++ b/mastodon/src/main/res/layout/fragment_profile.xml @@ -256,12 +256,38 @@ android:textColor="?android:textColorSecondary" tools:text="\@Gargron" /> + - + + + + - - Date: Tue, 27 Dec 2022 21:19:54 -0300 Subject: [PATCH 006/200] Now adding a confirm button --- .../android/fragments/ProfileFragment.java | 9 ++++----- mastodon/src/main/res/layout/fragment_profile.xml | 14 +++++++++++--- 2 files changed, 15 insertions(+), 8 deletions(-) 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 4610a3d01..d92df441b 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java @@ -116,7 +116,7 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList private SwipeRefreshLayout refreshLayout; private CoverOverlayGradientDrawable coverGradient=new CoverOverlayGradientDrawable(); private float titleTransY; - private View postsBtn, followersBtn, followingBtn; + private View postsBtn, followersBtn, followingBtn, noteEditConfirm, noteEditWrapper; private EditText nameEdit, bioEdit, noteEdit; private ProgressBar actionProgress, notifyProgress; private FrameLayout[] tabViews; @@ -181,6 +181,8 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList username=content.findViewById(R.id.username); bio=content.findViewById(R.id.bio); noteEdit=content.findViewById(R.id.note_edit); + noteEditConfirm=content.findViewById(R.id.note_edit_confirm); + noteEditWrapper=content.findViewById(R.id.note_edit_wrapper); followersCount=content.findViewById(R.id.followers_count); followersLabel=content.findViewById(R.id.followers_label); followersBtn=content.findViewById(R.id.followers_btn); @@ -473,12 +475,9 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList } if(isOwnProfile){ - noteEdit.setVisibility(View.GONE); + noteEditWrapper.setVisibility(View.GONE); } - - - followersCount.setText(UiUtils.abbreviateNumber(account.followersCount)); followingCount.setText(UiUtils.abbreviateNumber(account.followingCount)); postsCount.setText(UiUtils.abbreviateNumber(account.statusesCount)); diff --git a/mastodon/src/main/res/layout/fragment_profile.xml b/mastodon/src/main/res/layout/fragment_profile.xml index 0ad7a898e..f4b10a222 100644 --- a/mastodon/src/main/res/layout/fragment_profile.xml +++ b/mastodon/src/main/res/layout/fragment_profile.xml @@ -262,7 +262,7 @@ android:id="@+id/note_edit_wrapper" android:layout_below="@id/username" android:layout_marginTop="0dp" - android:padding="0dp"> + android:padding="2dp"> + android:textColorHint="?android:textColorSecondaryInverseNoDisable" /> + +