FloaterView.java
2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
package com.bitstrips.imoji.ui.views;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.drawable.Drawable;
import android.support.v7.widget.AppCompatImageView;
import android.util.AttributeSet;
import com.squareup.picasso.Picasso.LoadedFrom;
import com.squareup.picasso.Target;
public class FloaterView
extends AppCompatImageView
implements Target
{
public FloaterView(Context paramContext)
{
super(paramContext);
}
public FloaterView(Context paramContext, AttributeSet paramAttributeSet)
{
super(paramContext, paramAttributeSet);
}
public void onBitmapFailed(Drawable paramDrawable) {}
public void onBitmapLoaded(Bitmap paramBitmap, Picasso.LoadedFrom paramLoadedFrom)
{
setImageBitmap(paramBitmap);
}
public void onPrepareLoad(Drawable paramDrawable) {}
public void setImageBitmap(Bitmap paramBitmap)
{
int i = getResources().getDimensionPixelSize(2131362021);
Bitmap localBitmap = Bitmap.createScaledBitmap(paramBitmap, paramBitmap.getWidth() + i, i + paramBitmap.getHeight(), false);
Object localObject = new int[localBitmap.getHeight() * localBitmap.getWidth()];
localBitmap.getPixels((int[])localObject, 0, localBitmap.getWidth(), 0, 0, localBitmap.getWidth(), localBitmap.getHeight());
int j = getResources().getColor(2131624039);
i = 0;
while (i < localObject.length)
{
if (localObject[i] != 0) {
localObject[i] = j;
}
i += 1;
}
localBitmap.setPixels((int[])localObject, 0, localBitmap.getWidth(), 0, 0, localBitmap.getWidth(), localBitmap.getHeight());
localObject = Bitmap.createBitmap(localBitmap.getWidth(), localBitmap.getHeight(), localBitmap.getConfig());
Canvas localCanvas = new Canvas((Bitmap)localObject);
i = (localCanvas.getWidth() - paramBitmap.getWidth()) / 2;
j = (localCanvas.getHeight() - paramBitmap.getHeight()) / 2;
localCanvas.drawBitmap(localBitmap, new Matrix(), null);
localCanvas.drawBitmap(paramBitmap, i, j, null);
super.setImageBitmap((Bitmap)localObject);
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/bitstrips/imoji/ui/views/FloaterView.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/