6.1.0 - 变更包名 新增投影媒体权限开关/tasks模块 扩展内置模块方法 重构内置模块及构建脚本
This commit is contained in:
@@ -2,13 +2,12 @@ package androidx.recyclerview.widget;
|
||||
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.widget.EdgeEffectCompat;
|
||||
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.EdgeEffect;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.widget.EdgeEffectCompat;
|
||||
|
||||
import com.stardust.theme.ThemeColor;
|
||||
import com.stardust.theme.ThemeColorManager;
|
||||
import com.stardust.theme.ThemeColorMutable;
|
||||
@@ -72,19 +71,18 @@ public class ThemeColorRecyclerView extends RecyclerView implements ThemeColorMu
|
||||
ThemeColorManager.add(this);
|
||||
}
|
||||
|
||||
// TODO support api 21 below
|
||||
private boolean setEdgeEffectColor(EdgeEffectCompat compat, int color) {
|
||||
if (compat == null)
|
||||
return false;
|
||||
try {
|
||||
if (Build.VERSION.SDK_INT >= 21) { // Android L
|
||||
EdgeEffect edgeEffect = (EdgeEffect) mEdgeEffectField.get(compat);
|
||||
EdgeEffect edgeEffect = (EdgeEffect) mEdgeEffectField.get(compat);
|
||||
if (edgeEffect != null) {
|
||||
edgeEffect.setColor(color);
|
||||
}
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
return true;
|
||||
} catch (Exception ignored) {
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user