换肤
This commit is contained in:
@@ -174,12 +174,7 @@ public class AppsPresenter extends Presenter< AppsView > {
|
||||
int page = 0;
|
||||
int counter = 0;
|
||||
for ( AppInfo appInfo : list ) {
|
||||
if ( counter < AppsConst.TOTAL_SIZE_EACH_PAGE ) {
|
||||
counter++;
|
||||
} else {
|
||||
page++;
|
||||
counter = 0;
|
||||
}
|
||||
page = counter++ / AppsConst.TOTAL_SIZE_EACH_PAGE;
|
||||
if ( !result.containsKey( page ) ) {
|
||||
result.put( page, new ArrayList<>() );
|
||||
}
|
||||
|
||||
@@ -7,14 +7,9 @@ import android.widget.ImageView;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.bumptech.glide.load.Transformation;
|
||||
import com.bumptech.glide.load.engine.Resource;
|
||||
import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPoolAdapter;
|
||||
import com.bumptech.glide.load.resource.bitmap.BitmapResource;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.bumptech.glide.request.target.SimpleTarget;
|
||||
import com.bumptech.glide.request.transition.Transition;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
|
||||
public
|
||||
/**
|
||||
@@ -38,15 +33,7 @@ class SkinAbleBitmapTarget extends SimpleTarget< Bitmap > {
|
||||
public void onResourceReady( @NonNull Bitmap resource, @Nullable Transition< ? super Bitmap > transition ) {
|
||||
try {
|
||||
mTarget.setImageResource( 0 );
|
||||
if(mOptions.getTransformations().containsKey(Bitmap.class)) {
|
||||
Transformation<Bitmap> t = (Transformation<Bitmap>) mOptions.getTransformations().get(Bitmap.class);
|
||||
BitmapResource r = BitmapResource.obtain(resource, new BitmapPoolAdapter());
|
||||
Resource<Bitmap> r2 = t.transform(AbsMogoApplication.getApp(), r, resource.getWidth(),
|
||||
resource.getHeight());
|
||||
mTarget.setImageBitmap(r2.get());
|
||||
}else {
|
||||
mTarget.setImageBitmap(resource);
|
||||
}
|
||||
mTarget.setImageBitmap(resource);
|
||||
} catch( Exception e ){
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -544,7 +544,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
Logger.d(TAG, "renderUserInfo: " + userInfo);
|
||||
RequestOptions options =
|
||||
new RequestOptions().circleCrop().placeholder(R.drawable.model_ext_default_user_head).error(R.drawable.model_ext_default_user_head);
|
||||
GlideApp.with(getContext()).asBitmap().load(userInfo.getHeadImgurl()).into(new SkinAbleBitmapTarget(mUserHeadImg, options));
|
||||
GlideApp.with(getContext()).asBitmap().apply( options ).load(userInfo.getHeadImgurl()).into(new SkinAbleBitmapTarget(mUserHeadImg, options));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -57,8 +57,7 @@ class PushMessageAdapter : RecyclerView.Adapter<PushMessageAdapter.MessageViewHo
|
||||
return MessageViewHolder(
|
||||
LayoutInflater.from(parent.context).inflate(
|
||||
R.layout.module_push_message_item,
|
||||
parent,
|
||||
false
|
||||
null
|
||||
)
|
||||
)
|
||||
}
|
||||
@@ -98,7 +97,7 @@ class PushMessageAdapter : RecyclerView.Adapter<PushMessageAdapter.MessageViewHo
|
||||
} else {
|
||||
pushClick.setOnClickListener(null)
|
||||
}
|
||||
getApis(itemView.context).imageLoaderApi.displayImage(bean.appIcon, pushAppIcon)
|
||||
// getApis(itemView.context).imageLoaderApi.displayImage(bean.appIcon, pushAppIcon)
|
||||
pushTitle.text = bean.title
|
||||
pushContent.text = bean.content
|
||||
pushContent.visibility = if (bean.content.isNullOrEmpty()) View.GONE else View.VISIBLE
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
android:layout_width="@dimen/module_push_ui_image_width"
|
||||
android:layout_height="@dimen/module_push_ui_image_height"
|
||||
android:layout_marginLeft="@dimen/module_push_ui_image_marLeft"
|
||||
android:background="#333333"
|
||||
android:scaleType="fitXY"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
|
||||
@@ -73,7 +73,6 @@
|
||||
android:layout_width="@dimen/module_push_ui_image_width_vertical"
|
||||
android:layout_height="@dimen/module_push_ui_image_height_vertical"
|
||||
android:layout_gravity="center"
|
||||
android:background="#333333"
|
||||
android:layout_marginBottom="@dimen/module_push_ui_content_marginTop_vertical"
|
||||
android:scaleType="fitXY"
|
||||
app:riv_corner_radius="@dimen/module_push_ui_image_corner" />
|
||||
|
||||
@@ -335,6 +335,9 @@ public class MockIntentHandler implements IntentHandler {
|
||||
case 17:
|
||||
DebugConfig.setRequestOnlineCarData( intent.getBooleanExtra( "status", true ) );
|
||||
break;
|
||||
case 30:
|
||||
MarkerServiceHandler.getMapService().getMapUIController().forceRender();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user