[Modify]消息頁面邏輯

This commit is contained in:
wushaocheng
2023-02-27 09:31:32 +08:00
parent 8bc6b0599c
commit 2565cdc439
2 changed files with 11 additions and 0 deletions

View File

@@ -309,6 +309,13 @@ public class MessageListPanelEx {
initFetchLoadListener(anchor); initFetchLoadListener(anchor);
messageListView.setAdapter(adapter); messageListView.setAdapter(adapter);
messageListView.addOnItemTouchListener(listener); messageListView.addOnItemTouchListener(listener);
messageListView.postDelayed(new Runnable() {
@Override
public void run() {
messageListView.smoothScrollToPosition(0);
}
},3000);
} }
public boolean isSessionMode() { public boolean isSessionMode() {

View File

@@ -379,9 +379,13 @@ public abstract class MsgViewHolderBase extends RecyclerViewHolder<BaseMultiItem
if (isReceivedMessage()) { if (isReceivedMessage()) {
setGravity(bodyContainer, Gravity.LEFT); setGravity(bodyContainer, Gravity.LEFT);
contentContainer.setBackgroundResource(leftBackground()); contentContainer.setBackgroundResource(leftBackground());
contentContainer.setAlpha(0);
contentContainer.animate().alpha(1f).setDuration(2000).start();
} else { } else {
setGravity(bodyContainer, Gravity.RIGHT); setGravity(bodyContainer, Gravity.RIGHT);
contentContainer.setBackgroundResource(rightBackground()); contentContainer.setBackgroundResource(rightBackground());
contentContainer.setAlpha(0);
contentContainer.animate().alpha(1f).setDuration(2000).start();
} }
} }
} }