我有一个片段,我用它来更新我的应用程序中的个人资料图片。个人资料图片位于导航标题中。当新的个人资料图片成功上传到服务器时,我在家庭活动中调用接口方法来更新个人资料图片。该方法被调用但图片未被更新。以下是我的代码。任何帮助将不胜感激。
//Interface
public interface UpdateProfilePicture {
void updateDp();
}
// method calling after successful uploading of picture
val updateDp = activity as UpdateProfilePicture
updateDp.updateDp()
//Overriding method in home activity
override fun updateDp() {
Log.e("Changing profile ","Profile picture change user home activity " +"http://console.salelinecrm.com/saleslineapi/GetprofileImage/" + objSaveData.getString(ConstantValue.USER_ID));
Picasso.with(baseContext)
.load("http://console.salelinecrm.com/saleslineapi/GetprofileImage/" + objSaveData.getString(ConstantValue.USER_ID))
.into(imageView);
}