mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2025-01-09 13:43:22 +00:00
30 lines
1.4 KiB
Java
30 lines
1.4 KiB
Java
package com.google.android.material.datepicker;
|
|
|
|
import android.content.Context;
|
|
import android.util.DisplayMetrics;
|
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
|
import androidx.recyclerview.widget.LinearSmoothScroller;
|
|
import androidx.recyclerview.widget.RecyclerView;
|
|
|
|
/* loaded from: classes2.dex */
|
|
class SmoothCalendarLayoutManager extends LinearLayoutManager {
|
|
private static final float MILLISECONDS_PER_INCH = 100.0f;
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public SmoothCalendarLayoutManager(Context context, int i, boolean z) {
|
|
super(context, i, z);
|
|
}
|
|
|
|
@Override // androidx.recyclerview.widget.LinearLayoutManager, androidx.recyclerview.widget.RecyclerView.LayoutManager
|
|
public void smoothScrollToPosition(RecyclerView recyclerView, RecyclerView.State state, int i) {
|
|
LinearSmoothScroller linearSmoothScroller = new LinearSmoothScroller(recyclerView.getContext()) { // from class: com.google.android.material.datepicker.SmoothCalendarLayoutManager.1
|
|
/* JADX INFO: Access modifiers changed from: protected */
|
|
@Override // androidx.recyclerview.widget.LinearSmoothScroller
|
|
public float calculateSpeedPerPixel(DisplayMetrics displayMetrics) {
|
|
return 100.0f / displayMetrics.densityDpi;
|
|
}
|
|
};
|
|
linearSmoothScroller.setTargetPosition(i);
|
|
startSmoothScroll(linearSmoothScroller);
|
|
}
|
|
}
|