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 55937183a..0fb398707 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java @@ -29,6 +29,7 @@ import android.view.ViewGroup; import android.view.ViewOutlineProvider; import android.view.ViewTreeObserver; import android.view.WindowInsets; +import android.view.inputmethod.InputMethodManager; import android.widget.Button; import android.widget.EditText; import android.widget.FrameLayout; @@ -117,12 +118,12 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList private ViewPager2 pager; private NestedRecyclerScrollView scrollView; private AccountTimelineFragment postsFragment, postsWithRepliesFragment, pinnedPostsFragment, mediaFragment; - private ProfileAboutFragment aboutFragment; +// private ProfileAboutFragment aboutFragment; private TabLayout tabbar; private SwipeRefreshLayout refreshLayout; private CoverOverlayGradientDrawable coverGradient=new CoverOverlayGradientDrawable(); private float titleTransY; - private View postsBtn, followersBtn, followingBtn; + private View postsBtn, followersBtn, followingBtn, profileCounters; private EditText nameEdit, bioEdit; private ProgressBar actionProgress, notifyProgress; private FrameLayout[] tabViews; @@ -201,6 +202,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); + profileCounters=content.findViewById(R.id.profile_counters); followersCount=content.findViewById(R.id.followers_count); followersLabel=content.findViewById(R.id.followers_label); followersBtn=content.findViewById(R.id.followers_btn); @@ -242,7 +244,7 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList } }; - tabViews=new FrameLayout[5]; + tabViews=new FrameLayout[4]; for(int i=0;i postsWithRepliesFragment; case 2 -> pinnedPostsFragment; case 3 -> mediaFragment; - case 4 -> aboutFragment; +// case 4 -> aboutFragment; default -> throw new IllegalStateException(); }; } @@ -819,9 +821,8 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList invalidateOptionsMenu(); pager.setUserInputEnabled(false); actionButton.setText(R.string.done); - pager.setCurrentItem(4); ArrayList animators=new ArrayList<>(); - for(int i=0;i animators=new ArrayList<>(); actionButton.setText(R.string.edit_profile); - for(int i=0;i(){ @Override public void onSuccess(Account result){ @@ -1085,7 +1083,6 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList dragHelper.attachToRecyclerView(null); } if (adapter != null) adapter.notifyDataSetChanged(); - if (aboutFragment != null) aboutFragment.setFields(fields); } private class MetadataAdapter extends UsableRecyclerView.Adapter implements ImageLoaderRecyclerAdapter { diff --git a/mastodon/src/main/res/layout/fragment_profile.xml b/mastodon/src/main/res/layout/fragment_profile.xml index d063a1848..31ff3f3a5 100644 --- a/mastodon/src/main/res/layout/fragment_profile.xml +++ b/mastodon/src/main/res/layout/fragment_profile.xml @@ -219,7 +219,8 @@ android:layout_below="@id/border_top" android:layout_width="match_parent" android:layout_height="wrap_content" - android:padding="8dp"> + android:paddingHorizontal="8dp" + android:paddingTop="8dp"> + android:layout_height="wrap_content" + android:paddingTop="6dp" /> diff --git a/mastodon/src/main/res/layout/item_profile_about.xml b/mastodon/src/main/res/layout/item_profile_about.xml index c09c4a668..f001107c2 100644 --- a/mastodon/src/main/res/layout/item_profile_about.xml +++ b/mastodon/src/main/res/layout/item_profile_about.xml @@ -11,7 +11,6 @@ android:layout_width="0dp" android:layout_weight="1" android:layout_height="wrap_content" - android:maxWidth="56dp" android:textAppearance="@style/m3_label_medium" android:textAllCaps="true" android:textSize="12sp"