opt tanlu ui
This commit is contained in:
@@ -66,7 +66,7 @@ public class TanluSlideAdapterNew extends RecyclerView.Adapter<TanluSlideViewHol
|
||||
private TextView mDistanceTv;
|
||||
private TextView mTimeTv;
|
||||
private SimpleCoverVideoPlayer simpleCoverVideoPlayer;
|
||||
private ImageView autoZoomInImageView;
|
||||
private MogoImageView autoZoomInImageView;
|
||||
private MogoImageView mHeadImage;
|
||||
private ImageView mChatImage;
|
||||
private ImageView mLikeImage;
|
||||
@@ -330,19 +330,18 @@ public class TanluSlideAdapterNew extends RecyclerView.Adapter<TanluSlideViewHol
|
||||
simpleCoverVideoPlayer.setVisibility(GONE);
|
||||
autoZoomInImageView.setVisibility(View.VISIBLE);
|
||||
//加载图片
|
||||
RequestOptions requestOptions = new RequestOptions()
|
||||
.placeholder(R.drawable.tanlu_normal_image)
|
||||
.error(R.drawable.tanlu_normal_image);
|
||||
// RequestOptions requestOptions = new RequestOptions()
|
||||
// .placeholder(R.drawable.tanlu_normal_image)
|
||||
// .error(R.drawable.tanlu_normal_image);
|
||||
//
|
||||
// Glide.with(mContext)
|
||||
// .asBitmap()
|
||||
// .load(mImageUrl)
|
||||
// .apply(requestOptions)
|
||||
// .into(autoZoomInImageView);
|
||||
// .into(new SkinAbleBitmapTarget(autoZoomInImageView, requestOptions));
|
||||
|
||||
mogoImageloader.displayImage(mImageUrl, autoZoomInImageView);
|
||||
|
||||
Glide.with(mContext)
|
||||
.asBitmap()
|
||||
.load(mImageUrl)
|
||||
.apply(requestOptions)
|
||||
.into(new SkinAbleBitmapTarget(autoZoomInImageView, requestOptions));
|
||||
}
|
||||
|
||||
traceVideoPlayStatusData();
|
||||
@@ -372,14 +371,16 @@ public class TanluSlideAdapterNew extends RecyclerView.Adapter<TanluSlideViewHol
|
||||
autoZoomInImageView.setVisibility(View.VISIBLE);
|
||||
Logger.d(TAG, "refreshPhotoData imageUrl = " + imageUrl);
|
||||
//加载图片
|
||||
RequestOptions requestOptions = new RequestOptions()
|
||||
.placeholder(R.drawable.tanlu_normal_image)
|
||||
.error(R.drawable.tanlu_normal_image);
|
||||
Glide.with(mContext)
|
||||
.asBitmap()
|
||||
.load(imageUrl)
|
||||
.apply(requestOptions)
|
||||
.into(new SkinAbleBitmapTarget(autoZoomInImageView, requestOptions));
|
||||
// RequestOptions requestOptions = new RequestOptions()
|
||||
// .placeholder(R.drawable.tanlu_normal_image)
|
||||
// .error(R.drawable.tanlu_normal_image);
|
||||
// Glide.with(mContext)
|
||||
// .asBitmap()
|
||||
// .load(imageUrl)
|
||||
// .apply(requestOptions)
|
||||
// .into(new SkinAbleBitmapTarget(autoZoomInImageView, requestOptions));
|
||||
|
||||
mogoImageloader.displayImage(imageUrl, autoZoomInImageView);
|
||||
}
|
||||
|
||||
|
||||
@@ -468,19 +469,19 @@ public class TanluSlideAdapterNew extends RecyclerView.Adapter<TanluSlideViewHol
|
||||
typeName = "封路";
|
||||
break;
|
||||
case TanluConstants.TANLU_ROAD_CONSTRUCTION:
|
||||
typeName = "道路施工";
|
||||
typeName = "施工";
|
||||
break;
|
||||
case TanluConstants.TANLU_ROAD_CONGESTION_COMPAT:
|
||||
typeName = "道路拥堵";
|
||||
typeName = "拥堵";
|
||||
break;
|
||||
case TanluConstants.TANLU_ROAD_PONDING:
|
||||
typeName = "道路积水";
|
||||
break;
|
||||
case TanluConstants.TANLU_ROAD_ICING:
|
||||
typeName = "路面结冰";
|
||||
typeName = "道路结冰";
|
||||
break;
|
||||
case TanluConstants.TANLU_ROAD_HEAVY_FOG:
|
||||
typeName = "出现浓雾";
|
||||
typeName = "浓雾";
|
||||
break;
|
||||
case TanluConstants.TANLU_ROAD_ACCIDENT:
|
||||
typeName = "交通事故";
|
||||
|
||||
@@ -58,7 +58,7 @@ class SimpleCoverVideoPlayer : StandardGSYVideoPlayer {
|
||||
fun loadCoverImage(url: String, mContext: Context) {
|
||||
//加载图片
|
||||
val requestOptions = RequestOptions()
|
||||
.placeholder(R.drawable.tanlu_normal_image)
|
||||
// .placeholder(R.drawable.tanlu_normal_image)
|
||||
.error(R.drawable.tanlu_normal_image)
|
||||
Glide.with(mContext).asBitmap()
|
||||
.load(url)
|
||||
|
||||
@@ -9,6 +9,8 @@ import android.util.AttributeSet;
|
||||
import android.widget.RelativeLayout;
|
||||
|
||||
import com.mogo.module.tanlu.R;
|
||||
import com.mogo.skin.support.IMogoSkinCompatSupportable;
|
||||
import com.mogo.skin.support.helper.MogoSkinCompatBackgroundHelperDelegate;
|
||||
|
||||
/**
|
||||
* author : donghongyu
|
||||
@@ -17,29 +19,34 @@ import com.mogo.module.tanlu.R;
|
||||
* desc :
|
||||
* version: 1.0
|
||||
*/
|
||||
public class RoundLayout extends RelativeLayout {
|
||||
public class RoundLayout extends RelativeLayout implements IMogoSkinCompatSupportable {
|
||||
private float roundLayoutRadius = 14f;
|
||||
private Path roundPath;
|
||||
private RectF rectF;
|
||||
private MogoSkinCompatBackgroundHelperDelegate mBackgroundTintHelper;
|
||||
|
||||
public RoundLayout(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public RoundLayout(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
this(context, attrs);
|
||||
public RoundLayout(Context context, AttributeSet attrs) {
|
||||
this(context, attrs, 0);
|
||||
}
|
||||
|
||||
public RoundLayout(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
public RoundLayout(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
|
||||
TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.RoundLayout);
|
||||
roundLayoutRadius = typedArray.getDimensionPixelSize(R.styleable.RoundLayout_roundLayoutRadius, (int) roundLayoutRadius);
|
||||
typedArray.recycle();
|
||||
|
||||
init();
|
||||
|
||||
mBackgroundTintHelper = new MogoSkinCompatBackgroundHelperDelegate(this);
|
||||
mBackgroundTintHelper.loadFromAttributes(attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
|
||||
private void init() {
|
||||
setWillNotDraw(false);//如果你继承的是ViewGroup,注意此行,否则draw方法是不会回调的;
|
||||
roundPath = new Path();
|
||||
@@ -72,5 +79,13 @@ public class RoundLayout extends RelativeLayout {
|
||||
}
|
||||
super.draw(canvas);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applySkin() {
|
||||
if (mBackgroundTintHelper != null) {
|
||||
mBackgroundTintHelper.applySkin();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user