diff options
8 files changed, 55 insertions, 33 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java b/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java index 07b8819d9..b76689ad3 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java @@ -406,7 +406,7 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers final User self = mucOptions.getSelf(); mAccountJid.setText(getString(R.string.using_account, mConversation .getAccount().getJid().toBareJid())); - mYourPhoto.setImageBitmap(avatarService().get(mConversation.getAccount(), getPixel(48))); + mYourPhoto.setImageBitmap(avatarService().get(mConversation.getAccount(), getPixel(56))); setTitle(mConversation.getName()); mFullJid.setText(mConversation.getJid().toBareJid().toString()); mYourNick.setText(mucOptions.getActualNick()); @@ -469,11 +469,11 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers Bitmap bm; Contact contact = user.getContact(); if (contact != null) { - bm = avatarService().get(contact, getPixel(48)); + bm = avatarService().get(contact, getPixel(56)); tvDisplayName.setText(contact.getDisplayName()); tvStatus.setText(user.getName() + " \u2022 " + getStatus(user)); } else { - bm = avatarService().get(user.getName(), getPixel(48)); + bm = avatarService().get(user.getName(), getPixel(56)); tvDisplayName.setText(user.getName()); tvStatus.setText(getStatus(user)); @@ -567,4 +567,4 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers } }); } -} +}
\ No newline at end of file diff --git a/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java b/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java index f54a1f006..e897716a6 100644 --- a/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java @@ -32,6 +32,7 @@ import org.openintents.openpgp.util.OpenPgpUtils; import java.util.List; +import eu.siacs.conversations.Config; import eu.siacs.conversations.R; import eu.siacs.conversations.crypto.PgpEngine; import eu.siacs.conversations.entities.Account; @@ -351,7 +352,7 @@ public class ContactDetailsActivity extends XmppActivity implements OnAccountUpd contactJidTv.setText(contact.getJid().toString()); } accountJidTv.setText(getString(R.string.using_account, contact.getAccount().getJid().toBareJid())); - badge.setImageBitmap(avatarService().get(contact, getPixel(384))); + badge.setImageBitmap(avatarService().get(contact, getPixel(Config.AVATAR_SIZE))); badge.setOnClickListener(this.onBadgeClick); keys.removeAllViews(); diff --git a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java index 931a1a2fa..71bbd33ca 100644 --- a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java @@ -23,6 +23,7 @@ import android.widget.TableLayout; import android.widget.TextView; import android.widget.Toast; +import eu.siacs.conversations.Config; import eu.siacs.conversations.R; import eu.siacs.conversations.entities.Account; import eu.siacs.conversations.services.XmppConnectionService.OnAccountUpdate; @@ -424,7 +425,7 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate this.mPassword.setText(this.mAccount.getPassword()); if (this.jidToEdit != null) { this.mAvatar.setVisibility(View.VISIBLE); - this.mAvatar.setImageBitmap(avatarService().get(this.mAccount, getPixel(72))); + this.mAvatar.setImageBitmap(avatarService().get(this.mAccount, getPixel(Config.AVATAR_SIZE))); } if (this.mAccount.isOptionSet(Account.OPTION_REGISTER)) { this.mRegisterNew.setVisibility(View.VISIBLE); @@ -508,4 +509,4 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate this.mStats.setVisibility(View.GONE); } } -} +}
\ No newline at end of file diff --git a/src/main/java/eu/siacs/conversations/ui/adapter/AccountAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/AccountAdapter.java index 95c0524d0..f78bfc5d1 100644 --- a/src/main/java/eu/siacs/conversations/ui/adapter/AccountAdapter.java +++ b/src/main/java/eu/siacs/conversations/ui/adapter/AccountAdapter.java @@ -37,7 +37,7 @@ public class AccountAdapter extends ArrayAdapter<Account> { jid.setText(account.getJid().toBareJid().toString()); TextView statusView = (TextView) view.findViewById(R.id.account_status); ImageView imageView = (ImageView) view.findViewById(R.id.account_image); - imageView.setImageBitmap(activity.avatarService().get(account, activity.getPixel(48))); + imageView.setImageBitmap(activity.avatarService().get(account, activity.getPixel(56))); statusView.setText(getContext().getString(account.getStatus().getReadableId())); switch (account.getStatus()) { case ONLINE: @@ -65,4 +65,4 @@ public class AccountAdapter extends ArrayAdapter<Account> { }); return view; } -} +}
\ No newline at end of file diff --git a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java index dedac77ee..2337c66b8 100644 --- a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java +++ b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java @@ -445,14 +445,14 @@ public class MessageAdapter extends ArrayAdapter<Message> { } else if (type == RECEIVED) { Contact contact = message.getContact(); if (contact != null) { - viewHolder.contact_picture.setImageBitmap(activity.avatarService().get(contact, activity.getPixel(48))); + viewHolder.contact_picture.setImageBitmap(activity.avatarService().get(contact, activity.getPixel(56))); } else if (conversation.getMode() == Conversation.MODE_MULTI) { viewHolder.contact_picture.setImageBitmap(activity.avatarService().get( UIHelper.getMessageDisplayName(message), - activity.getPixel(48))); + activity.getPixel(56))); } } else if (type == SENT) { - viewHolder.contact_picture.setImageBitmap(activity.avatarService().get(account, activity.getPixel(48))); + viewHolder.contact_picture.setImageBitmap(activity.avatarService().get(account, activity.getPixel(56))); } viewHolder.contact_picture @@ -592,4 +592,4 @@ public class MessageAdapter extends ArrayAdapter<Message> { protected ImageView contact_picture; protected TextView status_message; } -} +}
\ No newline at end of file diff --git a/src/main/res/layout/activity_contact_details.xml b/src/main/res/layout/activity_contact_details.xml index 1254a3ab7..8a0818462 100644 --- a/src/main/res/layout/activity_contact_details.xml +++ b/src/main/res/layout/activity_contact_details.xml @@ -21,18 +21,25 @@ <QuickContactBadge android:id="@+id/details_contact_badge" - android:layout_width="72dp" - android:layout_height="72dp" + android:layout_width="300dp" + android:layout_height="300dp" + android:scaleType="centerCrop" android:layout_alignParentTop="true" - android:scaleType="centerCrop" /> + android:layout_centerHorizontal="true" + android:background="@drawable/message_border" + android:padding="1dp" /> <LinearLayout android:id="@+id/details_jidbox" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="16dp" - android:layout_toRightOf="@+id/details_contact_badge" - android:orientation="vertical" > + android:orientation="vertical" + android:layout_below="@+id/details_contact_badge" + android:layout_alignParentRight="true" + android:layout_alignParentEnd="true" + android:layout_marginTop="16dp" + android:layout_alignParentLeft="true" + android:layout_alignParentStart="true"> <TextView android:id="@+id/details_contactjid" @@ -41,12 +48,14 @@ android:text="@string/account_settings_example_jabber_id" android:textColor="@color/primarytext" android:textSize="?attr/TextSizeHeadline" - android:textStyle="bold" /> + android:textStyle="bold" + android:layout_gravity="center_horizontal" /> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" - android:orientation="vertical" > + android:orientation="vertical" + android:layout_gravity="center_horizontal"> <LinearLayout android:id="@+id/tags" @@ -54,7 +63,8 @@ android:layout_height="wrap_content" android:layout_marginTop="4dp" android:layout_marginBottom="4dp" - android:orientation="horizontal"> + android:orientation="horizontal" + android:layout_gravity="center_horizontal"> </LinearLayout> <TextView @@ -62,7 +72,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="@color/secondarytext" - android:textSize="?attr/TextSizeBody" /> + android:textSize="?attr/TextSizeBody" + android:layout_gravity="center_horizontal" /> </LinearLayout> <Button @@ -70,7 +81,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="8dp" - android:text="@string/add_contact"/> + android:text="@string/add_contact" + android:layout_gravity="center_horizontal" /> <CheckBox android:id="@+id/details_send_presence" diff --git a/src/main/res/layout/activity_edit_account.xml b/src/main/res/layout/activity_edit_account.xml index 7d84a4af3..85a570aca 100644 --- a/src/main/res/layout/activity_edit_account.xml +++ b/src/main/res/layout/activity_edit_account.xml @@ -28,16 +28,21 @@ android:orientation="vertical" android:padding="@dimen/infocard_padding"> <ImageView android:id="@+id/avater" - android:layout_width="72dp" - android:layout_height="72dp" + android:layout_width="200dp" + android:layout_height="200dp" + android:contentDescription="@string/account_image_description" + android:background="@drawable/message_border" + android:padding="1dp" android:layout_alignParentTop="true" - android:layout_marginRight="16dp" - android:contentDescription="@string/account_image_description"/> + android:layout_centerHorizontal="true" /> <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" - android:layout_toRightOf="@+id/avater"> + android:layout_below="@+id/avater" + android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" + android:layout_marginTop="16dp"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" @@ -383,4 +388,4 @@ android:textColor="@color/secondarytext" /> </LinearLayout> -</RelativeLayout> +</RelativeLayout>
\ No newline at end of file diff --git a/src/main/res/layout/activity_muc_details.xml b/src/main/res/layout/activity_muc_details.xml index 116026512..7860d89cf 100644 --- a/src/main/res/layout/activity_muc_details.xml +++ b/src/main/res/layout/activity_muc_details.xml @@ -37,10 +37,13 @@ <ImageView android:id="@+id/your_photo" - android:layout_width="48dp" - android:layout_height="48dp" + android:layout_width="72dp" + android:layout_height="72dp" android:layout_alignParentLeft="true" - android:src="@drawable/ic_profile"> + android:src="@drawable/ic_profile" + android:background="@drawable/message_border" + android:padding="1dp" + android:layout_alignParentEnd="false"> </ImageView> <LinearLayout |