1
0
Fork 1

Further redesigning contact and conference details

This commit is contained in:
Arne 2023-10-19 22:47:32 +02:00
parent 5c6797326b
commit 2ca5abf6a2
3 changed files with 63 additions and 120 deletions

View file

@ -330,7 +330,7 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp
this.showDynamicTags = preferences.getBoolean(SettingsActivity.SHOW_DYNAMIC_TAGS, getResources().getBoolean(R.bool.show_dynamic_tags));
this.showLastSeen = preferences.getBoolean("last_activity", getResources().getBoolean(R.bool.last_activity));
}
binding.mediaWrapper.setVisibility((Compatibility.hasStoragePermission(this) || Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) ? View.VISIBLE : View.GONE);
binding.mediaWrapper.setVisibility((Compatibility.hasStoragePermission(this) || Compatibility.runsThirtyThree()) ? View.VISIBLE : View.GONE);
mMediaAdapter.setAttachments(Collections.emptyList());
}

View file

@ -1,13 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
xmlns:app="http://schemas.android.com/apk/res-auto" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/color_background_tertiary"
android:background="?attr/color_background_secondary"
android:orientation="vertical">
<include
@ -24,17 +22,6 @@
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/activity_horizontal_margin"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginTop="@dimen/activity_vertical_margin"
android:layout_marginEnd="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_marginBottom="@dimen/activity_vertical_margin"
card_view:cardBackgroundColor="?attr/color_background_secondary">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -45,7 +32,7 @@
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical"
android:padding="@dimen/card_padding_regular">
android:padding="8dp">
<RelativeLayout
android:layout_width="match_parent"
@ -116,7 +103,7 @@
android:layout_marginStart="-2dp"
android:layout_marginLeft="-2dp"
android:layout_marginTop="4dp"
android:layout_marginBottom="4dp"
android:layout_marginBottom="27dp"
android:layout_gravity="center_horizontal"
android:orientation="horizontal" />
@ -126,10 +113,13 @@
android:hint="@string/tags"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:layout_marginBottom="27dp"
android:layout_marginLeft="-4dp"
android:layout_marginTop="-4dp" />
<View
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/details_lastseen"
@ -224,69 +214,37 @@
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="@dimen/card_padding_list">
<Button
android:id="@+id/add_contact_button"
style="@style/Widget.Conversations.Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="24dp"
android:layout_marginTop="14dp"
android:text="@string/add_to_contact_list" />
<TextView
android:id="@+id/details_account"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_marginTop="24dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="14dp"
android:layout_marginBottom="14dp"
android:text="@string/using_account"
android:textAppearance="@style/TextAppearance.Conversations.Caption"
android:visibility="visible" />
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="@+id/profile"
<View
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/activity_vertical_margin"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_marginTop="@dimen/activity_vertical_margin"
card_view:cardBackgroundColor="?attr/color_background_secondary">
<ListView
android:id="@+id/profile_items"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:divider="@android:color/transparent"
android:dividerHeight="0dp" />
</androidx.cardview.widget.CardView>
android:layout_height="0.1dp"
android:background="?attr/text_Color_Main" />
<androidx.cardview.widget.CardView
android:id="@+id/media_wrapper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/activity_horizontal_margin"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginTop="@dimen/activity_vertical_margin"
android:layout_marginEnd="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_marginBottom="@dimen/activity_vertical_margin"
card_view:cardBackgroundColor="?attr/color_background_secondary">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:orientation="vertical" >
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/media"
@ -319,20 +277,35 @@
android:text="@string/view_media"
android:textColor="?attr/colorAccent" />
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
<View
android:layout_width="match_parent"
android:layout_height="0.1dp"
android:background="?attr/text_Color_Main" />
<androidx.cardview.widget.CardView
android:id="@+id/profile"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ListView
android:id="@+id/profile_items"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:divider="@android:color/transparent"
android:dividerHeight="0dp" />
</androidx.cardview.widget.CardView>
<View
android:layout_width="match_parent"
android:layout_height="0.1dp"
android:background="?attr/text_Color_Main" />
<androidx.cardview.widget.CardView
android:id="@+id/keys_wrapper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/activity_horizontal_margin"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginTop="@dimen/activity_vertical_margin"
android:layout_marginEnd="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_marginBottom="@dimen/activity_vertical_margin"
card_view:cardBackgroundColor="?attr/color_background_secondary">
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"

View file

@ -7,7 +7,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/color_background_tertiary"
android:background="?attr/color_background_secondary"
android:orientation="vertical">
<include
@ -24,17 +24,6 @@
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/activity_horizontal_margin"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginTop="@dimen/activity_vertical_margin"
android:layout_marginEnd="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_marginBottom="@dimen/activity_vertical_margin"
card_view:cardBackgroundColor="?attr/color_background_secondary">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -137,7 +126,7 @@
android:layout_marginBottom="4dp"
android:layout_marginLeft="-2dp"
android:layout_marginTop="4dp"
android:orientation="horizontal"></com.wefika.flowlayout.FlowLayout>
android:orientation="horizontal" />
</LinearLayout>
@ -309,22 +298,15 @@
android:textAppearance="@style/TextAppearance.Conversations.Body1" />
</RelativeLayout>
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="@dimen/card_padding_regular">
<Button
android:id="@+id/destroy"
style="@style/Widget.Conversations.Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="24dp"
android:layout_marginTop="14dp"
app:icon="@drawable/ic_delete_white_24dp"
app:iconTint="?attr/color_warning_button_text" />
@ -334,32 +316,25 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="24dp"
android:layout_marginTop="14dp"
android:text="@string/add_to_contact_list" />
<TextView
android:id="@+id/details_account"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_marginTop="24dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="14dp"
android:layout_marginBottom="14dp"
android:text="@string/using_account"
android:textAppearance="@style/TextAppearance.Conversations.Caption"
android:visibility="gone" />
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
<View
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/activity_horizontal_margin"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginTop="@dimen/activity_vertical_margin"
android:layout_marginEnd="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_marginBottom="@dimen/activity_vertical_margin"
card_view:cardBackgroundColor="?attr/color_background_secondary">
android:layout_height="0.1dp"
android:background="?attr/text_Color_Main" />
<LinearLayout
android:layout_width="match_parent"
@ -455,19 +430,16 @@
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
<View
android:layout_width="match_parent"
android:layout_height="0.1dp"
android:background="?attr/text_Color_Main" />
<androidx.cardview.widget.CardView
android:id="@+id/users_wrapper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/activity_horizontal_margin"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginTop="@dimen/activity_vertical_margin"
android:layout_marginEnd="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_marginBottom="@dimen/activity_vertical_margin"
card_view:cardBackgroundColor="?attr/color_background_secondary">
android:layout_height="wrap_content" >
<LinearLayout
android:layout_width="match_parent"
@ -532,17 +504,15 @@
</LinearLayout>
</androidx.cardview.widget.CardView>
<View
android:layout_width="match_parent"
android:layout_height="0.1dp"
android:background="?attr/text_Color_Main" />
<androidx.cardview.widget.CardView
android:id="@+id/media_wrapper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/activity_horizontal_margin"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginTop="@dimen/activity_vertical_margin"
android:layout_marginEnd="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_marginBottom="@dimen/activity_vertical_margin"
card_view:cardBackgroundColor="?attr/color_background_secondary">
android:layout_height="wrap_content" >
<LinearLayout
android:layout_width="match_parent"