diff options
Diffstat (limited to '')
21 files changed, 299 insertions, 230 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index b6934a323..d6b413b47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ #### Version 2.3.5 * start removing OTR +* rework conference and contact details (big avatar is available via long click) + #### Version 2.3.4 * fixes for Jingle IBB file transfer * fixes for repeated corrections filling up the database diff --git a/build.gradle b/build.gradle index c2cbdf2aa..06e2d8275 100644 --- a/build.gradle +++ b/build.gradle @@ -67,7 +67,6 @@ dependencies { implementation 'androidx.emoji:emoji:1.0.0' gitImplementation 'androidx.emoji:emoji-appcompat:1.0.0' gitImplementation 'androidx.emoji:emoji-bundled:1.0.0' - implementation 'androidx.exifinterface:exifinterface:1.0.0' implementation 'com.google.android.material:material:1.0.0' implementation 'androidx.cardview:cardview:1.0.0' implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.10.0' diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml index b821164eb..791def953 100644 --- a/src/main/AndroidManifest.xml +++ b/src/main/AndroidManifest.xml @@ -229,7 +229,7 @@ android:windowSoftInputMode="stateHidden" /> <activity android:name=".ui.ContactDetailsActivity" - android:label="@string/title_activity_contact_details" + android:label="@string/contact_details" android:windowSoftInputMode="stateHidden" /> <activity android:name=".ui.PublishProfilePictureActivity" diff --git a/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java b/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java index 580a61686..01fdb7c0e 100644 --- a/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java @@ -3,6 +3,8 @@ package de.pixart.messenger.ui; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; +import android.graphics.Color; +import android.graphics.Point; import android.graphics.PorterDuff; import android.os.Bundle; import android.text.Editable; @@ -13,6 +15,7 @@ import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.View.OnClickListener; +import android.widget.ImageView; import android.widget.Toast; import androidx.appcompat.app.AlertDialog; @@ -234,6 +237,18 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers intent.putExtra("uuid", mConversation.getUuid()); startActivity(intent); }); + this.binding.detailsMucAvatar.setOnLongClickListener(v -> { + ImageView view = new ImageView(ConferenceDetailsActivity.this); + view.setAdjustViewBounds(true); + view.setMaxHeight(R.dimen.avatar_big); + view.setMaxWidth(R.dimen.avatar_big); + view.setBackgroundColor(Color.WHITE); + AvatarWorkerTask.loadAvatar(mConversation, view, R.dimen.avatar_big); + AlertDialog.Builder builder = new AlertDialog.Builder(ConferenceDetailsActivity.this); + builder.setView(view); + builder.create().show(); + return true; + }); this.mAdvancedMode = getPreferences().getBoolean("advanced_muc_mode", false); this.binding.mucInfoMore.setVisibility(this.mAdvancedMode ? View.VISIBLE : View.GONE); this.binding.notificationStatusButton.setOnClickListener(this.mNotifyStatusClickListener); @@ -277,6 +292,17 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers binding.mediaWrapper.setVisibility(Compatibility.hasStoragePermission(this) ? View.VISIBLE : View.GONE); } + private boolean canChangeMUCAvatar() { + final MucOptions mucOptions = mConversation.getMucOptions(); + if (!mucOptions.hasVCards()) { + return false; + } else if (!mucOptions.getSelf().getAffiliation().ranks(MucOptions.Affiliation.OWNER)) { + return false; + } else { + return true; + } + } + @Override public boolean onOptionsItemSelected(MenuItem menuItem) { if (MenuDoubleTabUtil.shouldIgnoreTap()) { @@ -491,7 +517,7 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers this.binding.detailsAccount.setVisibility(View.GONE); } //todo add edit overlay to avatar and change layout - AvatarWorkerTask.loadAvatar(mConversation, binding.detailsMucAvatar, R.dimen.avatar_big); + AvatarWorkerTask.loadAvatar(mConversation, binding.detailsMucAvatar, R.dimen.avatar_on_details_screen_size, canChangeMUCAvatar()); AvatarWorkerTask.loadAvatar(mConversation.getAccount(), binding.yourPhoto, R.dimen.avatar_on_details_screen_size); String roomName = mucOptions.getName(); diff --git a/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java b/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java index 295153dc3..e7ff8996b 100644 --- a/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java @@ -5,6 +5,7 @@ import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; +import android.graphics.Color; import android.graphics.PorterDuff; import android.net.Uri; import android.os.Bundle; @@ -23,6 +24,7 @@ import android.view.View.OnClickListener; import android.widget.CompoundButton; import android.widget.CompoundButton.OnCheckedChangeListener; import android.widget.ImageButton; +import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; @@ -81,6 +83,7 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp private Conversation mConversation; ActivityContactDetailsBinding binding; private MediaAdapter mMediaAdapter; + private boolean mAdvancedMode = false; private DialogInterface.OnClickListener removeFromRoster = new DialogInterface.OnClickListener() { @Override @@ -270,7 +273,6 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp } } this.messageFingerprint = getIntent().getStringExtra("fingerprint"); - this.binding = DataBindingUtil.setContentView(this, R.layout.activity_contact_details); setSupportActionBar((Toolbar) binding.toolbar); configureActionBar(getSupportActionBar()); @@ -326,43 +328,60 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp case R.id.action_share_uri: shareLink(false); break; - case R.id.action_edit_contact: - Uri systemAccount = contact.getSystemAccount(); - if (systemAccount == null) { - quickEdit(contact.getServerName(), R.string.contact_name, value -> { - contact.setServerName(value); - ContactDetailsActivity.this.xmppConnectionService.pushContactToServer(contact); - populateView(); - return null; - }, true); - } else { - Intent intent = new Intent(Intent.ACTION_EDIT); - intent.setDataAndType(systemAccount, Contacts.CONTENT_ITEM_TYPE); - intent.putExtra("finishActivityOnSaveCompleted", true); - try { - startActivity(intent); - overridePendingTransition(R.animator.fade_in, R.animator.fade_out); - } catch (ActivityNotFoundException e) { - Toast.makeText(ContactDetailsActivity.this, R.string.no_application_found_to_view_contact, Toast.LENGTH_SHORT).show(); - } - } - break; case R.id.action_block: BlockContactDialog.show(this, contact); break; case R.id.action_unblock: BlockContactDialog.show(this, contact); break; + case R.id.action_advanced_mode: + this.mAdvancedMode = !menuItem.isChecked(); + menuItem.setChecked(this.mAdvancedMode); + getPreferences().edit().putBoolean("advanced_mode", mAdvancedMode).apply(); + invalidateOptionsMenu(); + refreshUi(); + break; } return super.onOptionsItemSelected(menuItem); } + private void editContact() { + Uri systemAccount = contact.getSystemAccount(); + if (systemAccount == null) { + quickEdit(contact.getServerName(), R.string.contact_name, value -> { + contact.setServerName(value); + ContactDetailsActivity.this.xmppConnectionService.pushContactToServer(contact); + populateView(); + return null; + }, true); + } else { + Intent intent = new Intent(Intent.ACTION_EDIT); + intent.setDataAndType(systemAccount, Contacts.CONTENT_ITEM_TYPE); + intent.putExtra("finishActivityOnSaveCompleted", true); + try { + startActivity(intent); + overridePendingTransition(R.animator.fade_in, R.animator.fade_out); + } catch (ActivityNotFoundException e) { + Toast.makeText(ContactDetailsActivity.this, R.string.no_application_found_to_view_contact, Toast.LENGTH_SHORT).show(); + } + } + } + + @Override + public boolean onPrepareOptionsMenu(Menu menu) { + MenuItem menuItemAdvancedMode = menu.findItem(R.id.action_advanced_mode); + menuItemAdvancedMode.setChecked(mAdvancedMode); + if (mConversation == null) { + return true; + } + return true; + } + @Override public boolean onCreateOptionsMenu(final Menu menu) { getMenuInflater().inflate(R.menu.contact_details, menu); MenuItem block = menu.findItem(R.id.action_block); MenuItem unblock = menu.findItem(R.id.action_unblock); - MenuItem edit = menu.findItem(R.id.action_edit_contact); if (contact == null) { return true; } @@ -377,9 +396,6 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp unblock.setVisible(false); block.setVisible(false); } - if (!contact.showInRoster()) { - edit.setVisible(false); - } return super.onCreateOptionsMenu(menu); } @@ -408,7 +424,7 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp ab.setDisplayShowCustomEnabled(true); TextView abtitle = findViewById(android.R.id.text1); TextView absubtitle = findViewById(android.R.id.text2); - abtitle.setText(EmojiWrapper.transform(contact.getDisplayName())); + abtitle.setText(R.string.contact_details); abtitle.setSelected(true); abtitle.setClickable(false); absubtitle.setVisibility(View.GONE); @@ -418,11 +434,8 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp invalidateOptionsMenu(); setTitle(contact.getDisplayName()); - if (contact.getServer().toString().toLowerCase().equals(accountJid.getDomain().toLowerCase())) { - binding.contactDisplayName.setText(contact.getDisplayName()); - } else { - binding.contactDisplayName.setText(contact.getJid().toString()); - } + binding.contactDisplayName.setText(contact.getDisplayName()); + this.binding.jid.setVisibility(this.mAdvancedMode ? View.VISIBLE : View.GONE); if (contact.showInRoster()) { binding.detailsSendPresence.setVisibility(View.VISIBLE); binding.detailsReceivePresence.setVisibility(View.VISIBLE); @@ -431,7 +444,10 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp binding.addContactButton.getBackground().setColorFilter(getWarningButtonColor(), PorterDuff.Mode.MULTIPLY); binding.detailsSendPresence.setOnCheckedChangeListener(null); binding.detailsReceivePresence.setOnCheckedChangeListener(null); - + binding.editContactNameButton.setVisibility(View.VISIBLE); + binding.editContactNameButton.setOnClickListener(view -> { + editContact(); + }); binding.addContactButton.setOnClickListener(view -> { final AlertDialog.Builder deleteFromRosterDialog = new AlertDialog.Builder(ContactDetailsActivity.this); deleteFromRosterDialog.setNegativeButton(getString(R.string.cancel), null) @@ -509,6 +525,7 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp binding.detailsSendPresence.setOnCheckedChangeListener(this.mOnSendCheckedChange); binding.detailsReceivePresence.setOnCheckedChangeListener(this.mOnReceiveCheckedChange); } else { + binding.editContactNameButton.setVisibility(View.GONE); binding.addContactButton.setVisibility(View.VISIBLE); binding.addContactButton.setText(getString(R.string.add_contact)); binding.addContactButton.getBackground().clearColorFilter(); @@ -537,7 +554,7 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp } } - binding.detailsContactjid.setText(IrregularUnicodeDetector.style(this, contact.getJid())); + binding.jid.setText(IrregularUnicodeDetector.style(this, contact.getJid())); String account; if (Config.DOMAIN_LOCK != null) { account = contact.getAccount().getJid().getLocal(); @@ -545,9 +562,20 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp account = contact.getAccount().getJid().asBareJid().toString(); } binding.detailsAccount.setText(getString(R.string.using_account, account)); - AvatarWorkerTask.loadAvatar(contact, binding.detailsContactBadge, R.dimen.avatar_big); + AvatarWorkerTask.loadAvatar(contact, binding.detailsContactBadge, R.dimen.avatar_on_details_screen_size); binding.detailsContactBadge.setOnClickListener(this.onBadgeClick); - + binding.detailsContactBadge.setOnLongClickListener(v -> { + ImageView view = new ImageView(ContactDetailsActivity.this); + view.setAdjustViewBounds(true); + view.setMaxHeight(R.dimen.avatar_big); + view.setMaxWidth(R.dimen.avatar_big); + view.setBackgroundColor(Color.WHITE); + AvatarWorkerTask.loadAvatar(mConversation, view, R.dimen.avatar_big); + AlertDialog.Builder builder = new AlertDialog.Builder(ContactDetailsActivity.this); + builder.setView(view); + builder.create().show(); + return true; + }); if (xmppConnectionService.multipleAccounts()) { binding.detailsAccount.setVisibility(View.VISIBLE); } else { diff --git a/src/main/res/layout/activity_contact_details.xml b/src/main/res/layout/activity_contact_details.xml index 9f6930ca5..5bd67d0b0 100644 --- a/src/main/res/layout/activity_contact_details.xml +++ b/src/main/res/layout/activity_contact_details.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <layout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/tools" xmlns:card_view="http://schemas.android.com/apk/res-auto"> <LinearLayout @@ -38,63 +39,69 @@ android:layout_height="wrap_content" android:orientation="vertical"> - <RelativeLayout + <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center_horizontal" android:orientation="vertical" android:padding="@dimen/card_padding_regular"> - <TextView - android:id="@+id/contact_display_name" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:textAppearance="@style/TextAppearance.Conversations.Title" /> - </RelativeLayout> - - <RelativeLayout - android:layout_width="fill_parent" - android:layout_height="wrap_content"> - - <LinearLayout + <RelativeLayout android:layout_width="match_parent" - android:layout_height="wrap_content" - android:gravity="center_horizontal" - android:orientation="vertical" - android:padding="@dimen/card_padding_regular"> - - <QuickContactBadge - android:id="@+id/details_contact_badge" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:adjustViewBounds="true" - android:background="?attr/color_border" - android:maxWidth="384dp" - android:maxHeight="384dp" - android:padding="1dp" - android:scaleType="centerCrop" /> + android:layout_height="wrap_content"> <LinearLayout - android:id="@+id/details_jidbox" - android:layout_width="match_parent" + android:id="@+id/details_display" + android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginTop="16dp" + android:layout_alignParentStart="true" + android:layout_alignParentLeft="true" + android:layout_toStartOf="@+id/edit_contact_name_button" + android:layout_toLeftOf="@+id/edit_contact_name_button" android:orientation="vertical"> - <TextView - android:id="@+id/details_contactjid" + <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="@string/account_settings_example_jabber_id" - android:textAppearance="@style/TextAppearance.Conversations.Title" - android:textIsSelectable="true" - android:visibility="gone" /> + android:orientation="horizontal"> + + <QuickContactBadge + android:id="@+id/details_contact_badge" + android:layout_width="@dimen/avatar_on_details_screen_size" + android:layout_height="@dimen/avatar_on_details_screen_size" + android:layout_marginEnd="@dimen/avatar_item_distance" + android:layout_marginRight="@dimen/avatar_item_distance" + android:adjustViewBounds="true" + android:background="?attr/color_border" + android:padding="1dp" + android:scaleType="centerCrop" /> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <TextView + android:id="@+id/contact_display_name" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textAppearance="@style/TextAppearance.Conversations.Title" /> + + <TextView + android:id="@+id/jid" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/account_settings_example_jabber_id" + android:textAppearance="@style/TextAppearance.Conversations.Body1" + android:textIsSelectable="true" + android:visibility="gone" /> + </LinearLayout> + </LinearLayout> <com.wefika.flowlayout.FlowLayout android:id="@+id/tags" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_gravity="center_horizontal" android:layout_marginStart="-2dp" android:layout_marginLeft="-2dp" android:layout_marginTop="4dp" @@ -105,7 +112,6 @@ android:id="@+id/details_lastseen" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_gravity="center_horizontal" android:layout_marginTop="4dp" android:layout_marginBottom="4dp" android:textAppearance="@style/TextAppearance.Conversations.Subhead" /> @@ -114,38 +120,51 @@ android:id="@+id/status_message" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_gravity="center_horizontal" android:layout_marginTop="4dp" android:layout_marginBottom="4dp" - android:gravity="center_horizontal" - android:textAppearance="@style/TextAppearance.Conversations.Body1" /> + android:textAppearance="@style/TextAppearance.Conversations.Subhead" /> <TextView android:id="@+id/resource" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_gravity="center_horizontal" android:layout_marginTop="4dp" android:layout_marginBottom="4dp" - android:gravity="center_horizontal" - android:textSize="?attr/TextSizeBody" - android:textStyle="italic" /> + android:textAppearance="@style/TextAppearance.Conversations.Status" /> + </LinearLayout> - <Button - android:id="@+id/add_contact_button" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_gravity="center_horizontal" - android:layout_marginTop="4dp" - android:layout_marginBottom="4dp" - android:text="@string/add_contact" /> + <ImageButton + android:id="@+id/edit_contact_name_button" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentTop="true" + android:layout_alignParentEnd="true" + android:layout_alignParentRight="true" + android:alpha="?attr/icon_alpha" + android:background="?attr/selectableItemBackgroundBorderless" + android:padding="@dimen/image_button_padding" + android:src="?attr/icon_edit_body" /> + </RelativeLayout> + + <RelativeLayout + android:id="@+id/contact_settings" + android:layout_width="fill_parent" + android:layout_height="wrap_content"> + + <LinearLayout + android:id="@+id/details_jidbox" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginTop="4dp" + android:orientation="vertical"> <CheckBox android:id="@+id/details_send_presence" style="@style/Widget.Conversations.CheckBox" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginTop="4dp" + android:layout_marginStart="-6dp" + android:layout_marginLeft="-6dp" android:text="@string/send_presence_updates" android:textAppearance="@style/TextAppearance.Conversations.Body1" /> @@ -154,78 +173,72 @@ style="@style/Widget.Conversations.CheckBox" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_marginStart="-6dp" + android:layout_marginLeft="-6dp" android:text="@string/receive_presence_updates" android:textAppearance="@style/TextAppearance.Conversations.Body1" /> - </LinearLayout> - <LinearLayout - android:layout_width="match_parent" + <RelativeLayout + android:layout_width="fill_parent" android:layout_height="wrap_content" - android:orientation="vertical" - android:padding="@dimen/card_padding_list"> + android:layout_below="@+id/details_jidbox"> <TextView - android:id="@+id/details_account" + android:id="@+id/notification_status_text" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_gravity="end" - android:layout_marginTop="24dp" - android:text="@string/using_account" - android:textAppearance="@style/TextAppearance.Conversations.Caption" - android:visibility="visible" /> - </LinearLayout> - </LinearLayout> - </RelativeLayout> - </LinearLayout> - </androidx.cardview.widget.CardView> - - <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"> - - <RelativeLayout - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:layout_alignParentStart="true" - android:layout_alignParentLeft="true" - android:padding="@dimen/card_padding_regular" - android:touchscreenBlocksFocus="true"> + android:layout_alignParentStart="true" + android:layout_alignParentLeft="true" + android:layout_centerVertical="true" + android:layout_toStartOf="@+id/notification_status_button" + android:layout_toLeftOf="@+id/notification_status_button" + android:text="@string/notify_on_all_messages" + android:textSize="?attr/TextSizeBody" /> + + <ImageButton + android:id="@+id/notification_status_button" + style="?android:attr/buttonStyleSmall" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentEnd="true" + android:layout_alignParentRight="true" + android:layout_centerVertical="true" + android:layout_gravity="center_horizontal" + android:alpha="?attr/icon_alpha" + android:background="?attr/selectableItemBackgroundBorderless" + android:padding="@dimen/image_button_padding" + android:src="@drawable/ic_notifications_black_24dp" /> + </RelativeLayout> + </RelativeLayout> + </LinearLayout> - <TextView - android:id="@+id/notification_status_text" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentStart="true" - android:layout_alignParentLeft="true" - android:layout_centerVertical="true" - android:layout_toStartOf="@+id/notification_status_button" - android:layout_toLeftOf="@+id/notification_status_button" - android:text="@string/notify_on_all_messages" - android:textSize="?attr/TextSizeBody" /> - - <ImageButton - android:id="@+id/notification_status_button" - style="?android:attr/buttonStyleSmall" - android:layout_width="wrap_content" + <LinearLayout + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_alignParentEnd="true" - android:layout_alignParentRight="true" - android:layout_centerVertical="true" - android:layout_gravity="center_horizontal" - android:alpha="?attr/icon_alpha" - android:background="?attr/selectableItemBackgroundBorderless" - android:padding="@dimen/image_button_padding" - android:src="@drawable/ic_notifications_black_24dp" /> - </RelativeLayout> + android:orientation="vertical" + android:padding="@dimen/card_padding_list"> + + <Button + android:id="@+id/add_contact_button" + style="?android:attr/buttonStyleSmall" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:layout_marginTop="24dp" + 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:text="@string/using_account" + android:textAppearance="@style/TextAppearance.Conversations.Caption" + android:visibility="visible" /> + </LinearLayout> + </LinearLayout> </androidx.cardview.widget.CardView> <androidx.cardview.widget.CardView @@ -307,8 +320,8 @@ <LinearLayout android:layout_width="wrap_content" android:layout_height="match_parent" - android:layout_marginTop="8dp" android:layout_gravity="end" + android:layout_marginTop="8dp" android:orientation="horizontal"> <Button diff --git a/src/main/res/layout/activity_muc_details.xml b/src/main/res/layout/activity_muc_details.xml index 3dc518796..523b6829e 100644 --- a/src/main/res/layout/activity_muc_details.xml +++ b/src/main/res/layout/activity_muc_details.xml @@ -60,28 +60,51 @@ android:layout_toLeftOf="@+id/edit_muc_name_button" android:orientation="vertical"> - <TextView - android:id="@+id/muc_title" - android:layout_width="wrap_content" + <LinearLayout + android:layout_width="match_parent" android:layout_height="wrap_content" - android:textAppearance="@style/TextAppearance.Conversations.Title" /> + android:orientation="horizontal"> + + <com.makeramen.roundedimageview.RoundedImageView + android:id="@+id/details_muc_avatar" + android:layout_width="@dimen/avatar_on_details_screen_size" + android:layout_height="@dimen/avatar_on_details_screen_size" + android:layout_marginEnd="@dimen/avatar_item_distance" + android:layout_marginRight="@dimen/avatar_item_distance" + android:padding="1dp" + android:scaleType="centerCrop" + app:riv_corner_radius="@dimen/rounded_image_border" /> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <TextView + android:id="@+id/muc_title" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textAppearance="@style/TextAppearance.Conversations.Title" /> + + <TextView + android:id="@+id/jid" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/account_settings_example_jabber_id" + android:textAppearance="@style/TextAppearance.Conversations.Body1" + android:textIsSelectable="true" + android:visibility="gone" /> + </LinearLayout> + </LinearLayout> <TextView android:id="@+id/muc_subject" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_marginTop="@dimen/list_padding" android:autoLink="web" android:textAppearance="@style/TextAppearance.Conversations.Subhead" /> - <TextView - android:id="@+id/jid" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/account_settings_example_jabber_id" - android:textAppearance="@style/TextAppearance.Conversations.Body1" - android:textIsSelectable="true" - android:visibility="gone" /> - </LinearLayout> <LinearLayout @@ -139,27 +162,6 @@ </RelativeLayout> <RelativeLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:gravity="center_horizontal" - android:orientation="vertical" - android:paddingTop="@dimen/card_padding_regular"> - - <com.makeramen.roundedimageview.RoundedImageView - android:id="@+id/details_muc_avatar" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginEnd="@dimen/avatar_item_distance" - android:layout_marginRight="@dimen/avatar_item_distance" - android:adjustViewBounds="true" - android:maxWidth="384dp" - android:maxHeight="384dp" - android:padding="1dp" - android:scaleType="centerCrop" - app:riv_corner_radius="@dimen/rounded_image_border" /> - </RelativeLayout> - - <RelativeLayout android:id="@+id/muc_settings" android:layout_width="fill_parent" android:layout_height="wrap_content"> @@ -279,7 +281,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" - android:padding="@dimen/card_padding_list"> + android:padding="@dimen/card_padding_regular"> <Button android:id="@+id/destroy" @@ -289,6 +291,15 @@ android:layout_gravity="center_horizontal" android:layout_marginTop="24dp" /> + <Button + android:id="@+id/add_contact_button" + style="?android:attr/buttonStyleSmall" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:layout_marginTop="24dp" + android:text="@string/add_to_contact_list" /> + <TextView android:id="@+id/details_account" android:layout_width="wrap_content" @@ -332,8 +343,8 @@ <com.makeramen.roundedimageview.RoundedImageView android:id="@+id/your_photo" - android:layout_width="72dp" - android:layout_height="72dp" + android:layout_width="@dimen/avatar_on_details_screen_size" + android:layout_height="@dimen/avatar_on_details_screen_size" android:layout_alignParentStart="true" android:layout_alignParentLeft="true" android:layout_alignParentEnd="false" @@ -394,15 +405,6 @@ android:layout_gravity="center_horizontal" android:layout_marginTop="24dp" /> - <Button - android:id="@+id/add_contact_button" - style="?android:attr/buttonStyleSmall" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_gravity="center_horizontal" - android:layout_marginTop="24dp" - android:text="@string/add_to_contact_list" /> - </LinearLayout> </LinearLayout> </androidx.cardview.widget.CardView> diff --git a/src/main/res/menu/contact_details.xml b/src/main/res/menu/contact_details.xml index b9268e4f9..f8750da96 100644 --- a/src/main/res/menu/contact_details.xml +++ b/src/main/res/menu/contact_details.xml @@ -3,18 +3,11 @@ xmlns:app="http://schemas.android.com/apk/res-auto"> <item - android:id="@+id/action_edit_contact" - android:icon="?attr/icon_edit" - android:orderInCategory="10" - app:showAsAction="always" - android:title="@string/action_edit_contact" /> - - <item android:id="@+id/action_share" android:icon="@drawable/ic_share_white_24dp" android:orderInCategory="15" - app:showAsAction="always" - android:title="@string/share_uri_with"> + android:title="@string/share_uri_with" + app:showAsAction="always"> <menu> <item android:id="@+id/action_share_uri" @@ -30,16 +23,22 @@ <item android:id="@+id/action_block" - android:orderInCategory="72" - app:showAsAction="always" android:icon="@drawable/ic_speaker_notes_off_white_24dp" - android:title="@string/action_block_contact" /> + android:orderInCategory="72" + android:title="@string/action_block_contact" + app:showAsAction="always" /> <item android:id="@+id/action_unblock" - android:orderInCategory="73" - app:showAsAction="always" android:icon="@drawable/ic_speaker_notes_white_24dp" - android:title="@string/action_unblock_contact" /> - + android:orderInCategory="73" + android:title="@string/action_unblock_contact" + app:showAsAction="always" /> + <item + android:id="@+id/action_advanced_mode" + android:checkable="true" + android:checked="false" + android:orderInCategory="85" + android:title="@string/advanced_mode" + app:showAsAction="never" /> </menu>
\ No newline at end of file diff --git a/src/main/res/values-ar/strings.xml b/src/main/res/values-ar/strings.xml index aee69f60a..650cbd353 100644 --- a/src/main/res/values-ar/strings.xml +++ b/src/main/res/values-ar/strings.xml @@ -18,7 +18,7 @@ <string name="title_activity_manage_accounts">إدارة الحسابات</string> <string name="title_activity_settings">الإعدادات</string> <string name="conference_details">تفاصيل فريق المحادثة</string> - <string name="title_activity_contact_details">بيانات المُراسِل</string> + <string name="contact_details">بيانات المُراسِل</string> <string name="title_activity_start_conversation">ابدأ محادثة</string> <string name="title_activity_choose_contact">إختر مُراسلك</string> <string name="title_activity_choose_contacts">اختر جهات الاتصال</string> diff --git a/src/main/res/values-az/strings.xml b/src/main/res/values-az/strings.xml index c5f164a35..41f49a0ec 100644 --- a/src/main/res/values-az/strings.xml +++ b/src/main/res/values-az/strings.xml @@ -18,7 +18,7 @@ <string name="title_activity_manage_accounts">Hesabları idarә et</string> <string name="title_activity_settings">Tənzimləmələr</string> <string name="conference_details">Qrup söhbəti təfsilatları</string> - <string name="title_activity_contact_details">Şəxs təfsilatı</string> + <string name="contact_details">Şəxs təfsilatı</string> <string name="title_activity_sharewith">Bu danışıqla paylaş</string> <string name="title_activity_start_conversation">Danışığa başla</string> <string name="title_activity_choose_contact">Şəxs seç</string> diff --git a/src/main/res/values-bg/strings.xml b/src/main/res/values-bg/strings.xml index aaf279900..9bdf21d40 100644 --- a/src/main/res/values-bg/strings.xml +++ b/src/main/res/values-bg/strings.xml @@ -18,7 +18,7 @@ <string name="title_activity_manage_accounts">Управление на профилите</string> <string name="title_activity_settings">Настройки</string> <string name="conference_details">Подробности за групов чат</string> - <string name="title_activity_contact_details">Данни за контакта</string> + <string name="contact_details">Данни за контакта</string> <string name="title_activity_sharewith">Сподели със разговор</string> <string name="title_activity_start_conversation">Започнете разговор</string> <string name="title_activity_choose_contact">Изберете контакт</string> diff --git a/src/main/res/values-ca/strings.xml b/src/main/res/values-ca/strings.xml index 2e7578e15..68193b730 100644 --- a/src/main/res/values-ca/strings.xml +++ b/src/main/res/values-ca/strings.xml @@ -18,7 +18,7 @@ <string name="title_activity_manage_accounts">Gestionar comptes</string> <string name="title_activity_settings">Ajustos</string> <string name="conference_details">Detalls del grupo de xat</string> - <string name="title_activity_contact_details">Detalls del contacte</string> + <string name="contact_details">Detalls del contacte</string> <string name="title_activity_sharewith">Compartir una conversa</string> <string name="title_activity_start_conversation">Iniciar conversa</string> <string name="title_activity_choose_contact">Escollir contacte</string> diff --git a/src/main/res/values-de/strings.xml b/src/main/res/values-de/strings.xml index 60bf7c18c..730ca1352 100644 --- a/src/main/res/values-de/strings.xml +++ b/src/main/res/values-de/strings.xml @@ -18,7 +18,7 @@ <string name="title_activity_manage_accounts">Profile verwalten</string> <string name="title_activity_settings">Einstellungen</string> <string name="conference_details">Gruppenchat-Details</string> - <string name="title_activity_contact_details">Kontakt-Details</string> + <string name="contact_details">Kontakt-Details</string> <string name="title_activity_sharewith">Mit Unterhaltung teilen</string> <string name="title_activity_start_conversation">Unterhaltung beginnen</string> <string name="title_activity_choose_contact">Kontakt auswählen</string> diff --git a/src/main/res/values-es/strings.xml b/src/main/res/values-es/strings.xml index 54dad4aa7..2d21bad0e 100644 --- a/src/main/res/values-es/strings.xml +++ b/src/main/res/values-es/strings.xml @@ -18,7 +18,7 @@ <string name="title_activity_manage_accounts">Gestionar cuentas</string> <string name="title_activity_settings">Ajustes</string> <string name="conference_details">Detalles del grupo de chat</string> - <string name="title_activity_contact_details">Detalles del contacto</string> + <string name="contact_details">Detalles del contacto</string> <string name="title_activity_sharewith">Compartir con conversación</string> <string name="title_activity_start_conversation">Iniciar conversación</string> <string name="title_activity_choose_contact">Elegir contacto</string> diff --git a/src/main/res/values-fr/strings.xml b/src/main/res/values-fr/strings.xml index dc011ddf6..0e871af60 100644 --- a/src/main/res/values-fr/strings.xml +++ b/src/main/res/values-fr/strings.xml @@ -18,7 +18,7 @@ <string name="title_activity_manage_accounts">Gestion des comptes</string> <string name="title_activity_settings">Paramètres</string> <string name="conference_details">Détails du groupe de discussion</string> - <string name="title_activity_contact_details">Détails du contact</string> + <string name="contact_details">Détails du contact</string> <string name="title_activity_sharewith">Partager avec la conversation</string> <string name="title_activity_start_conversation">Démarrer une conversation</string> <string name="title_activity_choose_contact">Choix du contact</string> diff --git a/src/main/res/values-it/strings.xml b/src/main/res/values-it/strings.xml index 25750e44b..5ade8ac8d 100644 --- a/src/main/res/values-it/strings.xml +++ b/src/main/res/values-it/strings.xml @@ -18,7 +18,7 @@ <string name="title_activity_manage_accounts">Gestisci account</string> <string name="title_activity_settings">Impostazioni</string> <string name="conference_details">Dettagli della conversazione di gruppo</string> - <string name="title_activity_contact_details">Dettagli del contato</string> + <string name="contact_details">Dettagli del contato</string> <string name="title_activity_sharewith">Condividi con la conversazione</string> <string name="title_activity_start_conversation">Inizia conversazione</string> <string name="title_activity_choose_contact">Scegli un contatto</string> diff --git a/src/main/res/values-pl/strings.xml b/src/main/res/values-pl/strings.xml index dba966179..55ceac5d0 100644 --- a/src/main/res/values-pl/strings.xml +++ b/src/main/res/values-pl/strings.xml @@ -18,7 +18,7 @@ <string name="title_activity_manage_accounts">Zarządzaj kontami</string> <string name="title_activity_settings">Ustawienia</string> <string name="conference_details">Szczegóły czatu grupowego</string> - <string name="title_activity_contact_details">Szczegóły kontaktu</string> + <string name="contact_details">Szczegóły kontaktu</string> <string name="title_activity_sharewith">Udostępnij w konwersacji</string> <string name="title_activity_start_conversation">Rozpocznij konwersację</string> <string name="title_activity_choose_contact">Wybierz kontakt</string> diff --git a/src/main/res/values-ru/strings.xml b/src/main/res/values-ru/strings.xml index 1b1e8806d..dfd447122 100644 --- a/src/main/res/values-ru/strings.xml +++ b/src/main/res/values-ru/strings.xml @@ -18,7 +18,7 @@ <string name="title_activity_manage_accounts">Управление аккаунтами</string> <string name="title_activity_settings">Настройки</string> <string name="conference_details">Информация о конференции</string> - <string name="title_activity_contact_details">Сведения о контакте</string> + <string name="contact_details">Сведения о контакте</string> <string name="title_activity_sharewith">Поделиться с разговором</string> <string name="title_activity_start_conversation">Начать беседу</string> <string name="title_activity_choose_contact">Выбрать контакт</string> diff --git a/src/main/res/values-uk/strings.xml b/src/main/res/values-uk/strings.xml index 2fe86289b..8a0401e66 100644 --- a/src/main/res/values-uk/strings.xml +++ b/src/main/res/values-uk/strings.xml @@ -18,7 +18,7 @@ <string name="title_activity_manage_accounts">Впорядкувати облікові записи</string> <string name="title_activity_settings">Налаштування</string> <string name="conference_details">Деталі групи</string> - <string name="title_activity_contact_details">Переглянути деталі контакту</string> + <string name="contact_details">Переглянути деталі контакту</string> <string name="title_activity_sharewith">Поділитися в Розмови</string> <string name="title_activity_start_conversation">Почати розмову</string> <string name="title_activity_choose_contact">Вибрати контакт</string> diff --git a/src/main/res/values-zh/strings.xml b/src/main/res/values-zh/strings.xml index d871f7fad..e06026d23 100644 --- a/src/main/res/values-zh/strings.xml +++ b/src/main/res/values-zh/strings.xml @@ -18,7 +18,7 @@ <string name="title_activity_manage_accounts">管理账户</string> <string name="title_activity_settings">设置</string> <string name="conference_details">群聊详情</string> - <string name="title_activity_contact_details">联系人详情</string> + <string name="contact_details">联系人详情</string> <string name="title_activity_sharewith">分享会话</string> <string name="title_activity_start_conversation">开始会话</string> <string name="title_activity_choose_contact">选择联系人</string> diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index b44679e52..daa1636ff 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -17,7 +17,7 @@ <string name="title_activity_manage_accounts">Manage accounts</string> <string name="title_activity_settings">Settings</string> <string name="conference_details">Group chat details</string> - <string name="title_activity_contact_details">Contact details</string> + <string name="contact_details">Contact details</string> <string name="title_activity_sharewith">Share with conversation</string> <string name="title_activity_start_conversation">Start conversation</string> <string name="title_activity_choose_contact">Choose contact</string> |