Commit 762a0474 by 霍志良

feat:UI修改

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