opt tanlu ui
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 11 KiB |
@@ -4,18 +4,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/tanlu_module_card_height"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:background="@drawable/tanlu_gradual_change_bg">
|
||||
|
||||
<!--视频播放器和图片播放器-->
|
||||
<!-- <RelativeLayout-->
|
||||
<!-- android:id="@+id/media_layout"-->
|
||||
<!-- android:layout_width="@dimen/tanlu_module_card_video_width"-->
|
||||
<!-- android:layout_height="match_parent"-->
|
||||
<!-- android:layout_marginTop="@dimen/tanlu_module_card_margin_left"-->
|
||||
<!-- android:layout_marginBottom="@dimen/tanlu_module_card_margin_left"-->
|
||||
<!-- android:layout_marginRight="@dimen/tanlu_module_margin_right"-->
|
||||
<!-- android:layout_marginLeft="@dimen/tanlu_module_card_margin_left">-->
|
||||
|
||||
>
|
||||
<!-- android:background="@drawable/tanlu_gradual_change_bg"-->
|
||||
<com.mogo.module.tanlu.view.RoundLayout
|
||||
android:id="@+id/media_layout"
|
||||
android:layout_width="@dimen/tanlu_module_card_video_width"
|
||||
@@ -24,7 +14,7 @@
|
||||
android:layout_marginTop="@dimen/tanlu_module_card_margin_left"
|
||||
android:layout_marginRight="@dimen/tanlu_module_margin_right"
|
||||
android:layout_marginBottom="@dimen/tanlu_module_card_margin_left"
|
||||
android:background="@drawable/tanlu_gradual_change_bg">
|
||||
android:background="@color/tanlu_555A_F5F5">
|
||||
|
||||
<com.mogo.module.tanlu.video.SimpleCoverVideoPlayer
|
||||
android:id="@+id/video_player_main"
|
||||
@@ -33,16 +23,23 @@
|
||||
android:layout_centerInParent="true"
|
||||
android:visibility="gone" />
|
||||
|
||||
<ImageView
|
||||
<com.mogo.service.imageloader.MogoImageView
|
||||
android:id="@+id/tanlu_photo_imageView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@drawable/tanlu_normal_image"
|
||||
android:scaleType="fitXY" />
|
||||
</com.mogo.module.tanlu.view.RoundLayout>
|
||||
android:scaleType="center"
|
||||
app:miv_failureHolder="@drawable/tanlu_icon_logo"
|
||||
app:miv_overlayImageId="@drawable/tanlu_icon_logo"
|
||||
app:miv_placeHolder="@drawable/tanlu_icon_logo" />
|
||||
|
||||
<!-- </RelativeLayout>-->
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/tanlu_photo_imageView"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="match_parent"-->
|
||||
<!-- android:layout_centerVertical="true"-->
|
||||
<!-- android:src="@drawable/tanlu_normal_image"-->
|
||||
<!-- android:scaleType="fitXY" />-->
|
||||
</com.mogo.module.tanlu.view.RoundLayout>
|
||||
|
||||
<!--右侧数据-->
|
||||
<RelativeLayout
|
||||
|
||||
@@ -51,5 +51,6 @@
|
||||
<color name="tanlu_dialog_bt_right_color">#50526E</color>
|
||||
<color name="tanlu_top_bg_startcolor">#5E6079</color>
|
||||
<color name="tanlu_top_bg_endcolor">#3F4057</color>
|
||||
<color name="tanlu_555A_F5F5">#555A75</color>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -191,10 +191,10 @@ public class V2XSurroundingAdapter extends RecyclerView.Adapter<V2XSurroundingVi
|
||||
typeName = "封路";
|
||||
break;
|
||||
case MarkerPoiTypeEnum.FOURS_ICE:
|
||||
typeName = "路面结冰";
|
||||
typeName = "道路结冰";
|
||||
break;
|
||||
case MarkerPoiTypeEnum.FOURS_FOG:
|
||||
typeName = "出现浓雾";
|
||||
typeName = "浓雾";
|
||||
break;
|
||||
case MarkerPoiTypeEnum.TRAFFIC_CHECK:
|
||||
typeName = "交通检查";
|
||||
@@ -203,10 +203,10 @@ public class V2XSurroundingAdapter extends RecyclerView.Adapter<V2XSurroundingVi
|
||||
typeName = "交通事故";
|
||||
break;
|
||||
case MarkerPoiTypeEnum.FOURS_BLOCK_UP:
|
||||
typeName = "道路拥堵";
|
||||
typeName = "拥堵";
|
||||
break;
|
||||
case MarkerPoiTypeEnum.FOURS_ROAD_WORK:
|
||||
typeName = "道路施工";
|
||||
typeName = "施工";
|
||||
break;
|
||||
case MarkerPoiTypeEnum.FOURS_PONDING:
|
||||
typeName = "道路积水";
|
||||
|
||||
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 11 KiB |
@@ -13,5 +13,6 @@
|
||||
<color name="tanlu_dialog_bt_right_color_light">#E8E8E8</color>
|
||||
<color name="tanlu_top_bg_startcolor_light">#F5F5F5</color>
|
||||
<color name="tanlu_top_bg_endcolor_light">#FFFFFF</color>
|
||||
<color name="tanlu_555A_F5F5_light">#F5F5F5</color>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -47,7 +47,7 @@ dependencies {
|
||||
// implementation 'skin.support:skin-support-constraint-layout:4.0.5' // skin-support-constraint-layout ConstraintLayout 控件支持[可选]
|
||||
|
||||
implementation project(":skin:skin-support")
|
||||
implementation project(":skin:skin-support-appcompat")
|
||||
api project(":skin:skin-support-appcompat")
|
||||
implementation project(":skin:skin-support-cardview")
|
||||
implementation project(":skin:skin-support-constraint-layout")
|
||||
implementation project(":skin:skin-support-design")
|
||||
|
||||
@@ -65,16 +65,16 @@ abstract class MogoSkinCompatHelperDelegate implements IMogoSkinCompatSupportabl
|
||||
|
||||
protected static Method getLoadFromAttributesMethod() throws Exception {
|
||||
if ( mTargetClazz != null ) {
|
||||
Method method = mTargetClazz.getDeclaredMethod( "loadFromAttributes", AttributeSet.class, int.class );
|
||||
method.setAccessible( true );
|
||||
sMethodLoadFromAttributes = mTargetClazz.getDeclaredMethod( "loadFromAttributes", AttributeSet.class, int.class );
|
||||
sMethodLoadFromAttributes.setAccessible( true );
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static Method getApplySkinMethod() throws Exception {
|
||||
if ( mTargetClazz != null ) {
|
||||
Method method = mTargetClazz.getDeclaredMethod( "applySkin" );
|
||||
method.setAccessible( true );
|
||||
sMethodApplySkin = mTargetClazz.getDeclaredMethod( "applySkin" );
|
||||
sMethodApplySkin.setAccessible( true );
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||