From a7c2a67d0c86bed9a51194d4496d349b94e6136a Mon Sep 17 00:00:00 2001 From: Balazs Toldi Date: Wed, 16 Aug 2023 19:44:46 +0200 Subject: [PATCH] Better loading for View User datail activity Closes #64 --- .../activities/ViewUserDetailActivity.java | 5 +++++ .../res/layout-land/activity_view_user_detail.xml | 11 ++++++++--- .../res/layout-sw600dp/activity_view_user_detail.xml | 12 +++++++++--- .../main/res/layout/activity_view_user_detail.xml | 9 +++++++-- 4 files changed, 29 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/eu/toldi/infinityforlemmy/activities/ViewUserDetailActivity.java b/app/src/main/java/eu/toldi/infinityforlemmy/activities/ViewUserDetailActivity.java index fadb6511..491c02ee 100644 --- a/app/src/main/java/eu/toldi/infinityforlemmy/activities/ViewUserDetailActivity.java +++ b/app/src/main/java/eu/toldi/infinityforlemmy/activities/ViewUserDetailActivity.java @@ -21,6 +21,7 @@ import android.view.Window; import android.view.WindowManager; import android.view.inputmethod.EditorInfo; import android.widget.LinearLayout; +import android.widget.ProgressBar; import android.widget.TextView; import android.widget.Toast; @@ -170,6 +171,9 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele @BindView(R.id.user_qualified_name_text_view_view_user_detail_activity) TextView qualifiedNameTextView; + + @BindView(R.id.loading_user_progress_indicator_view_user_detail_activity) + ProgressBar progressBar; @BindView(R.id.subscribe_user_chip_view_user_detail_activity) Chip subscribeUserChip; @BindView(R.id.karma_text_view_view_user_detail_activity) @@ -310,6 +314,7 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele private void setupVisibleElements() { Resources resources = getResources(); String title = username; + progressBar.setVisibility(View.GONE); userNameTextView.setText(title); qualifiedNameTextView.setText(qualifiedName); toolbar.setTitle(title); diff --git a/app/src/main/res/layout-land/activity_view_user_detail.xml b/app/src/main/res/layout-land/activity_view_user_detail.xml index c44ef2f2..ab125731 100644 --- a/app/src/main/res/layout-land/activity_view_user_detail.xml +++ b/app/src/main/res/layout-land/activity_view_user_detail.xml @@ -51,6 +51,12 @@ android:paddingEnd="16dp" android:layout_below="@id/banner_image_view_view_user_detail_activity"> + + + android:layout_gravity="center_horizontal" /> + android:layout_marginBottom="16dp" /> + + + android:layout_gravity="center_horizontal" /> + + android:layout_marginBottom="16dp" /> + + + android:layout_marginBottom="16dp" />