面板阴影图片-缺少白天模式
This commit is contained in:
@@ -3,6 +3,7 @@ package com.mogo.module.v2x.fragment;
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.coordinatorlayout.widget.CoordinatorLayout;
|
||||
@@ -37,7 +38,7 @@ public class V2XScenarioHistoryFragment
|
||||
private String TAG = "ScenarioHistoryFragment";
|
||||
|
||||
private V2XListEmptyView mEmptyView;
|
||||
private CoordinatorLayout mClHistoryList;
|
||||
private LinearLayout mClHistoryList;
|
||||
private RecyclerView mRecyclerView;
|
||||
private V2XScenarioHistoryAdapter mV2XScenarioHistoryAdapter;
|
||||
private ArrayList<V2XHistoryScenarioData> mV2XHistoryScenarioData = new ArrayList<>();
|
||||
|
||||
@@ -18,6 +18,9 @@ import com.mogo.skin.support.IMogoSkinCompatSupportable;
|
||||
import com.mogo.skin.support.IMogoSkinSupportInstaller;
|
||||
import com.mogo.skin.support.MogoSkinManager;
|
||||
import com.mogo.skin.support.SkinMode;
|
||||
import com.mogo.skin.support.helper.MogoSkinCompatBackgroundHelperDelegate;
|
||||
import com.mogo.skin.support.helper.MogoSkinCompatHelperDelegate;
|
||||
import com.mogo.skin.support.helper.MogoSkinCompatTextHelperDelegate;
|
||||
|
||||
/**
|
||||
* author : donghongyu
|
||||
@@ -31,19 +34,14 @@ public class RoundConstraintLayout extends ConstraintLayout implements IMogoSkin
|
||||
private float roundLayoutRadius = 14f;
|
||||
private Path roundPath;
|
||||
private RectF rectF;
|
||||
|
||||
private MogoSkinCompatBackgroundHelperDelegate mBackgroundTintHelper;
|
||||
|
||||
public RoundConstraintLayout(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public RoundConstraintLayout(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
this(context, attrs);
|
||||
}
|
||||
|
||||
public RoundConstraintLayout(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
|
||||
this(context, attrs, 0);
|
||||
TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.RoundLayout);
|
||||
roundLayoutRadius = typedArray.getDimensionPixelSize(R.styleable.RoundLayout_roundLayoutRadius, (int) roundLayoutRadius);
|
||||
typedArray.recycle();
|
||||
@@ -51,6 +49,13 @@ public class RoundConstraintLayout extends ConstraintLayout implements IMogoSkin
|
||||
init();
|
||||
}
|
||||
|
||||
public RoundConstraintLayout(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
mBackgroundTintHelper = new MogoSkinCompatBackgroundHelperDelegate(this);
|
||||
mBackgroundTintHelper.loadFromAttributes(attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
|
||||
private void init() {
|
||||
setWillNotDraw(false);//如果你继承的是ViewGroup,注意此行,否则draw方法是不会回调的;
|
||||
roundPath = new Path();
|
||||
@@ -84,9 +89,11 @@ public class RoundConstraintLayout extends ConstraintLayout implements IMogoSkin
|
||||
super.draw(canvas);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void applySkin() {
|
||||
|
||||
if (mBackgroundTintHelper != null) {
|
||||
mBackgroundTintHelper.applySkin();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user