aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations
diff options
context:
space:
mode:
authorChristian S <christian@pix-art.de>2015-07-08 19:39:13 +0200
committerChristian S <christian@pix-art.de>2015-07-08 19:39:13 +0200
commitfa3aab929a57ae08ce73470ae5b29b1032b3dbed (patch)
tree0db34c4297b361cadf46a7b62ec5537b68026724 /src/main/java/eu/siacs/conversations
parent3ac8ed8c6ec03fbcba5796a34b4134fb0fe72e3b (diff)
resize avatar views
Diffstat (limited to 'src/main/java/eu/siacs/conversations')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java8
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java3
-rw-r--r--src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java5
-rw-r--r--src/main/java/eu/siacs/conversations/ui/adapter/AccountAdapter.java4
-rw-r--r--src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java8
5 files changed, 15 insertions, 13 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