Initial commit

This commit is contained in:
2025-05-13 19:24:51 +02:00
commit a950f49678
10604 changed files with 932663 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
package com.aigestudio.wheelpicker.widgets;
/* loaded from: classes.dex */
public interface IWheelDayPicker {
}

View File

@@ -0,0 +1,5 @@
package com.aigestudio.wheelpicker.widgets;
/* loaded from: classes.dex */
public interface IWheelMonthPicker {
}

View File

@@ -0,0 +1,5 @@
package com.aigestudio.wheelpicker.widgets;
/* loaded from: classes.dex */
public interface IWheelYearPicker {
}

View File

@@ -0,0 +1,88 @@
package com.aigestudio.wheelpicker.widgets;
import android.content.Context;
import android.util.AttributeSet;
import com.aigestudio.wheelpicker.WheelPicker;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/* loaded from: classes.dex */
public class WheelDayPicker extends WheelPicker implements IWheelDayPicker {
private static final Map<Integer, List<Integer>> o0 = new HashMap();
private Calendar k0;
private int l0;
private int m0;
private int n0;
public WheelDayPicker(Context context) {
this(context, null);
}
private void a() {
this.k0.set(1, this.l0);
this.k0.set(2, this.m0);
int actualMaximum = this.k0.getActualMaximum(5);
List<Integer> list = o0.get(Integer.valueOf(actualMaximum));
if (list == null) {
list = new ArrayList<>();
for (int i = 1; i <= actualMaximum; i++) {
list.add(Integer.valueOf(i));
}
o0.put(Integer.valueOf(actualMaximum), list);
}
super.setData(list);
}
private void b() {
setSelectedItemPosition(this.n0 - 1);
}
public int getCurrentDay() {
return Integer.parseInt(String.valueOf(getData().get(getCurrentItemPosition())));
}
public int getMonth() {
return this.m0;
}
public int getSelectedDay() {
return this.n0;
}
public int getYear() {
return this.l0;
}
@Override // com.aigestudio.wheelpicker.WheelPicker
public void setData(List list) {
throw new UnsupportedOperationException("You can not invoke setData in WheelDayPicker");
}
public void setMonth(int i) {
this.m0 = i - 1;
a();
}
public void setSelectedDay(int i) {
this.n0 = i;
b();
}
public void setYear(int i) {
this.l0 = i;
a();
}
public WheelDayPicker(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.k0 = Calendar.getInstance();
this.l0 = this.k0.get(1);
this.m0 = this.k0.get(2);
a();
this.n0 = this.k0.get(5);
b();
}
}

View File

@@ -0,0 +1,50 @@
package com.aigestudio.wheelpicker.widgets;
import android.content.Context;
import android.util.AttributeSet;
import com.aigestudio.wheelpicker.WheelPicker;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
/* loaded from: classes.dex */
public class WheelMonthPicker extends WheelPicker implements IWheelMonthPicker {
private int k0;
public WheelMonthPicker(Context context) {
this(context, null);
}
private void a() {
setSelectedItemPosition(this.k0 - 1);
}
public int getCurrentMonth() {
return Integer.parseInt(String.valueOf(getData().get(getCurrentItemPosition())));
}
public int getSelectedMonth() {
return this.k0;
}
@Override // com.aigestudio.wheelpicker.WheelPicker
public void setData(List list) {
throw new UnsupportedOperationException("You can not invoke setData in WheelMonthPicker");
}
public void setSelectedMonth(int i) {
this.k0 = i;
a();
}
public WheelMonthPicker(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
ArrayList arrayList = new ArrayList();
for (int i = 1; i <= 12; i++) {
arrayList.add(Integer.valueOf(i));
}
super.setData(arrayList);
this.k0 = Calendar.getInstance().get(2) + 1;
a();
}
}

View File

@@ -0,0 +1,78 @@
package com.aigestudio.wheelpicker.widgets;
import android.content.Context;
import android.util.AttributeSet;
import com.aigestudio.wheelpicker.WheelPicker;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
/* loaded from: classes.dex */
public class WheelYearPicker extends WheelPicker implements IWheelYearPicker {
private int k0;
private int l0;
private int m0;
public WheelYearPicker(Context context) {
this(context, null);
}
private void a() {
setSelectedItemPosition(this.m0 - this.k0);
}
private void b() {
ArrayList arrayList = new ArrayList();
for (int i = this.k0; i <= this.l0; i++) {
arrayList.add(Integer.valueOf(i));
}
super.setData(arrayList);
}
public int getCurrentYear() {
return Integer.parseInt(String.valueOf(getData().get(getCurrentItemPosition())));
}
public int getSelectedYear() {
return this.m0;
}
public int getYearEnd() {
return this.l0;
}
public int getYearStart() {
return this.k0;
}
@Override // com.aigestudio.wheelpicker.WheelPicker
public void setData(List list) {
throw new UnsupportedOperationException("You can not invoke setData in WheelYearPicker");
}
public void setSelectedYear(int i) {
this.m0 = i;
a();
}
public void setYearEnd(int i) {
this.l0 = i;
b();
}
public void setYearStart(int i) {
this.k0 = i;
this.m0 = getCurrentYear();
b();
a();
}
public WheelYearPicker(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.k0 = 1000;
this.l0 = 3000;
b();
this.m0 = Calendar.getInstance().get(1);
a();
}
}