aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/ui/XmppActivity.java
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-10-20 21:08:33 +0200
committeriNPUTmice <daniel@gultsch.de>2014-10-20 21:08:33 +0200
commit21961673cbcb3132d2405c3d276058b94cbdbbfc (patch)
treea4cb9ef7f8c6395c2e7fc406f2c5a5e73ef1edcb /src/eu/siacs/conversations/ui/XmppActivity.java
parent0bb2c3c4d5b2a4b676610276fafd50ea55f43706 (diff)
refactored avatar generation. first step
Diffstat (limited to 'src/eu/siacs/conversations/ui/XmppActivity.java')
-rw-r--r--src/eu/siacs/conversations/ui/XmppActivity.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/eu/siacs/conversations/ui/XmppActivity.java b/src/eu/siacs/conversations/ui/XmppActivity.java
index cd77557c..ca1bf465 100644
--- a/src/eu/siacs/conversations/ui/XmppActivity.java
+++ b/src/eu/siacs/conversations/ui/XmppActivity.java
@@ -526,6 +526,11 @@ public abstract class XmppActivity extends Activity {
return this.mSecondaryBackgroundColor;
}
+ public int getPixel(int dp) {
+ DisplayMetrics metrics = getResources().getDisplayMetrics();
+ return ((int) (dp * metrics.density));
+ }
+
class BitmapWorkerTask extends AsyncTask<Message, Void, Bitmap> {
private final WeakReference<ImageView> imageViewReference;
private Message message = null;