Fix issue #222 - Profiles truncated when long bio + missing fields

This commit is contained in:
Thomas 2022-07-08 10:20:40 +02:00
parent 17ed03af91
commit 4467853b71
6 changed files with 326 additions and 408 deletions

View File

@ -32,7 +32,6 @@ import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.text.Html;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.Spanned;
import android.text.method.LinkMovementMethod;
@ -94,6 +93,7 @@ import app.fedilab.android.helper.Helper;
import app.fedilab.android.helper.MastodonHelper;
import app.fedilab.android.helper.SpannableHelper;
import app.fedilab.android.helper.ThemeHelper;
import app.fedilab.android.ui.drawer.FieldAdapter;
import app.fedilab.android.ui.drawer.IdentityProofsAdapter;
import app.fedilab.android.ui.pageadapter.FedilabProfileTLPageAdapter;
import app.fedilab.android.viewmodel.mastodon.AccountsVM;
@ -357,43 +357,9 @@ public class ProfileActivity extends BaseActivity {
//Fields for profile
List<Field> fields = account.fields;
if (fields != null && fields.size() > 0) {
for (int i = 0; i < fields.size(); i++) {
LinearLayout field;
TextView labelView;
TextView valueView;
switch (i) {
case 1:
field = binding.field1;
labelView = binding.label1;
valueView = binding.value1;
break;
case 2:
field = binding.field2;
labelView = binding.label2;
valueView = binding.value2;
break;
case 3:
field = binding.field3;
labelView = binding.label3;
valueView = binding.value3;
break;
default:
field = binding.field4;
labelView = binding.label4;
valueView = binding.value4;
break;
}
field.setVisibility(View.VISIBLE);
if (fields.get(i).verified_at != null) {
valueView.setCompoundDrawablesWithIntrinsicBounds(null, null, ContextCompat.getDrawable(ProfileActivity.this, R.drawable.ic_baseline_verified_24), null);
fields.get(i).value_span.setSpan(new ForegroundColorSpan(ContextCompat.getColor(ProfileActivity.this, R.color.verified_text)), 0, fields.get(i).value_span.toString().length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
}
valueView.setText(fields.get(i).value_span != null ? fields.get(i).value_span : fields.get(i).value, TextView.BufferType.SPANNABLE);
valueView.setMovementMethod(LinkMovementMethod.getInstance());
labelView.setText(fields.get(i).name);
}
binding.fieldsContainer.setVisibility(View.VISIBLE);
FieldAdapter fieldAdapter = new FieldAdapter(fields);
binding.fieldsContainer.setAdapter(fieldAdapter);
binding.fieldsContainer.setLayoutManager(new LinearLayoutManager(ProfileActivity.this));
}
if (account.span_display_name == null && account.display_name == null) {
binding.accountDn.setText(account.username);

View File

@ -117,7 +117,6 @@ import java.security.Security;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
@ -1381,7 +1380,6 @@ public class Helper {
}
private static final List<String> present = new ArrayList<>();
private static int notificationId = 1;
/**
@ -1519,26 +1517,19 @@ public class Helper {
notificationBuilder.setLargeIcon(icon);
Notification summaryNotification = null;
if (!present.contains(account.mastodon_account.acct + "@" + account.instance)) {
summaryNotification = new NotificationCompat.Builder(context, channelId)
.setContentTitle(title)
.setContentText(channelTitle)
.setContentIntent(pIntent)
.setLargeIcon(icon)
.setSmallIcon(R.drawable.ic_notification)
.setStyle(new NotificationCompat.BigTextStyle().bigText(message))
.setGroup(account.mastodon_account.acct + "@" + account.instance)
.setGroupSummary(true)
.build();
present.add(account.mastodon_account.acct + "@" + account.instance);
}
Notification summaryNotification = summaryNotification = new NotificationCompat.Builder(context, channelId)
.setContentTitle(title)
.setContentText(channelTitle)
.setContentIntent(pIntent)
.setLargeIcon(icon)
.setSmallIcon(R.drawable.ic_notification)
.setStyle(new NotificationCompat.BigTextStyle().bigText(message))
.setGroup(account.mastodon_account.acct + "@" + account.instance)
.setGroupSummary(true)
.build();
notificationManager.notify(notificationId++, notificationBuilder.build());
if (summaryNotification != null) {
notificationManager.notify(0, summaryNotification);
}
notificationManager.notify(0, summaryNotification);
}
public static void transfertIfExist(Context context) {

View File

@ -0,0 +1,85 @@
package app.fedilab.android.ui.drawer;
/* Copyright 2022 Thomas Schneider
*
* This file is a part of Fedilab
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
* License, or (at your option) any later version.
*
* Fedilab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details.
*
* You should have received a copy of the GNU General Public License along with Fedilab; if not,
* see <http://www.gnu.org/licenses>. */
import android.content.Context;
import android.text.Spannable;
import android.text.method.LinkMovementMethod;
import android.text.style.ForegroundColorSpan;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.RecyclerView;
import java.util.List;
import app.fedilab.android.R;
import app.fedilab.android.client.entities.api.Field;
import app.fedilab.android.databinding.DrawerFieldBinding;
public class FieldAdapter extends RecyclerView.Adapter<FieldAdapter.FieldViewHolder> {
private final List<Field> fields;
private Context context;
public FieldAdapter(List<Field> fields) {
this.fields = fields;
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public int getItemCount() {
return fields.size();
}
@NonNull
@Override
public FieldViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
context = parent.getContext();
DrawerFieldBinding itemBinding = DrawerFieldBinding.inflate(LayoutInflater.from(parent.getContext()), parent, false);
return new FieldViewHolder(itemBinding);
}
@Override
public void onBindViewHolder(@NonNull FieldViewHolder holder, int position) {
Field field = fields.get(position);
if (field.verified_at != null) {
holder.binding.value.setCompoundDrawablesWithIntrinsicBounds(null, null, ContextCompat.getDrawable(context, R.drawable.ic_baseline_verified_24), null);
field.value_span.setSpan(new ForegroundColorSpan(ContextCompat.getColor(context, R.color.verified_text)), 0, field.value_span.toString().length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
}
holder.binding.value.setText(field.value_span != null ? field.value_span : field.value, TextView.BufferType.SPANNABLE);
holder.binding.value.setMovementMethod(LinkMovementMethod.getInstance());
holder.binding.label.setText(field.name);
}
public static class FieldViewHolder extends RecyclerView.ViewHolder {
DrawerFieldBinding binding;
FieldViewHolder(DrawerFieldBinding itemView) {
super(itemView.getRoot());
binding = itemView;
}
}
}

View File

@ -20,9 +20,11 @@ import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.service.notification.StatusBarNotification;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@ -179,8 +181,16 @@ public class FragmentMastodonNotification extends Fragment implements Notificati
@Override
public void onResume() {
super.onResume();
NotificationManager notificationManager = (NotificationManager) requireActivity().getApplicationContext().getSystemService(Context.NOTIFICATION_SERVICE);
notificationManager.cancel(Helper.NOTIFICATION_USER_NOTIF);
NotificationManager mNotificationManager = (NotificationManager) requireActivity().getSystemService(Context.NOTIFICATION_SERVICE);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && BaseMainActivity.currentAccount != null && BaseMainActivity.currentAccount.mastodon_account != null) {
for (StatusBarNotification statusBarNotification : mNotificationManager.getActiveNotifications()) {
if ((BaseMainActivity.currentAccount.mastodon_account.acct + "@" + BaseMainActivity.currentAccount.instance).equals(statusBarNotification.getGroupKey())) {
mNotificationManager.cancel(statusBarNotification.getId());
}
}
} else {
mNotificationManager.cancelAll();
}
}

View File

@ -42,9 +42,9 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:id="@+id/profile_container"
android:layout_height="wrap_content"
android:paddingTop="?attr/actionBarSize"
app:layout_collapseMode="parallax">
android:paddingTop="?attr/actionBarSize">
<com.google.android.material.card.MaterialCardView
android:id="@+id/banner_container"
@ -157,351 +157,186 @@
app:layout_constraintTop_toBottomOf="@id/account_dn"
tools:text="\@username\@instance.test" />
<LinearLayout
android:id="@+id/main_header_container"
android:layout_width="match_parent"
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/names_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
android:orientation="vertical"
android:paddingBottom="?actionBarSize"
android:paddingTop="8dp"
app:layout_collapseMode="parallax"
app:layout_constraintTop_toBottomOf="@id/account_un">
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/account_un">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp">
<LinearLayout
android:id="@+id/names_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:background="@drawable/red_border"
android:text="Peertube"
android:textColor="@color/red_1"
android:visibility="gone"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/account_bot"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:background="@drawable/blue_border"
android:text="@string/bot"
android:textColor="@color/mastodonC4"
android:visibility="gone" />
<TextView
android:id="@+id/temp_mute"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:textColor="@color/red"
android:visibility="gone" />
<TextView
android:id="@+id/account_moved"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="5dp"
android:drawablePadding="4dp"
android:gravity="center"
android:textSize="16sp"
android:visibility="gone" />
</LinearLayout>
<ImageView
android:id="@+id/identity_proofs_indicator"
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_marginStart="10dp"
android:contentDescription="@string/identity_proofs"
android:padding="8dp"
android:scaleType="fitCenter"
android:src="@drawable/ic_baseline_verified_24"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@id/names_container"
app:layout_constraintStart_toEndOf="@id/names_container"
app:layout_constraintTop_toTopOf="@id/names_container" />
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/account_note"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:gravity="center"
android:padding="10dp"
android:textIsSelectable="true" />
<TextView
android:id="@+id/personal_note"
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:drawablePadding="5dp"
android:background="@drawable/red_border"
android:text="Peertube"
android:textColor="@color/red_1"
android:visibility="gone"
tools:ignore="HardcodedText" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/account_bot"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:background="@drawable/blue_border"
android:text="@string/bot"
android:textColor="@color/mastodonC4"
android:visibility="gone" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/temp_mute"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="10dp"
android:text="@string/action_add_notes"
android:textIsSelectable="true"
app:drawableStartCompat="@drawable/ic_baseline_note_24" />
android:textColor="@color/red"
android:visibility="gone" />
<HorizontalScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:fillViewport="true"
android:scrollbars="none">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="horizontal">
<TextView
android:id="@+id/instance_info"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="3dp"
android:layout_marginEnd="3dp"
android:background="@drawable/blue_border"
android:singleLine="true"
android:textColor="@color/mastodonC4"
android:visibility="gone" />
<TextView
android:id="@+id/account_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="3dp"
android:layout_marginEnd="3dp"
android:background="@drawable/blue_border"
android:singleLine="true"
android:textColor="@color/mastodonC4"
android:visibility="gone" />
<TextView
android:id="@+id/account_followed_by"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="3dp"
android:layout_marginEnd="3dp"
android:background="@drawable/green_border"
android:singleLine="true"
android:text="@string/followed_by"
android:textColor="@color/verified_text"
android:visibility="gone" />
<TextView
android:id="@+id/account_follow_request"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="3dp"
android:layout_marginEnd="3dp"
android:background="@drawable/blue_border"
android:singleLine="true"
android:text="@string/request_sent"
android:textColor="@color/mastodonC4"
android:visibility="gone" />
</LinearLayout>
</HorizontalScrollView>
<!-- Fields container -->
<LinearLayout
android:id="@+id/fields_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone">
<!-- Fields 1 to 4 -->
<LinearLayout
android:id="@+id/field1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:visibility="gone">
<TextView
android:id="@+id/label1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="1"
android:gravity="center"
android:minHeight="20dp"
android:padding="5dp"
android:paddingTop="10dp"
android:paddingBottom="10dp" />
<LinearLayout
android:id="@+id/value1BG"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:orientation="vertical">
<TextView
android:id="@+id/value1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:textIsSelectable="true" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/field2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:visibility="gone">
<TextView
android:id="@+id/label2"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="1"
android:gravity="center"
android:minHeight="20dp"
android:padding="10dp"
android:paddingTop="5dp"
android:paddingBottom="5dp" />
<LinearLayout
android:id="@+id/value2BG"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:orientation="vertical">
<TextView
android:id="@+id/value2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:textIsSelectable="true" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/field3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:visibility="gone">
<TextView
android:id="@+id/label3"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="1"
android:gravity="center"
android:minHeight="20dp"
android:padding="10dp"
android:paddingTop="5dp"
android:paddingBottom="5dp" />
<LinearLayout
android:id="@+id/value3BG"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:orientation="vertical">
<TextView
android:id="@+id/value3"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:textIsSelectable="true" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/field4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:visibility="gone">
<TextView
android:id="@+id/label4"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="1"
android:gravity="center"
android:minHeight="20dp"
android:padding="10dp"
android:paddingTop="5dp"
android:paddingBottom="5dp" />
<LinearLayout
android:id="@+id/value4BG"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:orientation="vertical">
<TextView
android:id="@+id/value4"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:textIsSelectable="true" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<!-- End Fields container -->
<TextView
android:id="@+id/warning_message"
android:layout_width="match_parent"
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/account_moved"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="5dp"
android:drawablePadding="4dp"
android:gravity="center"
android:text="@string/disclaimer_full"
android:textColor="@color/dark_text"
android:textSize="16sp"
android:visibility="gone" />
</LinearLayout>
</androidx.appcompat.widget.LinearLayoutCompat>
<ImageView
android:id="@+id/identity_proofs_indicator"
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_marginStart="10dp"
android:contentDescription="@string/identity_proofs"
android:padding="8dp"
android:scaleType="fitCenter"
android:src="@drawable/ic_baseline_verified_24"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@id/names_container"
app:layout_constraintStart_toEndOf="@id/names_container"
app:layout_constraintTop_toTopOf="@id/names_container" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/account_note"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:gravity="center"
android:padding="10dp"
android:textIsSelectable="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/names_container" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/personal_note"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:drawablePadding="5dp"
android:gravity="center"
android:padding="10dp"
android:text="@string/action_add_notes"
android:textIsSelectable="true"
app:drawableStartCompat="@drawable/ic_baseline_note_24"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/account_note" />
<HorizontalScrollView
android:id="@+id/info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:fillViewport="true"
android:scrollbars="none"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/personal_note">
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/instance_info"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="3dp"
android:layout_marginEnd="3dp"
android:background="@drawable/blue_border"
android:singleLine="true"
android:textColor="@color/mastodonC4"
android:visibility="gone" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/account_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="3dp"
android:layout_marginEnd="3dp"
android:background="@drawable/blue_border"
android:singleLine="true"
android:textColor="@color/mastodonC4"
android:visibility="gone" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/account_followed_by"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="3dp"
android:layout_marginEnd="3dp"
android:background="@drawable/green_border"
android:singleLine="true"
android:text="@string/followed_by"
android:textColor="@color/verified_text"
android:visibility="gone" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/account_follow_request"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="3dp"
android:layout_marginEnd="3dp"
android:background="@drawable/blue_border"
android:singleLine="true"
android:text="@string/request_sent"
android:textColor="@color/mastodonC4"
android:visibility="gone" />
</androidx.appcompat.widget.LinearLayoutCompat>
</HorizontalScrollView>
<!-- Fields container -->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/fields_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/info" />
<!-- End Fields container -->
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/warning_message"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="@string/disclaimer_full"
android:textColor="@color/dark_text"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/fields_container" />
</androidx.constraintlayout.widget.ConstraintLayout>
@ -510,6 +345,7 @@
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:backgroundTint="?colorPrimaryDark"
app:layout_scrollFlags="scroll|enterAlways"
app:layout_collapseMode="pin">
<androidx.appcompat.widget.AppCompatImageView
@ -532,14 +368,6 @@
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<com.google.android.material.tabs.TabLayout
android:id="@+id/account_tabLayout"
android:layout_width="match_parent"
@ -547,11 +375,12 @@
android:background="?backgroundColorLight"
app:tabGravity="fill"
app:tabMode="fixed" />
</com.google.android.material.appbar.AppBarLayout>
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/account_viewpager"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/account_viewpager"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/field1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/label"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="1"
android:gravity="center"
android:minHeight="20dp"
android:padding="5dp"
android:paddingTop="10dp"
android:paddingBottom="10dp" />
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/valueBG"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:orientation="vertical">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/value"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:textIsSelectable="true" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>