Updated AndroidX

pull/174/head
M66B 5 years ago
parent 20f0e0a15a
commit 70422e524a

@ -188,7 +188,7 @@ dependencies {
def core_version = "1.3.0-alpha01" def core_version = "1.3.0-alpha01"
def appcompat_version = "1.2.0-alpha02" def appcompat_version = "1.2.0-alpha02"
def fragment_version = "1.2.0" def fragment_version = "1.2.1"
def recyclerview_version = "1.2.0-alpha01" def recyclerview_version = "1.2.0-alpha01"
def coordinatorlayout_version = "1.1.0" def coordinatorlayout_version = "1.1.0"
def constraintlayout_version = "2.0.0-beta3" def constraintlayout_version = "2.0.0-beta3"
@ -202,7 +202,7 @@ dependencies {
def room_version = "2.2.3" def room_version = "2.2.3"
def paging_version = "2.1.1" def paging_version = "2.1.1"
def preference_version = "1.1.0" def preference_version = "1.1.0"
def work_version = "2.3.0" def work_version = "2.3.1"
def exif_version = "1.2.0-beta01" def exif_version = "1.2.0-beta01"
def biometric_version = "1.0.1" def biometric_version = "1.0.1"
def billingclient_version = "2.1.0" def billingclient_version = "2.1.0"
@ -234,7 +234,7 @@ dependencies {
// https://mvnrepository.com/artifact/androidx.recyclerview/recyclerview // https://mvnrepository.com/artifact/androidx.recyclerview/recyclerview
// https://mvnrepository.com/artifact/androidx.recyclerview/recyclerview-selection // https://mvnrepository.com/artifact/androidx.recyclerview/recyclerview-selection
implementation "androidx.recyclerview:recyclerview:$recyclerview_version" implementation "androidx.recyclerview:recyclerview:$recyclerview_version"
//implementation "androidx.recyclerview:recyclerview-selection:1.1.0-beta01" //implementation "androidx.recyclerview:recyclerview-selection:1.1.0-rc01"
// https://mvnrepository.com/artifact/androidx.coordinatorlayout/coordinatorlayout // https://mvnrepository.com/artifact/androidx.coordinatorlayout/coordinatorlayout
implementation "androidx.coordinatorlayout:coordinatorlayout:$coordinatorlayout_version" implementation "androidx.coordinatorlayout:coordinatorlayout:$coordinatorlayout_version"

@ -22,6 +22,7 @@ import static androidx.recyclerview.selection.Shared.DEBUG;
import static androidx.recyclerview.selection.Shared.VERBOSE; import static androidx.recyclerview.selection.Shared.VERBOSE;
import android.graphics.Point; import android.graphics.Point;
import android.graphics.Rect;
import android.util.Log; import android.util.Log;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
@ -243,31 +244,33 @@ final class ViewAutoScroller extends AutoScroller {
*/ */
private static final class RuntimeHost extends ScrollHost { private static final class RuntimeHost extends ScrollHost {
private final RecyclerView mRecyclerView; private final RecyclerView mView;
RuntimeHost(@NonNull RecyclerView recyclerView) { RuntimeHost(@NonNull RecyclerView view) {
mRecyclerView = recyclerView; mView = view;
} }
@Override @Override
void runAtNextFrame(@NonNull Runnable r) { void runAtNextFrame(@NonNull Runnable r) {
ViewCompat.postOnAnimation(mRecyclerView, r); ViewCompat.postOnAnimation(mView, r);
} }
@Override @Override
void removeCallback(@NonNull Runnable r) { void removeCallback(@NonNull Runnable r) {
mRecyclerView.removeCallbacks(r); mView.removeCallbacks(r);
} }
@Override @Override
void scrollBy(int dy) { void scrollBy(int dy) {
if (VERBOSE) Log.v(TAG, "Scrolling view by: " + dy); if (VERBOSE) Log.v(TAG, "Scrolling view by: " + dy);
mRecyclerView.scrollBy(0, dy); mView.scrollBy(0, dy);
} }
@Override @Override
int getViewHeight() { int getViewHeight() {
return mRecyclerView.getHeight(); Rect r = new Rect();
mView.getGlobalVisibleRect(r);
return r.height();
} }
} }
} }

Loading…
Cancel
Save