Initial import of ADIF API reverse-engineering toolkit
This commit is contained in:
@@ -0,0 +1,98 @@
|
||||
package com.google.android.material.timepicker;
|
||||
|
||||
import O.X;
|
||||
import android.content.Context;
|
||||
import android.content.res.Configuration;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Checkable;
|
||||
import android.widget.EditText;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.TextView;
|
||||
import com.adif.elcanomovil.R;
|
||||
import com.google.android.material.chip.Chip;
|
||||
import com.google.android.material.textfield.TextInputLayout;
|
||||
import java.util.WeakHashMap;
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: package-private */
|
||||
/* loaded from: classes3.dex */
|
||||
public class ChipTextInputComboView extends FrameLayout implements Checkable {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public final Chip f5882a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public final EditText f5883b;
|
||||
|
||||
public ChipTextInputComboView(Context context, AttributeSet attributeSet) {
|
||||
super(context, attributeSet, 0);
|
||||
LayoutInflater from = LayoutInflater.from(context);
|
||||
Chip chip = (Chip) from.inflate(R.layout.material_time_chip, (ViewGroup) this, false);
|
||||
this.f5882a = chip;
|
||||
chip.setAccessibilityClassName("android.view.View");
|
||||
TextInputLayout textInputLayout = (TextInputLayout) from.inflate(R.layout.material_time_input, (ViewGroup) this, false);
|
||||
EditText editText = textInputLayout.getEditText();
|
||||
this.f5883b = editText;
|
||||
editText.setVisibility(4);
|
||||
editText.addTextChangedListener(new a(this));
|
||||
editText.setImeHintLocales(getContext().getResources().getConfiguration().getLocales());
|
||||
addView(chip);
|
||||
addView(textInputLayout);
|
||||
TextView textView = (TextView) findViewById(R.id.material_label);
|
||||
WeakHashMap weakHashMap = X.f1226a;
|
||||
editText.setId(View.generateViewId());
|
||||
textView.setLabelFor(editText.getId());
|
||||
editText.setSaveEnabled(false);
|
||||
editText.setLongClickable(false);
|
||||
}
|
||||
|
||||
public static String a(ChipTextInputComboView chipTextInputComboView, CharSequence charSequence) {
|
||||
try {
|
||||
return String.format(chipTextInputComboView.getResources().getConfiguration().locale, "%02d", Integer.valueOf(Integer.parseInt(String.valueOf(charSequence))));
|
||||
} catch (NumberFormatException unused) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.widget.Checkable
|
||||
public final boolean isChecked() {
|
||||
return this.f5882a.isChecked();
|
||||
}
|
||||
|
||||
@Override // android.view.View
|
||||
public final void onConfigurationChanged(Configuration configuration) {
|
||||
super.onConfigurationChanged(configuration);
|
||||
this.f5883b.setImeHintLocales(getContext().getResources().getConfiguration().getLocales());
|
||||
}
|
||||
|
||||
@Override // android.widget.Checkable
|
||||
public final void setChecked(boolean z3) {
|
||||
Chip chip = this.f5882a;
|
||||
chip.setChecked(z3);
|
||||
int i = z3 ? 0 : 4;
|
||||
EditText editText = this.f5883b;
|
||||
editText.setVisibility(i);
|
||||
chip.setVisibility(z3 ? 8 : 0);
|
||||
if (chip.isChecked()) {
|
||||
editText.requestFocus();
|
||||
editText.post(new F2.f(editText, 12));
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.view.View
|
||||
public final void setOnClickListener(View.OnClickListener onClickListener) {
|
||||
this.f5882a.setOnClickListener(onClickListener);
|
||||
}
|
||||
|
||||
@Override // android.view.View
|
||||
public final void setTag(int i, Object obj) {
|
||||
this.f5882a.setTag(i, obj);
|
||||
}
|
||||
|
||||
@Override // android.widget.Checkable
|
||||
public final void toggle() {
|
||||
this.f5882a.toggle();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,252 @@
|
||||
package com.google.android.material.timepicker;
|
||||
|
||||
import O.X;
|
||||
import a.AbstractC0105a;
|
||||
import android.content.Context;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.content.res.Resources;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.RadialGradient;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.RectF;
|
||||
import android.graphics.Shader;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.util.SparseArray;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.accessibility.AccessibilityNodeInfo;
|
||||
import android.widget.TextView;
|
||||
import androidx.constraintlayout.widget.k;
|
||||
import androidx.constraintlayout.widget.l;
|
||||
import androidx.constraintlayout.widget.p;
|
||||
import com.adif.elcanomovil.R;
|
||||
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
|
||||
import h2.AbstractC0379a;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
class ClockFaceView extends e implements d {
|
||||
|
||||
/* renamed from: d, reason: collision with root package name */
|
||||
public final ClockHandView f5884d;
|
||||
|
||||
/* renamed from: e, reason: collision with root package name */
|
||||
public final Rect f5885e;
|
||||
|
||||
/* renamed from: f, reason: collision with root package name */
|
||||
public final RectF f5886f;
|
||||
|
||||
/* renamed from: g, reason: collision with root package name */
|
||||
public final Rect f5887g;
|
||||
public final SparseArray h;
|
||||
public final c i;
|
||||
|
||||
/* renamed from: j, reason: collision with root package name */
|
||||
public final int[] f5888j;
|
||||
|
||||
/* renamed from: k, reason: collision with root package name */
|
||||
public final float[] f5889k;
|
||||
|
||||
/* renamed from: l, reason: collision with root package name */
|
||||
public final int f5890l;
|
||||
|
||||
/* renamed from: m, reason: collision with root package name */
|
||||
public final int f5891m;
|
||||
|
||||
/* renamed from: n, reason: collision with root package name */
|
||||
public final int f5892n;
|
||||
|
||||
/* renamed from: o, reason: collision with root package name */
|
||||
public final int f5893o;
|
||||
public final String[] p;
|
||||
|
||||
/* renamed from: q, reason: collision with root package name */
|
||||
public float f5894q;
|
||||
|
||||
/* renamed from: r, reason: collision with root package name */
|
||||
public final ColorStateList f5895r;
|
||||
|
||||
public ClockFaceView(Context context, AttributeSet attributeSet) {
|
||||
super(context, attributeSet);
|
||||
this.f5885e = new Rect();
|
||||
this.f5886f = new RectF();
|
||||
this.f5887g = new Rect();
|
||||
SparseArray sparseArray = new SparseArray();
|
||||
this.h = sparseArray;
|
||||
this.f5889k = new float[]{BitmapDescriptorFactory.HUE_RED, 0.9f, 1.0f};
|
||||
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, AbstractC0379a.f6760f, R.attr.materialClockStyle, 2132018378);
|
||||
Resources resources = getResources();
|
||||
ColorStateList w3 = AbstractC0105a.w(context, obtainStyledAttributes, 1);
|
||||
this.f5895r = w3;
|
||||
LayoutInflater.from(context).inflate(R.layout.material_clockface_view, (ViewGroup) this, true);
|
||||
ClockHandView clockHandView = (ClockHandView) findViewById(R.id.material_clock_hand);
|
||||
this.f5884d = clockHandView;
|
||||
this.f5890l = resources.getDimensionPixelSize(R.dimen.material_clock_hand_padding);
|
||||
int colorForState = w3.getColorForState(new int[]{android.R.attr.state_selected}, w3.getDefaultColor());
|
||||
this.f5888j = new int[]{colorForState, colorForState, w3.getDefaultColor()};
|
||||
clockHandView.f5898c.add(this);
|
||||
int defaultColor = D.h.getColorStateList(context, R.color.material_timepicker_clockface).getDefaultColor();
|
||||
ColorStateList w4 = AbstractC0105a.w(context, obtainStyledAttributes, 0);
|
||||
setBackgroundColor(w4 != null ? w4.getDefaultColor() : defaultColor);
|
||||
getViewTreeObserver().addOnPreDrawListener(new b(this));
|
||||
setFocusable(true);
|
||||
obtainStyledAttributes.recycle();
|
||||
this.i = new c(this);
|
||||
String[] strArr = new String[12];
|
||||
Arrays.fill(strArr, "");
|
||||
this.p = strArr;
|
||||
LayoutInflater from = LayoutInflater.from(getContext());
|
||||
int size = sparseArray.size();
|
||||
boolean z3 = false;
|
||||
for (int i = 0; i < Math.max(this.p.length, size); i++) {
|
||||
TextView textView = (TextView) sparseArray.get(i);
|
||||
if (i >= this.p.length) {
|
||||
removeView(textView);
|
||||
sparseArray.remove(i);
|
||||
} else {
|
||||
if (textView == null) {
|
||||
textView = (TextView) from.inflate(R.layout.material_clockface_textview, (ViewGroup) this, false);
|
||||
sparseArray.put(i, textView);
|
||||
addView(textView);
|
||||
}
|
||||
textView.setText(this.p[i]);
|
||||
textView.setTag(R.id.material_value_index, Integer.valueOf(i));
|
||||
int i4 = (i / 12) + 1;
|
||||
textView.setTag(R.id.material_clock_level, Integer.valueOf(i4));
|
||||
z3 = i4 > 1 ? true : z3;
|
||||
X.j(textView, this.i);
|
||||
textView.setTextColor(this.f5895r);
|
||||
}
|
||||
}
|
||||
ClockHandView clockHandView2 = this.f5884d;
|
||||
if (clockHandView2.f5897b && !z3) {
|
||||
clockHandView2.f5906m = 1;
|
||||
}
|
||||
clockHandView2.f5897b = z3;
|
||||
clockHandView2.invalidate();
|
||||
this.f5891m = resources.getDimensionPixelSize(R.dimen.material_time_picker_minimum_screen_height);
|
||||
this.f5892n = resources.getDimensionPixelSize(R.dimen.material_time_picker_minimum_screen_width);
|
||||
this.f5893o = resources.getDimensionPixelSize(R.dimen.material_clock_size);
|
||||
}
|
||||
|
||||
@Override // com.google.android.material.timepicker.e
|
||||
public final void i() {
|
||||
p pVar = new p();
|
||||
pVar.b(this);
|
||||
HashMap hashMap = new HashMap();
|
||||
for (int i = 0; i < getChildCount(); i++) {
|
||||
View childAt = getChildAt(i);
|
||||
if (childAt.getId() != R.id.circle_center && !"skip".equals(childAt.getTag())) {
|
||||
int i4 = (Integer) childAt.getTag(R.id.material_clock_level);
|
||||
if (i4 == null) {
|
||||
i4 = 1;
|
||||
}
|
||||
if (!hashMap.containsKey(i4)) {
|
||||
hashMap.put(i4, new ArrayList());
|
||||
}
|
||||
((List) hashMap.get(i4)).add(childAt);
|
||||
}
|
||||
}
|
||||
for (Map.Entry entry : hashMap.entrySet()) {
|
||||
List list = (List) entry.getValue();
|
||||
int round = ((Integer) entry.getKey()).intValue() == 2 ? Math.round(this.f5913b * 0.66f) : this.f5913b;
|
||||
Iterator it = list.iterator();
|
||||
float f2 = BitmapDescriptorFactory.HUE_RED;
|
||||
while (it.hasNext()) {
|
||||
int id = ((View) it.next()).getId();
|
||||
HashMap hashMap2 = pVar.f2747c;
|
||||
if (!hashMap2.containsKey(Integer.valueOf(id))) {
|
||||
hashMap2.put(Integer.valueOf(id), new k());
|
||||
}
|
||||
l lVar = ((k) hashMap2.get(Integer.valueOf(id))).f2652d;
|
||||
lVar.f2717z = R.id.circle_center;
|
||||
lVar.f2656A = round;
|
||||
lVar.f2657B = f2;
|
||||
f2 += 360.0f / list.size();
|
||||
}
|
||||
}
|
||||
pVar.a(this);
|
||||
setConstraintSet(null);
|
||||
requestLayout();
|
||||
int i5 = 0;
|
||||
while (true) {
|
||||
SparseArray sparseArray = this.h;
|
||||
if (i5 >= sparseArray.size()) {
|
||||
return;
|
||||
}
|
||||
((TextView) sparseArray.get(i5)).setVisibility(0);
|
||||
i5++;
|
||||
}
|
||||
}
|
||||
|
||||
public final void j() {
|
||||
SparseArray sparseArray;
|
||||
RectF rectF;
|
||||
Rect rect;
|
||||
RectF rectF2 = this.f5884d.f5902g;
|
||||
float f2 = Float.MAX_VALUE;
|
||||
TextView textView = null;
|
||||
int i = 0;
|
||||
while (true) {
|
||||
sparseArray = this.h;
|
||||
int size = sparseArray.size();
|
||||
rectF = this.f5886f;
|
||||
rect = this.f5885e;
|
||||
if (i >= size) {
|
||||
break;
|
||||
}
|
||||
TextView textView2 = (TextView) sparseArray.get(i);
|
||||
if (textView2 != null) {
|
||||
textView2.getHitRect(rect);
|
||||
rectF.set(rect);
|
||||
rectF.union(rectF2);
|
||||
float height = rectF.height() * rectF.width();
|
||||
if (height < f2) {
|
||||
textView = textView2;
|
||||
f2 = height;
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
for (int i4 = 0; i4 < sparseArray.size(); i4++) {
|
||||
TextView textView3 = (TextView) sparseArray.get(i4);
|
||||
if (textView3 != null) {
|
||||
textView3.setSelected(textView3 == textView);
|
||||
textView3.getHitRect(rect);
|
||||
rectF.set(rect);
|
||||
textView3.getLineBounds(0, this.f5887g);
|
||||
rectF.inset(r8.left, r8.top);
|
||||
textView3.getPaint().setShader(!RectF.intersects(rectF2, rectF) ? null : new RadialGradient(rectF2.centerX() - rectF.left, rectF2.centerY() - rectF.top, 0.5f * rectF2.width(), this.f5888j, this.f5889k, Shader.TileMode.CLAMP));
|
||||
textView3.invalidate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.view.View
|
||||
public final void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo accessibilityNodeInfo) {
|
||||
super.onInitializeAccessibilityNodeInfo(accessibilityNodeInfo);
|
||||
accessibilityNodeInfo.setCollectionInfo((AccessibilityNodeInfo.CollectionInfo) A.a.s(1, this.p.length, 1).f7b);
|
||||
}
|
||||
|
||||
@Override // androidx.constraintlayout.widget.ConstraintLayout, android.view.ViewGroup, android.view.View
|
||||
public final void onLayout(boolean z3, int i, int i4, int i5, int i6) {
|
||||
super.onLayout(z3, i, i4, i5, i6);
|
||||
j();
|
||||
}
|
||||
|
||||
@Override // androidx.constraintlayout.widget.ConstraintLayout, android.view.View
|
||||
public final void onMeasure(int i, int i4) {
|
||||
DisplayMetrics displayMetrics = getResources().getDisplayMetrics();
|
||||
int max = (int) (this.f5893o / Math.max(Math.max(this.f5891m / displayMetrics.heightPixels, this.f5892n / displayMetrics.widthPixels), 1.0f));
|
||||
int makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(max, 1073741824);
|
||||
setMeasuredDimension(max, max);
|
||||
super.onMeasure(makeMeasureSpec, makeMeasureSpec);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,188 @@
|
||||
package com.google.android.material.timepicker;
|
||||
|
||||
import O.X;
|
||||
import a.AbstractC0106b;
|
||||
import android.animation.ValueAnimator;
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.RectF;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewConfiguration;
|
||||
import com.adif.elcanomovil.R;
|
||||
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
|
||||
import h2.AbstractC0379a;
|
||||
import i2.AbstractC0396a;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.WeakHashMap;
|
||||
import x2.m;
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: package-private */
|
||||
/* loaded from: classes3.dex */
|
||||
public class ClockHandView extends View {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public final ValueAnimator f5896a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public boolean f5897b;
|
||||
|
||||
/* renamed from: c, reason: collision with root package name */
|
||||
public final ArrayList f5898c;
|
||||
|
||||
/* renamed from: d, reason: collision with root package name */
|
||||
public final int f5899d;
|
||||
|
||||
/* renamed from: e, reason: collision with root package name */
|
||||
public final float f5900e;
|
||||
|
||||
/* renamed from: f, reason: collision with root package name */
|
||||
public final Paint f5901f;
|
||||
|
||||
/* renamed from: g, reason: collision with root package name */
|
||||
public final RectF f5902g;
|
||||
public final int h;
|
||||
public float i;
|
||||
|
||||
/* renamed from: j, reason: collision with root package name */
|
||||
public boolean f5903j;
|
||||
|
||||
/* renamed from: k, reason: collision with root package name */
|
||||
public double f5904k;
|
||||
|
||||
/* renamed from: l, reason: collision with root package name */
|
||||
public int f5905l;
|
||||
|
||||
/* renamed from: m, reason: collision with root package name */
|
||||
public int f5906m;
|
||||
|
||||
public ClockHandView(Context context, AttributeSet attributeSet) {
|
||||
super(context, attributeSet, R.attr.materialClockStyle);
|
||||
this.f5896a = new ValueAnimator();
|
||||
this.f5898c = new ArrayList();
|
||||
Paint paint = new Paint();
|
||||
this.f5901f = paint;
|
||||
this.f5902g = new RectF();
|
||||
this.f5906m = 1;
|
||||
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, AbstractC0379a.f6761g, R.attr.materialClockStyle, 2132018378);
|
||||
AbstractC0106b.E(context, R.attr.motionDurationLong2, 200);
|
||||
AbstractC0106b.F(context, R.attr.motionEasingEmphasizedInterpolator, AbstractC0396a.f6816b);
|
||||
this.f5905l = obtainStyledAttributes.getDimensionPixelSize(1, 0);
|
||||
this.f5899d = obtainStyledAttributes.getDimensionPixelSize(2, 0);
|
||||
this.h = getResources().getDimensionPixelSize(R.dimen.material_clock_hand_stroke_width);
|
||||
this.f5900e = r4.getDimensionPixelSize(R.dimen.material_clock_hand_center_dot_radius);
|
||||
int color = obtainStyledAttributes.getColor(0, 0);
|
||||
paint.setAntiAlias(true);
|
||||
paint.setColor(color);
|
||||
b(BitmapDescriptorFactory.HUE_RED);
|
||||
ViewConfiguration.get(context).getScaledTouchSlop();
|
||||
WeakHashMap weakHashMap = X.f1226a;
|
||||
setImportantForAccessibility(2);
|
||||
obtainStyledAttributes.recycle();
|
||||
}
|
||||
|
||||
public final int a(int i) {
|
||||
int i4 = this.f5905l;
|
||||
return i == 2 ? Math.round(i4 * 0.66f) : i4;
|
||||
}
|
||||
|
||||
public final void b(float f2) {
|
||||
ValueAnimator valueAnimator = this.f5896a;
|
||||
if (valueAnimator != null) {
|
||||
valueAnimator.cancel();
|
||||
}
|
||||
float f4 = f2 % 360.0f;
|
||||
this.i = f4;
|
||||
this.f5904k = Math.toRadians(f4 - 90.0f);
|
||||
int height = getHeight() / 2;
|
||||
int width = getWidth() / 2;
|
||||
float a2 = a(this.f5906m);
|
||||
float cos = (((float) Math.cos(this.f5904k)) * a2) + width;
|
||||
float sin = (a2 * ((float) Math.sin(this.f5904k))) + height;
|
||||
float f5 = this.f5899d;
|
||||
this.f5902g.set(cos - f5, sin - f5, cos + f5, sin + f5);
|
||||
Iterator it = this.f5898c.iterator();
|
||||
while (it.hasNext()) {
|
||||
ClockFaceView clockFaceView = (ClockFaceView) ((d) it.next());
|
||||
if (Math.abs(clockFaceView.f5894q - f4) > 0.001f) {
|
||||
clockFaceView.f5894q = f4;
|
||||
clockFaceView.j();
|
||||
}
|
||||
}
|
||||
invalidate();
|
||||
}
|
||||
|
||||
@Override // android.view.View
|
||||
public final void onDraw(Canvas canvas) {
|
||||
super.onDraw(canvas);
|
||||
int height = getHeight() / 2;
|
||||
int width = getWidth() / 2;
|
||||
float f2 = width;
|
||||
float a2 = a(this.f5906m);
|
||||
float cos = (((float) Math.cos(this.f5904k)) * a2) + f2;
|
||||
float f4 = height;
|
||||
float sin = (a2 * ((float) Math.sin(this.f5904k))) + f4;
|
||||
Paint paint = this.f5901f;
|
||||
paint.setStrokeWidth(BitmapDescriptorFactory.HUE_RED);
|
||||
canvas.drawCircle(cos, sin, this.f5899d, paint);
|
||||
double sin2 = Math.sin(this.f5904k);
|
||||
paint.setStrokeWidth(this.h);
|
||||
canvas.drawLine(f2, f4, width + ((int) (Math.cos(this.f5904k) * r2)), height + ((int) (r2 * sin2)), paint);
|
||||
canvas.drawCircle(f2, f4, this.f5900e, paint);
|
||||
}
|
||||
|
||||
@Override // android.view.View
|
||||
public final void onLayout(boolean z3, int i, int i4, int i5, int i6) {
|
||||
super.onLayout(z3, i, i4, i5, i6);
|
||||
if (this.f5896a.isRunning()) {
|
||||
return;
|
||||
}
|
||||
b(this.i);
|
||||
}
|
||||
|
||||
@Override // android.view.View
|
||||
public final boolean onTouchEvent(MotionEvent motionEvent) {
|
||||
boolean z3;
|
||||
boolean z4;
|
||||
int actionMasked = motionEvent.getActionMasked();
|
||||
float x3 = motionEvent.getX();
|
||||
float y3 = motionEvent.getY();
|
||||
boolean z5 = false;
|
||||
if (actionMasked == 0) {
|
||||
this.f5903j = false;
|
||||
z3 = true;
|
||||
z4 = false;
|
||||
} else if (actionMasked == 1 || actionMasked == 2) {
|
||||
z4 = this.f5903j;
|
||||
if (this.f5897b) {
|
||||
this.f5906m = ((float) Math.hypot((double) (x3 - ((float) (getWidth() / 2))), (double) (y3 - ((float) (getHeight() / 2))))) <= ((float) a(2)) + m.e(getContext(), 12) ? 2 : 1;
|
||||
}
|
||||
z3 = false;
|
||||
} else {
|
||||
z4 = false;
|
||||
z3 = false;
|
||||
}
|
||||
boolean z6 = this.f5903j;
|
||||
int degrees = (int) Math.toDegrees(Math.atan2(y3 - (getHeight() / 2), x3 - (getWidth() / 2)));
|
||||
int i = degrees + 90;
|
||||
if (i < 0) {
|
||||
i = degrees + 450;
|
||||
}
|
||||
float f2 = i;
|
||||
boolean z7 = this.i != f2;
|
||||
if (!z3 || !z7) {
|
||||
if (z7 || z4) {
|
||||
b(f2);
|
||||
}
|
||||
this.f5903j = z6 | z5;
|
||||
return true;
|
||||
}
|
||||
z5 = true;
|
||||
this.f5903j = z6 | z5;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.google.android.material.timepicker;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.GestureDetector;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import com.adif.elcanomovil.R;
|
||||
import com.google.android.material.button.MaterialButtonToggleGroup;
|
||||
import com.google.android.material.chip.Chip;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
class TimePickerView extends ConstraintLayout {
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public static final /* synthetic */ int f5907b = 0;
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public final Chip f5908a;
|
||||
|
||||
public TimePickerView(Context context, AttributeSet attributeSet) {
|
||||
super(context, attributeSet, 0);
|
||||
g gVar = new g(this);
|
||||
LayoutInflater.from(context).inflate(R.layout.material_timepicker, this);
|
||||
MaterialButtonToggleGroup materialButtonToggleGroup = (MaterialButtonToggleGroup) findViewById(R.id.material_clock_period_toggle);
|
||||
materialButtonToggleGroup.f5605c.add(new Object());
|
||||
Chip chip = (Chip) findViewById(R.id.material_minute_tv);
|
||||
Chip chip2 = (Chip) findViewById(R.id.material_hour_tv);
|
||||
this.f5908a = chip2;
|
||||
i iVar = new i(new GestureDetector(getContext(), new h(this)));
|
||||
chip.setOnTouchListener(iVar);
|
||||
chip2.setOnTouchListener(iVar);
|
||||
chip.setTag(R.id.selection_type, 12);
|
||||
chip2.setTag(R.id.selection_type, 10);
|
||||
chip.setOnClickListener(gVar);
|
||||
chip2.setOnClickListener(gVar);
|
||||
chip.setAccessibilityClassName("android.view.View");
|
||||
chip2.setAccessibilityClassName("android.view.View");
|
||||
}
|
||||
|
||||
@Override // android.view.View
|
||||
public final void onVisibilityChanged(View view, int i) {
|
||||
super.onVisibilityChanged(view, i);
|
||||
if (view == this && i == 0) {
|
||||
this.f5908a.sendAccessibilityEvent(8);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.google.android.material.timepicker;
|
||||
|
||||
import android.text.Editable;
|
||||
import android.text.TextUtils;
|
||||
import com.google.android.material.chip.Chip;
|
||||
import x2.l;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class a extends l {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public final /* synthetic */ ChipTextInputComboView f5909a;
|
||||
|
||||
public a(ChipTextInputComboView chipTextInputComboView) {
|
||||
this.f5909a = chipTextInputComboView;
|
||||
}
|
||||
|
||||
@Override // android.text.TextWatcher
|
||||
public final void afterTextChanged(Editable editable) {
|
||||
boolean isEmpty = TextUtils.isEmpty(editable);
|
||||
ChipTextInputComboView chipTextInputComboView = this.f5909a;
|
||||
if (isEmpty) {
|
||||
chipTextInputComboView.f5882a.setText(ChipTextInputComboView.a(chipTextInputComboView, "00"));
|
||||
return;
|
||||
}
|
||||
String a2 = ChipTextInputComboView.a(chipTextInputComboView, editable);
|
||||
Chip chip = chipTextInputComboView.f5882a;
|
||||
if (TextUtils.isEmpty(a2)) {
|
||||
a2 = ChipTextInputComboView.a(chipTextInputComboView, "00");
|
||||
}
|
||||
chip.setText(a2);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.google.android.material.timepicker;
|
||||
|
||||
import android.view.ViewTreeObserver;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class b implements ViewTreeObserver.OnPreDrawListener {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public final /* synthetic */ ClockFaceView f5910a;
|
||||
|
||||
public b(ClockFaceView clockFaceView) {
|
||||
this.f5910a = clockFaceView;
|
||||
}
|
||||
|
||||
@Override // android.view.ViewTreeObserver.OnPreDrawListener
|
||||
public final boolean onPreDraw() {
|
||||
ClockFaceView clockFaceView = this.f5910a;
|
||||
if (!clockFaceView.isShown()) {
|
||||
return true;
|
||||
}
|
||||
clockFaceView.getViewTreeObserver().removeOnPreDrawListener(this);
|
||||
int height = ((clockFaceView.getHeight() / 2) - clockFaceView.f5884d.f5899d) - clockFaceView.f5890l;
|
||||
if (height != clockFaceView.f5913b) {
|
||||
clockFaceView.f5913b = height;
|
||||
clockFaceView.i();
|
||||
int i = clockFaceView.f5913b;
|
||||
ClockHandView clockHandView = clockFaceView.f5884d;
|
||||
clockHandView.f5905l = i;
|
||||
clockHandView.invalidate();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.google.android.material.timepicker;
|
||||
|
||||
import O.C0056b;
|
||||
import P.j;
|
||||
import P.k;
|
||||
import android.os.Bundle;
|
||||
import android.os.SystemClock;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.accessibility.AccessibilityNodeInfo;
|
||||
import com.adif.elcanomovil.R;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class c extends C0056b {
|
||||
|
||||
/* renamed from: d, reason: collision with root package name */
|
||||
public final /* synthetic */ ClockFaceView f5911d;
|
||||
|
||||
public c(ClockFaceView clockFaceView) {
|
||||
this.f5911d = clockFaceView;
|
||||
}
|
||||
|
||||
@Override // O.C0056b
|
||||
public final void d(View view, k kVar) {
|
||||
View.AccessibilityDelegate accessibilityDelegate = this.f1232a;
|
||||
AccessibilityNodeInfo accessibilityNodeInfo = kVar.f1341a;
|
||||
accessibilityDelegate.onInitializeAccessibilityNodeInfo(view, accessibilityNodeInfo);
|
||||
int intValue = ((Integer) view.getTag(R.id.material_value_index)).intValue();
|
||||
if (intValue > 0) {
|
||||
accessibilityNodeInfo.setTraversalAfter((View) this.f5911d.h.get(intValue - 1));
|
||||
}
|
||||
kVar.i(j.a(view.isSelected(), 0, 1, intValue, 1));
|
||||
accessibilityNodeInfo.setClickable(true);
|
||||
kVar.b(P.f.f1330e);
|
||||
}
|
||||
|
||||
@Override // O.C0056b
|
||||
public final boolean g(View view, int i, Bundle bundle) {
|
||||
if (i != 16) {
|
||||
return super.g(view, i, bundle);
|
||||
}
|
||||
long uptimeMillis = SystemClock.uptimeMillis();
|
||||
ClockFaceView clockFaceView = this.f5911d;
|
||||
view.getHitRect(clockFaceView.f5885e);
|
||||
float centerX = clockFaceView.f5885e.centerX();
|
||||
float centerY = clockFaceView.f5885e.centerY();
|
||||
clockFaceView.f5884d.onTouchEvent(MotionEvent.obtain(uptimeMillis, uptimeMillis, 0, centerX, centerY, 0));
|
||||
clockFaceView.f5884d.onTouchEvent(MotionEvent.obtain(uptimeMillis, uptimeMillis, 1, centerX, centerY, 0));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package com.google.android.material.timepicker;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface d {
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package com.google.android.material.timepicker;
|
||||
|
||||
import E2.j;
|
||||
import O.X;
|
||||
import android.content.Context;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.content.res.TypedArray;
|
||||
import android.os.Handler;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import com.adif.elcanomovil.R;
|
||||
import h2.AbstractC0379a;
|
||||
import java.util.WeakHashMap;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public abstract class e extends ConstraintLayout {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public final F2.f f5912a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public int f5913b;
|
||||
|
||||
/* renamed from: c, reason: collision with root package name */
|
||||
public final E2.g f5914c;
|
||||
|
||||
public e(Context context, AttributeSet attributeSet) {
|
||||
super(context, attributeSet, R.attr.materialClockStyle);
|
||||
LayoutInflater.from(context).inflate(R.layout.material_radial_view_group, this);
|
||||
E2.g gVar = new E2.g();
|
||||
this.f5914c = gVar;
|
||||
E2.h hVar = new E2.h(0.5f);
|
||||
j e4 = gVar.f400a.f386a.e();
|
||||
e4.f422e = hVar;
|
||||
e4.f423f = hVar;
|
||||
e4.f424g = hVar;
|
||||
e4.h = hVar;
|
||||
gVar.setShapeAppearanceModel(e4.a());
|
||||
this.f5914c.j(ColorStateList.valueOf(-1));
|
||||
E2.g gVar2 = this.f5914c;
|
||||
WeakHashMap weakHashMap = X.f1226a;
|
||||
setBackground(gVar2);
|
||||
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, AbstractC0379a.f6775x, R.attr.materialClockStyle, 0);
|
||||
this.f5913b = obtainStyledAttributes.getDimensionPixelSize(0, 0);
|
||||
this.f5912a = new F2.f(this, 8);
|
||||
obtainStyledAttributes.recycle();
|
||||
}
|
||||
|
||||
@Override // android.view.ViewGroup
|
||||
public final void addView(View view, int i, ViewGroup.LayoutParams layoutParams) {
|
||||
super.addView(view, i, layoutParams);
|
||||
if (view.getId() == -1) {
|
||||
WeakHashMap weakHashMap = X.f1226a;
|
||||
view.setId(View.generateViewId());
|
||||
}
|
||||
Handler handler = getHandler();
|
||||
if (handler != null) {
|
||||
F2.f fVar = this.f5912a;
|
||||
handler.removeCallbacks(fVar);
|
||||
handler.post(fVar);
|
||||
}
|
||||
}
|
||||
|
||||
public abstract void i();
|
||||
|
||||
@Override // android.view.View
|
||||
public final void onFinishInflate() {
|
||||
super.onFinishInflate();
|
||||
i();
|
||||
}
|
||||
|
||||
@Override // androidx.constraintlayout.widget.ConstraintLayout, android.view.ViewGroup
|
||||
public final void onViewRemoved(View view) {
|
||||
super.onViewRemoved(view);
|
||||
Handler handler = getHandler();
|
||||
if (handler != null) {
|
||||
F2.f fVar = this.f5912a;
|
||||
handler.removeCallbacks(fVar);
|
||||
handler.post(fVar);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.view.View
|
||||
public final void setBackgroundColor(int i) {
|
||||
this.f5914c.j(ColorStateList.valueOf(i));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.google.android.material.timepicker;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final /* synthetic */ class f {
|
||||
public final void a() {
|
||||
int i = TimePickerView.f5907b;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.google.android.material.timepicker;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class g implements View.OnClickListener {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public final /* synthetic */ TimePickerView f5915a;
|
||||
|
||||
public g(TimePickerView timePickerView) {
|
||||
this.f5915a = timePickerView;
|
||||
}
|
||||
|
||||
@Override // android.view.View.OnClickListener
|
||||
public final void onClick(View view) {
|
||||
int i = TimePickerView.f5907b;
|
||||
this.f5915a.getClass();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.google.android.material.timepicker;
|
||||
|
||||
import android.view.GestureDetector;
|
||||
import android.view.MotionEvent;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class h extends GestureDetector.SimpleOnGestureListener {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public final /* synthetic */ TimePickerView f5916a;
|
||||
|
||||
public h(TimePickerView timePickerView) {
|
||||
this.f5916a = timePickerView;
|
||||
}
|
||||
|
||||
@Override // android.view.GestureDetector.SimpleOnGestureListener, android.view.GestureDetector.OnDoubleTapListener
|
||||
public final boolean onDoubleTap(MotionEvent motionEvent) {
|
||||
int i = TimePickerView.f5907b;
|
||||
this.f5916a.getClass();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.google.android.material.timepicker;
|
||||
|
||||
import android.view.GestureDetector;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.widget.Checkable;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class i implements View.OnTouchListener {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public final /* synthetic */ GestureDetector f5917a;
|
||||
|
||||
public i(GestureDetector gestureDetector) {
|
||||
this.f5917a = gestureDetector;
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
@Override // android.view.View.OnTouchListener
|
||||
public final boolean onTouch(View view, MotionEvent motionEvent) {
|
||||
if (((Checkable) view).isChecked()) {
|
||||
return this.f5917a.onTouchEvent(motionEvent);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user