调整聊天室滑动动画效果速度

This commit is contained in:
zlzw 2023-01-07 17:13:27 +08:00
parent 098e9bf6ba
commit 01a2d66585
3 changed files with 3 additions and 3 deletions

View File

@ -10,7 +10,7 @@ import androidx.recyclerview.widget.LinearSmoothScroller;
import androidx.recyclerview.widget.RecyclerView;
public class LiveChatRecyclerViewLayoutManager extends LinearLayoutManager {
private static final float MILLISECONDS_PER_INCH = 200f;
private static final float MILLISECONDS_PER_INCH = 150f;
public LiveChatRecyclerViewLayoutManager(Context context) {
super(context);
}

View File

@ -877,7 +877,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
mChatRecyclerView.setLayoutParams(params1);
mChatRecyclerView.setHasFixedSize(true);
LinearLayoutManager layoutManager = new LinearLayoutManager(mContext);
LinearLayoutManager layoutManager = new LiveChatRecyclerViewLayoutManager(mContext);
layoutManager.setOrientation(RecyclerView.VERTICAL);
// layoutManager.setReverseLayout(true);
layoutManager.setStackFromEnd(true);

View File

@ -299,7 +299,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
mask.setVisibility(View.VISIBLE);
mLivePlayViewHolder.setLiveBean(mLiveBean);
mLivePlayViewHolder.setCover(mLiveBean.getAvatar());
mLivePlayViewHolder.play(mLiveBean.getPull(), LiveRoomPlayViewHolder.PLAY_MODEL_DEF);
mLivePlayViewHolder.play(mLiveBean.getPull(), LiveRoomPlayViewHolder.PLAY_MODEL_720);
mLivePlayViewHolder.setOnMicCallback(new LiveRoomPlayViewHolder.OnMicCallback() {
@Override
public void onMikUpdate() {