不实用换肤模式,后面采用别的换肤方案

Signed-off-by: 董宏宇 <martindhy@gmail.com>
This commit is contained in:
董宏宇
2021-09-18 19:02:36 +08:00
parent 2da2047f1e
commit bb4926a7ee
17 changed files with 114 additions and 249 deletions

View File

@@ -15,8 +15,6 @@ import androidx.core.content.ContextCompat;
import com.mogo.module.extensions.R;
import com.mogo.module.extensions.view.LiveRoundLayout;
import com.mogo.skin.support.IMogoSkinCompatSupportable;
import com.mogo.skin.support.helper.MogoSkinCompatBackgroundHelperDelegate;
import com.mogo.utils.logger.Logger;
import com.tencent.rtmp.ITXLivePlayListener;
import com.tencent.rtmp.TXLiveConstants;
@@ -27,7 +25,7 @@ import com.tencent.rtmp.ui.TXCloudVideoView;
/**
* V2XLiveGSYVideoView
*/
public class CameraLiveGSYVideoView extends LiveRoundLayout implements IMogoSkinCompatSupportable {
public class CameraLiveGSYVideoView extends LiveRoundLayout {
private static final String TAG = "CameraLiveGSYVideoView";
private TXCloudVideoView mTxcVideoView;
private ProgressBar mLoading;
@@ -35,7 +33,6 @@ public class CameraLiveGSYVideoView extends LiveRoundLayout implements IMogoSkin
private ConstraintLayout mClLoadError;
private TextView mTvRefreshButton;
private MogoSkinCompatBackgroundHelperDelegate mBackgroundTintHelper;
private String mLiveUrl;
@@ -51,8 +48,6 @@ public class CameraLiveGSYVideoView extends LiveRoundLayout implements IMogoSkin
super(context, attrs, defStyleAttr);
initView(context);
mBackgroundTintHelper = new MogoSkinCompatBackgroundHelperDelegate(this);
mBackgroundTintHelper.loadFromAttributes(attrs, defStyleAttr);
}
private void initView(Context context) {
@@ -175,10 +170,4 @@ public class CameraLiveGSYVideoView extends LiveRoundLayout implements IMogoSkin
super.onDetachedFromWindow();
}
@Override
public void applySkin() {
if (mBackgroundTintHelper != null) {
mBackgroundTintHelper.applySkin();
}
}
}

View File

@@ -8,17 +8,13 @@ import android.graphics.RectF;
import android.util.AttributeSet;
import android.widget.RelativeLayout;
import com.mogo.module.extensions.R;
import com.mogo.skin.support.IMogoSkinCompatSupportable;
import com.mogo.skin.support.helper.MogoSkinCompatBackgroundHelperDelegate;
public class LiveRoundLayout extends RelativeLayout implements IMogoSkinCompatSupportable {
public class LiveRoundLayout extends RelativeLayout {
private float roundLayoutRadius = 14f;
private Path roundPath;
private RectF rectF;
private MogoSkinCompatBackgroundHelperDelegate mBackgroundTintHelper;
public LiveRoundLayout(Context context) {
this(context, null);
@@ -37,8 +33,6 @@ public class LiveRoundLayout extends RelativeLayout implements IMogoSkinCompatSu
init();
mBackgroundTintHelper = new MogoSkinCompatBackgroundHelperDelegate(this);
mBackgroundTintHelper.loadFromAttributes(attrs, defStyleAttr);
}
@@ -75,11 +69,5 @@ public class LiveRoundLayout extends RelativeLayout implements IMogoSkinCompatSu
super.draw(canvas);
}
@Override
public void applySkin() {
if (mBackgroundTintHelper != null) {
mBackgroundTintHelper.applySkin();
}
}
}

View File

@@ -12,9 +12,6 @@ import android.widget.TextView;
import androidx.annotation.Nullable;
import androidx.appcompat.widget.AppCompatTextView;
import com.mogo.skin.support.IMogoSkinCompatSupportable;
import com.mogo.skin.support.helper.MogoSkinCompatTextHelperDelegate;
import java.lang.reflect.Field;
/**
@@ -22,9 +19,8 @@ import java.lang.reflect.Field;
*
* @author tongchenfei
*/
public class StrokeTextView extends AppCompatTextView implements IMogoSkinCompatSupportable {
public class StrokeTextView extends AppCompatTextView {
private MogoSkinCompatTextHelperDelegate textHelperDelegate;
public StrokeTextView(Context context) {
this(context,null);
@@ -36,13 +32,11 @@ public class StrokeTextView extends AppCompatTextView implements IMogoSkinCompat
public StrokeTextView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
textHelperDelegate = new MogoSkinCompatTextHelperDelegate(this);
}
@Override
public void setTextAppearance(Context context, int resId) {
super.setTextAppearance(context, resId);
textHelperDelegate.onSetTextAppearance(context, resId);
}
@Override
@@ -94,8 +88,4 @@ public class StrokeTextView extends AppCompatTextView implements IMogoSkinCompat
}
}
@Override
public void applySkin() {
textHelperDelegate.applySkin();
}
}