Commit 762a0474 by 霍志良

feat:UI修改

parent e9316337
...@@ -71,7 +71,7 @@ public class MsgViewHolderLingxiAnswerQuestion extends MsgViewHolderBase { ...@@ -71,7 +71,7 @@ public class MsgViewHolderLingxiAnswerQuestion extends MsgViewHolderBase {
if (others==null){ if (others==null){
answer_question.setText(sb.toString()); answer_question.setText(sb.toString());
}else{ }else{
SpanUtils.with(answer_question).append(sb).append("\r\n\n").setFontSize(10).append(others).create(); SpanUtils.with(answer_question).append(sb).append("\r\n\r\n").setFontSize(15).append(others).create();
} }
} }
} }
......
package com.yidianling.im.session.viewholder; package com.yidianling.im.session.viewholder;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.LinearLayout;
import com.ydl.webview.H5Params; import com.ydl.webview.H5Params;
import com.ydl.webview.NewH5Activity; import com.ydl.webview.NewH5Activity;
import com.ydl.ydl_image.module.GlideApp; import com.ydl.ydl_image.module.GlideApp;
import com.yidianling.common.tools.LogUtil;
import com.yidianling.im.R; import com.yidianling.im.R;
import com.yidianling.im.session.extension.CustomAttachLingxiFirstQuestion; import com.yidianling.im.session.extension.CustomAttachLingxiFirstQuestion;
import com.yidianling.nimbase.common.ui.recyclerview.adapter.BaseMultiItemFetchLoadAdapter; import com.yidianling.nimbase.common.ui.recyclerview.adapter.BaseMultiItemFetchLoadAdapter;
...@@ -33,18 +37,30 @@ public class MsgViewHolderLingxiFirstQuestion extends MsgViewHolderBase { ...@@ -33,18 +37,30 @@ public class MsgViewHolderLingxiFirstQuestion extends MsgViewHolderBase {
@Override @Override
protected void bindContentView() { protected void bindContentView() {
avatarRight.setVisibility(View.INVISIBLE);
jumpUrl=((CustomAttachLingxiFirstQuestion) message.getAttachment()).greetUrl; jumpUrl=((CustomAttachLingxiFirstQuestion) message.getAttachment()).greetUrl;
jumpVideo=((CustomAttachLingxiFirstQuestion) message.getAttachment()).greetVideo; jumpVideo=((CustomAttachLingxiFirstQuestion) message.getAttachment()).greetVideo;
imageUrl=((CustomAttachLingxiFirstQuestion) message.getAttachment()).greetImage; imageUrl=((CustomAttachLingxiFirstQuestion) message.getAttachment()).greetImage;
GlideApp.with(context) GlideApp.with(context)
.load(imageUrl) .load(imageUrl)
.into(imageView); .into(imageView);
contentContainer.postDelayed(new Runnable() {
@Override
public void run() {
FrameLayout.LayoutParams params = new FrameLayout.LayoutParams( contentContainer.getWidth(),
(contentContainer.getHeight()/15)*13);
imageView.setLayoutParams(params);
imageView.invalidate();
imageView.requestLayout();
}
},200);
} }
@Override @Override
protected void onItemClick() { protected void onItemClick() {
super.onItemClick(); super.onItemClick();
if (jumpUrl.length()>0&&jumpUrl!=null){ if (jumpUrl!=null&&jumpUrl.length()>0){
//跳转URL //跳转URL
NewH5Activity.start(context,new H5Params(jumpUrl,null)); NewH5Activity.start(context,new H5Params(jumpUrl,null));
}/* else if (jumpVideo!=null&&!jumpVideo.isEmpty()){ }/* else if (jumpVideo!=null&&!jumpVideo.isEmpty()){
......
...@@ -1027,8 +1027,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy { ...@@ -1027,8 +1027,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
messageListPanel.onResume(); messageListPanel.onResume();
NIMClient.getService(MsgService.class).setChattingAccount(sessionId, sessionType); NIMClient.getService(MsgService.class).setChattingAccount(sessionId, sessionType);
getActivity().setVolumeControlStream(AudioManager.STREAM_VOICE_CALL); // 默认使用听筒播放 getActivity().setVolumeControlStream(AudioManager.STREAM_VOICE_CALL); // 默认使用听筒播放
userIsInPage("66","用户在当前页面",sessionId,ImIn.INSTANCE.getUserInfo().getUid());
messageListPanel.scrollToBottom(); messageListPanel.scrollToBottom();
} }
...@@ -1046,9 +1045,14 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy { ...@@ -1046,9 +1045,14 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
if (aitManager != null) { if (aitManager != null) {
aitManager.reset(); aitManager.reset();
} }
userIsInPage("67","用户离开当前页面",sessionId,ImIn.INSTANCE.getUserInfo().getUid()); }
@Override
public void onStop() {
super.onStop();
userIsInPage("67","用户离开当前页面",sessionId,ImIn.INSTANCE.getUserInfo().getUid());
} }
ArrayList<AnswersItem> answersItems = new ArrayList<>(); ArrayList<AnswersItem> answersItems = new ArrayList<>();
public void onEvent(MultipleSelectedEvent event){ public void onEvent(MultipleSelectedEvent event){
if (event.getOthersState()!=null){ if (event.getOthersState()!=null){
...@@ -1212,8 +1216,6 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy { ...@@ -1212,8 +1216,6 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
if (customization != null) { if (customization != null) {
messageListPanel.setChattingBackground(customization.backgroundUri, customization.backgroundColor); messageListPanel.setChattingBackground(customization.backgroundUri, customization.backgroundColor);
} }
userIsInPage("66","用户在当前页面",sessionId,ImIn.INSTANCE.getUserInfo().getUid());
} }
private void initAitManager() { private void initAitManager() {
......
...@@ -304,7 +304,7 @@ public class MessageListPanelEx { ...@@ -304,7 +304,7 @@ public class MessageListPanelEx {
public void run() { public void run() {
messageListView.smoothScrollToPosition(adapter.getBottomDataPosition()); messageListView.smoothScrollToPosition(adapter.getBottomDataPosition());
} }
},200); },300);
} else if (incomingMsgPrompt != null && lastMsg.getSessionType() != SessionTypeEnum.ChatRoom) { } else if (incomingMsgPrompt != null && lastMsg.getSessionType() != SessionTypeEnum.ChatRoom) {
if (lastMsg.getAttachment() instanceof CustomAttachLingxiWhichQuestion){ if (lastMsg.getAttachment() instanceof CustomAttachLingxiWhichQuestion){
messageListView.postDelayed(new Runnable() { messageListView.postDelayed(new Runnable() {
...@@ -312,7 +312,7 @@ public class MessageListPanelEx { ...@@ -312,7 +312,7 @@ public class MessageListPanelEx {
public void run() { public void run() {
messageListView.smoothScrollToPosition(adapter.getBottomDataPosition()); messageListView.smoothScrollToPosition(adapter.getBottomDataPosition());
} }
},200); },500);
}else{ }else{
incomingMsgPrompt.show(lastMsg); incomingMsgPrompt.show(lastMsg);
} }
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<ImageView <FrameLayout android:layout_width="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="wrap_content"
android:layout_width="300dp" xmlns:android="http://schemas.android.com/apk/res/android">
android:layout_height="260dp" <ImageView xmlns:android="http://schemas.android.com/apk/res/android"
android:scaleType="fitXY" android:layout_width="wrap_content"
android:id="@+id/first_question" android:layout_height="wrap_content"
> android:id="@+id/first_question"
</ImageView> android:scaleType="fitXY"
\ No newline at end of file >
</ImageView>
</FrameLayout>
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/im_custom_message_round_white_6dp_bg" android:background="@drawable/im_custom_message_round_white_6dp_bg"
android:paddingLeft="@dimen/platform_dp_12" android:paddingLeft="@dimen/platform_dp_12"
android:paddingRight="@dimen/platform_dp_12"
android:paddingTop="@dimen/platform_dp_12" android:paddingTop="@dimen/platform_dp_12"
> android:paddingRight="@dimen/dp_4">
<TextView <TextView
android:id="@+id/multiple_choice_title"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:maxWidth="263dp"
android:id="@+id/multiple_choice_title"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
tools:text="请问是发生了什么事情导致的呢?(多选)?"
android:textSize="@dimen/im_text_size_17"
android:paddingBottom="@dimen/platform_dp_12"
android:includeFontPadding="false" android:includeFontPadding="false"
android:lineSpacingExtra="3dip" android:lineSpacingExtra="3dip"
android:maxWidth="263dp"
android:paddingBottom="@dimen/platform_dp_12"
android:textColor="@color/im_color_242424" android:textColor="@color/im_color_242424"
> android:textSize="@dimen/im_text_size_17"
</TextView> app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="请问是发生了什么事情导致的呢?(多选)?" />
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/multiple_question_rv" android:id="@+id/multiple_question_rv"
android:layout_marginTop="@dimen/dp_4"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:layout_marginTop="@dimen/dp_4"
android:minWidth="263dp"
android:maxWidth="263dp" android:maxWidth="263dp"
app:layout_constraintTop_toBottomOf="@id/multiple_choice_title" android:minWidth="263dp"
app:layout_constraintStart_toStartOf="@id/multiple_choice_title" android:orientation="vertical"
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
tools:itemCount="6" app:layout_constraintStart_toStartOf="@id/multiple_choice_title"
app:layout_constraintTop_toBottomOf="@id/multiple_choice_title"
app:spanCount="2" app:spanCount="2"
tools:listitem="@layout/im_lingxi_which_question_item" tools:itemCount="6"
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager" tools:listitem="@layout/im_lingxi_which_question_item" />
/>
<TextView <TextView
android:id="@+id/confirm_multiple_choice" android:id="@+id/confirm_multiple_choice"
android:layout_width="110dp" android:layout_width="110dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/multiple_question_rv"
android:text="确定(0)"
android:layout_marginTop="@dimen/platform_dp_8" android:layout_marginTop="@dimen/platform_dp_8"
android:textSize="@dimen/im_text_size_15"
android:enabled="false"
app:layout_constraintEnd_toEndOf="@id/multiple_question_rv"
android:layout_marginEnd="@dimen/platform_dp_12" android:layout_marginEnd="@dimen/platform_dp_12"
android:layout_marginBottom="@dimen/platform_dp_16"
android:background="@drawable/im_background_18dp_ebebeb" android:background="@drawable/im_background_18dp_ebebeb"
android:enabled="false"
android:gravity="center"
android:paddingTop="@dimen/platform_dp_8" android:paddingTop="@dimen/platform_dp_8"
android:paddingBottom="@dimen/platform_dp_8" android:paddingBottom="@dimen/platform_dp_8"
android:text="确定(0)"
android:textColor="@color/white" android:textColor="@color/white"
android:gravity="center" android:textSize="@dimen/im_text_size_15"
android:layout_marginBottom="@dimen/platform_dp_16"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
> app:layout_constraintEnd_toEndOf="@id/multiple_question_rv"
app:layout_constraintTop_toBottomOf="@id/multiple_question_rv">
</TextView> </TextView>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment