调整头像相关
This commit is contained in:
parent
8f9d558043
commit
d4549793d1
@ -4,7 +4,6 @@ import android.content.Context;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.util.Log;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.RelativeLayout;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@ -130,6 +129,7 @@ public class LiveExoPlayerManager {
|
||||
@Override
|
||||
public void onPlaybackStateChanged(int playbackState) {
|
||||
Player.Listener.super.onPlaybackStateChanged(playbackState);
|
||||
listener.onPlaybackStateChanged(playbackState);
|
||||
Log.i(TAG, "onPlaybackStateChanged 1: " + playbackState);
|
||||
if (playbackState == Player.STATE_READY && !player1.isPlaying()) {
|
||||
player2.stop();
|
||||
@ -188,6 +188,9 @@ public class LiveExoPlayerManager {
|
||||
public void onIsLoadingChanged(boolean isLoading) {
|
||||
Player.Listener.super.onIsLoadingChanged(isLoading);
|
||||
Log.i(TAG, "onIsLoadingChanged: 1 " + isLoading);
|
||||
if (listener != null) {
|
||||
listener.onIsLoadingChanged(isLoading);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1243,9 +1243,11 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
||||
Player.Listener.super.onPlaybackStateChanged(playbackState);
|
||||
if (playbackState == Player.STATE_BUFFERING) {
|
||||
//showLoadingDialog();
|
||||
//mLoading.setVisibility(View.VISIBLE);
|
||||
OkDownload.getInstance().pauseAll();
|
||||
Log.i(TAG, "onPlaybackStateChanged: 缓存中");
|
||||
} else {
|
||||
//mLoading.setVisibility(View.INVISIBLE);
|
||||
Log.i(TAG, "onPlaybackStateChanged: 播放中");
|
||||
}
|
||||
}
|
||||
|
@ -128,10 +128,12 @@ public class EditProfileActivity extends AbsActivity {
|
||||
@Override
|
||||
public void onSuccess(File file) {
|
||||
if (file != null) {
|
||||
System.err.println("头像---->收到头像文件 file = "+file.getAbsolutePath()+" | length = "+file.length());
|
||||
ImgLoader.display(mContext, file, mAvatar);
|
||||
MainHttpUtil.updateAvatar(file, new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
System.err.println("头像---->上传头像文件成功");
|
||||
Log.e("updateAvatar", "code:" + code + " msg:" + msg + " info[0]:" + info[0].toString());
|
||||
if (code == 0 && info.length > 0) {
|
||||
ToastUtil.show(R.string.edit_profile_update_avatar_success);
|
||||
@ -140,6 +142,9 @@ public class EditProfileActivity extends AbsActivity {
|
||||
JSONObject obj = JSON.parseObject(info[0]);
|
||||
bean.setAvatar(obj.getString("avatar"));
|
||||
bean.setAvatarThumb(obj.getString("avatarThumb"));
|
||||
mUserBean.setAvatar(obj.getString("avatar"));
|
||||
mUserBean.setAvatarThumb(obj.getString("avatarThumb"));
|
||||
|
||||
V2TIMUserFullInfo v2TIMUserFullInfo = new V2TIMUserFullInfo();
|
||||
v2TIMUserFullInfo.setFaceUrl(obj.getString("avatarThumb"));
|
||||
V2TIMManager.getInstance().setSelfInfo(v2TIMUserFullInfo, new V2TIMCallback() {
|
||||
@ -418,7 +423,9 @@ public class EditProfileActivity extends AbsActivity {
|
||||
R.string.camera, R.string.alumb, R.string.me_edit_avatar_system}, new DialogUitl.StringArrayDialogCallback() {
|
||||
@Override
|
||||
public void onItemClick(String text, int tag) {
|
||||
if (Integer.parseInt(IMLoginManager.get(mContext).getUserInfo().getLevel()) < 5 && tag != R.string.me_edit_avatar_system) {
|
||||
if ((Integer.parseInt(IMLoginManager.get(mContext).getUserInfo().getLevel()) < 5 && tag != R.string.me_edit_avatar_system)//等级小于5并且不是选择系统头像
|
||||
&& !IMLoginManager.get(mContext).getUserInfo().anchorUserType()//非主播
|
||||
) {
|
||||
ToastUtil.show(R.string.me_edit_avatar_system_tip);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user