正在查看: SpinDisplay v2.0.2.6 应用的 PaintsActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: SpinDisplay v2.0.2.6 应用的 PaintsActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.dmz.f20ad.activity;
import android.content.Intent;
import android.graphics.Paint;
import android.graphics.Typeface;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.NumberPicker;
import android.widget.TextView;
import b.b.k.l;
import com.dmz.f20ad.App;
import com.dmz.f20ad.view.PaintView;
import d.e.a.a;
import d.e.a.u.g;
import d.e.a.u.h;
import d.e.a.v.s;
import d.e.a.v.u;
import java.io.File;
import me.zhanghai.android.materialprogressbar.BuildConfig;
public class PaintsActivity extends l implements View.OnClickListener {
public TextView A;
public String[] B;
public TextView D;
public String[] E;
public Typeface[] F;
public TextView H;
public String[] I;
public int[] J;
public Button L;
public PaintView s;
public TextView t;
public TextView u;
public TextView v;
public EditText x;
public TextWatcher y;
public TextView z;
public int w = -1;
public int C = 14;
public int G = 0;
public int K = 5;
public class a implements TextWatcher {
public a() {
}
@Override
public void afterTextChanged(Editable editable) {
String obj = PaintsActivity.this.x.getText().toString();
if (obj.isEmpty()) {
obj = PaintsActivity.this.x.getHint().toString();
}
PaintsActivity.this.s.setText(obj);
}
@Override
public void beforeTextChanged(CharSequence charSequence, int i2, int i3, int i4) {
}
@Override
public void onTextChanged(CharSequence charSequence, int i2, int i3, int i4) {
}
}
public class b implements s.c {
public b() {
}
@Override
public void a(int i2) {
PaintsActivity paintsActivity = PaintsActivity.this;
paintsActivity.w = i2;
paintsActivity.s.setPaintColor(paintsActivity.w);
PaintsActivity paintsActivity2 = PaintsActivity.this;
paintsActivity2.v.setTextColor(paintsActivity2.w);
}
}
public class c implements a.InterfaceC0081a {
public c() {
}
@Override
public void a(d.e.a.a aVar, View view) {
TextView textView;
String format;
int id = view.getId();
if (id == 2131296405) {
PaintsActivity.this.s.setPaintStyle(Paint.Style.FILL);
PaintsActivity paintsActivity = PaintsActivity.this;
textView = paintsActivity.z;
format = String.format("%s(%s)", paintsActivity.getResources().getString(2131755304), PaintsActivity.this.getResources().getString(2131755344));
} else if (id != 2131296411) {
if (id != 2131296816) {
return;
}
aVar.dismiss();
return;
} else {
PaintsActivity.this.s.setPaintStyle(Paint.Style.STROKE);
PaintsActivity paintsActivity2 = PaintsActivity.this;
textView = paintsActivity2.z;
format = String.format("%s(%s)", paintsActivity2.getResources().getString(2131755304), PaintsActivity.this.getResources().getString(2131755345));
}
textView.setText(format);
}
}
public class d implements NumberPicker.OnValueChangeListener {
public d() {
}
@Override
public void onValueChange(NumberPicker numberPicker, int i2, int i3) {
if (i2 != i3) {
PaintsActivity paintsActivity = PaintsActivity.this;
paintsActivity.C = i3;
paintsActivity.s.setPaintTextSize(Integer.parseInt(paintsActivity.B[paintsActivity.C]));
PaintsActivity paintsActivity2 = PaintsActivity.this;
TextView textView = paintsActivity2.A;
PaintsActivity paintsActivity3 = PaintsActivity.this;
textView.setText(String.format("%s(%d)", paintsActivity2.getResources().getString(2131755305), Integer.valueOf(Integer.parseInt(paintsActivity3.B[paintsActivity3.C]))));
}
}
}
public class e implements NumberPicker.OnValueChangeListener {
public e() {
}
@Override
public void onValueChange(NumberPicker numberPicker, int i2, int i3) {
if (i2 != i3) {
PaintsActivity paintsActivity = PaintsActivity.this;
paintsActivity.G = i3;
paintsActivity.s.setPaintTypeface(paintsActivity.F[paintsActivity.G]);
PaintsActivity paintsActivity2 = PaintsActivity.this;
TextView textView = paintsActivity2.D;
PaintsActivity paintsActivity3 = PaintsActivity.this;
textView.setText(String.format("%s(%s)", paintsActivity2.getResources().getString(2131755303), paintsActivity3.E[paintsActivity3.G]));
}
}
}
public class f implements NumberPicker.OnValueChangeListener {
public f() {
}
@Override
public void onValueChange(NumberPicker numberPicker, int i2, int i3) {
if (i2 != i3) {
PaintsActivity paintsActivity = PaintsActivity.this;
paintsActivity.K = i3;
paintsActivity.s.setPaintTypefaceStyle(paintsActivity.J[paintsActivity.K]);
PaintsActivity paintsActivity2 = PaintsActivity.this;
TextView textView = paintsActivity2.H;
PaintsActivity paintsActivity3 = PaintsActivity.this;
textView.setText(String.format("%s(%s)", paintsActivity2.getResources().getString(2131755306), paintsActivity3.I[paintsActivity3.K]));
}
}
}
@Override
public void onClick(View view) {
u uVar;
s sVar;
switch (view.getId()) {
case 2131296400:
this.s.b();
break;
case 2131296402:
this.s.a();
break;
case 2131296404:
sVar = new s(this, new b(), this.w);
sVar.show();
break;
case 2131296406:
uVar = new u(this, getResources().getString(2131755357), new e(), this.G, this.E);
uVar.show();
break;
case 2131296409:
d.e.a.a aVar = new d.e.a.a(this, 2131492938, new int[]{2131296411, 2131296405, 2131296816});
aVar.setOwnerActivity(this);
aVar.f4765d = new c();
sVar = aVar;
sVar.show();
break;
case 2131296410:
uVar = new u(this, getResources().getString(2131755358), new d(), this.C, this.B);
uVar.show();
break;
case 2131296412:
uVar = new u(this, getResources().getString(2131755359), new f(), this.K, this.I);
uVar.show();
break;
case 2131296838:
String format = String.format("%s/%s", App.f2838g.d(), "tempimage");
File file = new File(format);
if (!file.exists()) {
file.mkdirs();
}
this.s.a(format, "1.bin");
Intent intent = new Intent();
intent.putExtra("frames", 1);
setResult(-1, intent);
onBackPressed();
break;
}
}
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(2131492906);
w();
}
public void w() {
this.s = (PaintView) findViewById(2131296877);
this.t = (TextView) findViewById(2131296400);
this.u = (TextView) findViewById(2131296402);
this.v = (TextView) findViewById(2131296404);
this.x = (EditText) findViewById(2131296482);
this.s.setText(this.x.getHint().toString());
this.s.setPaintStyle(Paint.Style.FILL);
this.z = (TextView) findViewById(2131296409);
this.A = (TextView) findViewById(2131296410);
this.D = (TextView) findViewById(2131296406);
this.H = (TextView) findViewById(2131296412);
this.L = (Button) findViewById(2131296838);
g gVar = new g();
g.a aVar = gVar.f5434a;
g.a aVar2 = gVar.f5435b;
g.a aVar3 = gVar.f5436c;
g.a aVar4 = gVar.f5437d;
g.a aVar5 = gVar.f5438e;
g.a aVar6 = gVar.f5439f;
this.I = new String[]{aVar.f5441b, aVar2.f5441b, aVar3.f5441b, aVar4.f5441b, aVar5.f5441b, aVar6.f5441b};
this.J = new int[]{aVar.f5440a, aVar2.f5440a, aVar3.f5440a, aVar4.f5440a, aVar5.f5440a, aVar6.f5440a};
h hVar = new h();
h.a aVar7 = hVar.f5442a;
h.a aVar8 = hVar.f5443b;
h.a aVar9 = hVar.f5444c;
h.a aVar10 = hVar.f5445d;
h.a aVar11 = hVar.f5446e;
this.E = new String[]{aVar7.f5448b, aVar8.f5448b, aVar9.f5448b, aVar10.f5448b, aVar11.f5448b};
this.F = new Typeface[]{aVar7.f5447a, aVar8.f5447a, aVar9.f5447a, aVar10.f5447a, aVar11.f5447a};
this.B = new String[51];
for (int i2 = 1; i2 < 52; i2++) {
this.B[i2 - 1] = (i2 * 5) + BuildConfig.FLAVOR;
}
this.y = new a();
this.x.addTextChangedListener(this.y);
this.t.setOnClickListener(this);
this.u.setOnClickListener(this);
this.v.setOnClickListener(this);
this.z.setOnClickListener(this);
this.A.setOnClickListener(this);
this.D.setOnClickListener(this);
this.H.setOnClickListener(this);
this.L.setOnClickListener(this);
this.v.setTextColor(-1);
this.z.setText(String.format("%s(%s)", getResources().getString(2131755304), getResources().getString(2131755344)));
this.A.setText(String.format("%s(%d)", getResources().getString(2131755305), Integer.valueOf(Integer.parseInt(this.B[this.C]))));
this.D.setText(String.format("%s(%s)", getResources().getString(2131755303), this.E[this.G]));
this.H.setText(String.format("%s(%s)", getResources().getString(2131755306), this.I[this.K]));
}
}