KerningSpannableFactory.java
1.46 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
package com.bitstrips.imoji.ui;
import android.text.Spannable;
import android.text.Spannable.Factory;
import android.text.SpannableString;
import android.text.SpannableStringBuilder;
import android.text.style.ScaleXSpan;
public class KerningSpannableFactory
extends Spannable.Factory
{
private final float a;
public KerningSpannableFactory(float paramFloat)
{
this.a = (4.0F * paramFloat);
}
public Spannable newSpannable(CharSequence paramCharSequence)
{
if (paramCharSequence == null) {
return null;
}
if (paramCharSequence.length() < 2)
{
if ((paramCharSequence instanceof Spannable)) {
return (Spannable)paramCharSequence;
}
return new SpannableString(paramCharSequence);
}
if ((paramCharSequence instanceof SpannableStringBuilder)) {}
for (SpannableStringBuilder localSpannableStringBuilder = (SpannableStringBuilder)paramCharSequence;; localSpannableStringBuilder = new SpannableStringBuilder(paramCharSequence))
{
int i = paramCharSequence.length() - 1;
while (i > 0)
{
localSpannableStringBuilder.insert(i, " ");
localSpannableStringBuilder.setSpan(new ScaleXSpan(this.a), i, i + 1, 33);
i -= 1;
}
}
return localSpannableStringBuilder;
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/bitstrips/imoji/ui/KerningSpannableFactory.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/