parent
fa940d8587
commit
ddb2cd3aca
@ -0,0 +1,308 @@ |
||||
package com.unionmed.unionmedtv.im; |
||||
|
||||
import android.os.Parcel; |
||||
import android.os.Parcelable; |
||||
import android.text.TextUtils; |
||||
import android.util.Log; |
||||
|
||||
import org.json.JSONException; |
||||
import org.json.JSONObject; |
||||
|
||||
import java.io.UnsupportedEncodingException; |
||||
|
||||
import io.rong.common.ParcelUtils; |
||||
import io.rong.imlib.MessageTag; |
||||
import io.rong.imlib.model.MentionedInfo; |
||||
import io.rong.imlib.model.MessageContent; |
||||
import io.rong.imlib.model.UserInfo; |
||||
|
||||
@MessageTag(value = "UMCustonMessage", flag = MessageTag.ISCOUNTED) |
||||
public class MeetingMsgModel extends MessageContent { |
||||
private static final String TAG = "MeetingMsgModel"; |
||||
|
||||
public static final Creator<MeetingMsgModel> CREATOR = new Creator<MeetingMsgModel>() { |
||||
public MeetingMsgModel createFromParcel(Parcel source) { |
||||
return new MeetingMsgModel(source); |
||||
} |
||||
|
||||
public MeetingMsgModel[] newArray(int size) { |
||||
return new MeetingMsgModel[size]; |
||||
} |
||||
}; |
||||
|
||||
private String content; |
||||
private String contentType; |
||||
private String ext; |
||||
private String logo; |
||||
private String text; |
||||
private String title; |
||||
private String url; |
||||
|
||||
|
||||
/** |
||||
* 将本地消息对象序列化为消息数据。 |
||||
* |
||||
* @return 消息数据。 |
||||
*/ |
||||
@Override |
||||
public byte[] encode() { |
||||
JSONObject jsonObj = new JSONObject(); |
||||
try { |
||||
// 消息携带用户信息时, 自定义消息需添加下面代码
|
||||
if (getJSONUserInfo() != null) { |
||||
jsonObj.putOpt("user", getJSONUserInfo()); |
||||
} |
||||
// 用于群组聊天, 消息携带 @ 人信息时, 自定义消息需添加下面代码
|
||||
if (getJsonMentionInfo() != null) { |
||||
jsonObj.putOpt("mentionedInfo", getJsonMentionInfo()); |
||||
} |
||||
// 将所有自定义消息的内容,都序列化至 json 对象中
|
||||
jsonObj.put("content", this.content); |
||||
jsonObj.put("contentType", this.contentType); |
||||
jsonObj.put("logo", this.logo); |
||||
jsonObj.put("text", this.text); |
||||
jsonObj.put("title", this.title); |
||||
jsonObj.put("url", this.url); |
||||
jsonObj.put("ext", this.ext); |
||||
} catch (JSONException e) { |
||||
Log.e(TAG, "JSONException " + e.getMessage()); |
||||
} |
||||
|
||||
try { |
||||
return jsonObj.toString().getBytes("UTF-8"); |
||||
} catch (UnsupportedEncodingException e) { |
||||
Log.e(TAG, "UnsupportedEncodingException ", e); |
||||
} |
||||
return null; |
||||
} |
||||
|
||||
/** |
||||
* 创建 MyMyTextContent(byte[] data) 带有 byte[] 的构造方法用于解析消息内容. |
||||
*/ |
||||
public MeetingMsgModel(byte[] data) { |
||||
if (data == null) { |
||||
return; |
||||
} |
||||
String jsonStr = null; |
||||
try { |
||||
jsonStr = new String(data, "UTF-8"); |
||||
} catch (UnsupportedEncodingException e) { |
||||
Log.e(TAG, "UnsupportedEncodingException ", e); |
||||
} |
||||
if (jsonStr == null) { |
||||
Log.e(TAG, "jsonStr is null "); |
||||
return; |
||||
} |
||||
|
||||
try { |
||||
JSONObject jsonObj = new JSONObject(jsonStr); |
||||
// 消息携带用户信息时, 自定义消息需添加下面代码
|
||||
if (jsonObj.has("user")) { |
||||
setUserInfo(parseJsonToUserInfo(jsonObj.getJSONObject("user"))); |
||||
} |
||||
// 用于群组聊天, 消息携带 @ 人信息时, 自定义消息需添加下面代码
|
||||
if (jsonObj.has("mentionedInfo")) { |
||||
setMentionedInfo(parseJsonToMentionInfo(jsonObj.getJSONObject("mentionedInfo"))); |
||||
} |
||||
// 将所有自定义变量从收到的 json 解析并赋值
|
||||
if (jsonObj.has("content")) { |
||||
content = jsonObj.optString("content"); |
||||
} |
||||
if (jsonObj.has("contentType")) { |
||||
contentType = jsonObj.optString("contentType"); |
||||
} |
||||
if (jsonObj.has("logo")) { |
||||
logo = jsonObj.optString("logo"); |
||||
} |
||||
if (jsonObj.has("text")) { |
||||
text = jsonObj.optString("text"); |
||||
} |
||||
if (jsonObj.has("title")) { |
||||
title = jsonObj.optString("title"); |
||||
} |
||||
if (jsonObj.has("url")) { |
||||
url = jsonObj.optString("url"); |
||||
} |
||||
if (jsonObj.has("ext")) { |
||||
ext = jsonObj.optString("ext"); |
||||
} |
||||
// if (jsonObj.has("ext")) {
|
||||
// setExt(parseJsonToExt(jsonObj.getJSONObject("ext")));
|
||||
// }
|
||||
} catch (JSONException e) { |
||||
Log.e(TAG, "JSONException " + e.getMessage()); |
||||
} |
||||
} |
||||
|
||||
@Override |
||||
public int describeContents() { |
||||
return 0; |
||||
} |
||||
|
||||
@Override |
||||
public void writeToParcel(Parcel dest, int flags) { |
||||
ParcelUtils.writeToParcel(dest, this.getExtra()); |
||||
ParcelUtils.writeToParcel(dest, this.getUserInfo()); |
||||
ParcelUtils.writeToParcel(dest, this.getMentionedInfo()); |
||||
ParcelUtils.writeToParcel(dest, this.isDestruct() ? 1 : 0); |
||||
ParcelUtils.writeToParcel(dest, this.getDestructTime()); |
||||
|
||||
ParcelUtils.writeToParcel(dest, this.content); |
||||
ParcelUtils.writeToParcel(dest, this.contentType); |
||||
ParcelUtils.writeToParcel(dest, this.logo); |
||||
ParcelUtils.writeToParcel(dest, this.text); |
||||
ParcelUtils.writeToParcel(dest, this.title); |
||||
ParcelUtils.writeToParcel(dest, this.url); |
||||
ParcelUtils.writeToParcel(dest, this.ext); |
||||
} |
||||
|
||||
public ExtBean parseJsonToExt(JSONObject jsonObj) { |
||||
ExtBean info = null; |
||||
String roomID = jsonObj.optString("roomID"); |
||||
String GroupID = jsonObj.optString("GroupID"); |
||||
|
||||
if (!TextUtils.isEmpty(roomID) && !TextUtils.isEmpty(GroupID)) { |
||||
info = new ExtBean(roomID, GroupID); |
||||
} |
||||
|
||||
return info; |
||||
} |
||||
|
||||
/** |
||||
* 构造函数。 |
||||
* |
||||
* @param in 初始化传入的 Parcel。 |
||||
*/ |
||||
public MeetingMsgModel(Parcel in) { |
||||
this.setExtra(ParcelUtils.readFromParcel(in)); |
||||
this.setUserInfo((UserInfo) ParcelUtils.readFromParcel(in, UserInfo.class)); |
||||
this.setMentionedInfo((MentionedInfo) ParcelUtils.readFromParcel(in, MentionedInfo.class)); |
||||
this.setDestruct(ParcelUtils.readIntFromParcel(in) == 1); |
||||
this.setDestructTime(ParcelUtils.readLongFromParcel(in)); |
||||
|
||||
this.setContent(ParcelUtils.readFromParcel(in)); |
||||
this.setContentType(ParcelUtils.readFromParcel(in)); |
||||
this.setLogo(ParcelUtils.readFromParcel(in)); |
||||
this.setText(ParcelUtils.readFromParcel(in)); |
||||
this.setTitle(ParcelUtils.readFromParcel(in)); |
||||
this.setUrl(ParcelUtils.readFromParcel(in)); |
||||
this.setExt(ParcelUtils.readFromParcel(in)); |
||||
// this.setExt((ExtBean) ParcelUtils.readFromParcel(in, ExtBean.class));
|
||||
} |
||||
|
||||
|
||||
public String getContent() { |
||||
return content; |
||||
} |
||||
|
||||
public void setContent(String content) { |
||||
this.content = content; |
||||
} |
||||
|
||||
public String getContentType() { |
||||
return contentType; |
||||
} |
||||
|
||||
public void setContentType(String contentType) { |
||||
this.contentType = contentType; |
||||
} |
||||
|
||||
public String getExt() { |
||||
return ext; |
||||
} |
||||
|
||||
public void setExt(String ext) { |
||||
this.ext = ext; |
||||
} |
||||
|
||||
public String getLogo() { |
||||
return logo; |
||||
} |
||||
|
||||
public void setLogo(String logo) { |
||||
this.logo = logo; |
||||
} |
||||
|
||||
public String getText() { |
||||
return text; |
||||
} |
||||
|
||||
public void setText(String text) { |
||||
this.text = text; |
||||
} |
||||
|
||||
public String getTitle() { |
||||
return title; |
||||
} |
||||
|
||||
public void setTitle(String title) { |
||||
this.title = title; |
||||
} |
||||
|
||||
public String getUrl() { |
||||
return url; |
||||
} |
||||
|
||||
public void setUrl(String url) { |
||||
this.url = url; |
||||
} |
||||
|
||||
public static class ExtBean implements Parcelable { |
||||
private String roomID; |
||||
private String groupID; |
||||
|
||||
public String getRoomID() { |
||||
return roomID; |
||||
} |
||||
|
||||
public void setRoomID(String roomID) { |
||||
this.roomID = roomID; |
||||
} |
||||
|
||||
public String getGroupID() { |
||||
return groupID; |
||||
} |
||||
|
||||
public void setGroupID(String groupID) { |
||||
groupID = groupID; |
||||
} |
||||
|
||||
@Override |
||||
public int describeContents() { |
||||
return 0; |
||||
} |
||||
|
||||
@Override |
||||
public void writeToParcel(Parcel dest, int flags) { |
||||
dest.writeString(this.roomID); |
||||
dest.writeString(this.groupID); |
||||
} |
||||
|
||||
public void readFromParcel(Parcel source) { |
||||
this.roomID = source.readString(); |
||||
this.groupID = source.readString(); |
||||
} |
||||
|
||||
public ExtBean(String roomID, String groupID) { |
||||
this.roomID = roomID; |
||||
this.groupID = groupID; |
||||
} |
||||
|
||||
protected ExtBean(Parcel in) { |
||||
this.roomID = in.readString(); |
||||
this.groupID = in.readString(); |
||||
} |
||||
|
||||
public static final Creator<ExtBean> CREATOR = new Creator<ExtBean>() { |
||||
@Override |
||||
public ExtBean createFromParcel(Parcel source) { |
||||
return new ExtBean(source); |
||||
} |
||||
|
||||
@Override |
||||
public ExtBean[] newArray(int size) { |
||||
return new ExtBean[size]; |
||||
} |
||||
}; |
||||
} |
||||
} |
@ -0,0 +1,71 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||
xmlns:app="http://schemas.android.com/apk/res-auto" |
||||
xmlns:tools="http://schemas.android.com/tools" |
||||
android:id="@+id/constraintlayout" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
||||
style="@style/FocusStyle" |
||||
android:descendantFocusability="afterDescendants"> |
||||
|
||||
<ImageView |
||||
android:id="@+id/iv_avatar" |
||||
android:layout_width="36dp" |
||||
android:layout_height="36dp" |
||||
android:layout_marginLeft="47dp" |
||||
android:src="@color/design_default_color_background" |
||||
app:layout_constraintLeft_toLeftOf="parent" |
||||
app:layout_constraintTop_toTopOf="parent" /> |
||||
|
||||
<TextView |
||||
android:id="@+id/tv_name" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginLeft="12dp" |
||||
android:text="通知" |
||||
android:textColor="@color/white_f1f1f1" |
||||
android:textSize="21sp" |
||||
app:layout_constraintLeft_toRightOf="@+id/iv_avatar" |
||||
app:layout_constraintTop_toTopOf="parent" /> |
||||
|
||||
<TextView |
||||
android:id="@+id/tv_time" |
||||
android:layout_width="0dp" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginLeft="12dp" |
||||
android:text="2023-05-30 26:30:25" |
||||
android:textColor="@color/white_f1f1f1" |
||||
android:textSize="12sp" |
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_name" |
||||
app:layout_constraintLeft_toRightOf="@+id/tv_name" |
||||
app:layout_constraintRight_toRightOf="parent" |
||||
app:layout_constraintTop_toTopOf="@+id/tv_name" /> |
||||
|
||||
<LinearLayout |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginRight="130dp" |
||||
android:layout_marginTop="17dp" |
||||
style="@style/FocusStyle" |
||||
android:background="@drawable/account_password_select" |
||||
android:orientation="vertical" |
||||
app:layout_constraintLeft_toLeftOf="@+id/tv_name" |
||||
app:layout_constraintTop_toBottomOf="@+id/tv_name"> |
||||
|
||||
<TextView |
||||
android:layout_marginTop="16dp" |
||||
android:layout_marginLeft="16dp" |
||||
android:layout_marginRight="16dp" |
||||
android:layout_marginBottom="16dp" |
||||
android:id="@+id/tv_title" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:nextFocusRight="@+id/tv_content" |
||||
android:text="当前版本暂不支持查看此消息" |
||||
android:textColor="@color/white_f1f1f1" |
||||
android:textSize="16sp" /> |
||||
|
||||
|
||||
|
||||
</LinearLayout> |
||||
</androidx.constraintlayout.widget.ConstraintLayout> |
@ -0,0 +1,71 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||
xmlns:app="http://schemas.android.com/apk/res-auto" |
||||
android:id="@+id/constraintlayout" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
||||
android:descendantFocusability="afterDescendants" |
||||
style="@style/FocusStyle" |
||||
> |
||||
|
||||
<ImageView |
||||
android:id="@+id/iv_avatar" |
||||
android:layout_width="36dp" |
||||
android:layout_height="36dp" |
||||
android:layout_marginRight="47dp" |
||||
android:src="@color/design_default_color_background" |
||||
app:layout_constraintRight_toRightOf="parent" |
||||
app:layout_constraintTop_toTopOf="parent" /> |
||||
|
||||
<TextView |
||||
android:id="@+id/tv_name" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginRight="12dp" |
||||
android:text="通知" |
||||
android:textColor="@color/white_f1f1f1" |
||||
android:textSize="21sp" |
||||
app:layout_constraintRight_toLeftOf="@+id/iv_avatar" |
||||
app:layout_constraintTop_toTopOf="parent" /> |
||||
|
||||
<TextView |
||||
android:id="@+id/tv_time" |
||||
android:layout_width="0dp" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginRight="12dp" |
||||
android:text="2023-05-30 26:30:25" |
||||
android:textColor="@color/white_f1f1f1" |
||||
android:textSize="12sp" |
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_name" |
||||
app:layout_constraintRight_toLeftOf="@+id/tv_name" |
||||
app:layout_constraintRight_toRightOf="parent" |
||||
app:layout_constraintTop_toTopOf="@+id/tv_name" /> |
||||
|
||||
<LinearLayout |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginLeft="130dp" |
||||
android:layout_marginTop="17dp" |
||||
style="@style/FocusStyle" |
||||
android:gravity="center" |
||||
android:background="@drawable/account_password_select" |
||||
android:orientation="vertical" |
||||
app:layout_constraintRight_toRightOf="@+id/tv_name" |
||||
app:layout_constraintTop_toBottomOf="@+id/tv_name"> |
||||
|
||||
<TextView |
||||
android:layout_marginTop="16dp" |
||||
android:layout_marginLeft="16dp" |
||||
android:layout_marginRight="16dp" |
||||
android:layout_marginBottom="16dp" |
||||
android:id="@+id/tv_content" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:nextFocusRight="@+id/tv_content" |
||||
android:text="当前版本暂不支持查看此消息" |
||||
android:textColor="@color/white_f1f1f1" |
||||
android:textSize="16sp" /> |
||||
|
||||
|
||||
</LinearLayout> |
||||
</androidx.constraintlayout.widget.ConstraintLayout> |
@ -0,0 +1,82 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||
xmlns:app="http://schemas.android.com/apk/res-auto" |
||||
xmlns:tools="http://schemas.android.com/tools" |
||||
android:id="@+id/constraintlayout" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
||||
style="@style/FocusStyle" |
||||
android:descendantFocusability="afterDescendants"> |
||||
|
||||
<ImageView |
||||
android:id="@+id/iv_avatar" |
||||
android:layout_width="36dp" |
||||
android:layout_height="36dp" |
||||
android:layout_marginLeft="47dp" |
||||
android:src="@color/design_default_color_background" |
||||
app:layout_constraintLeft_toLeftOf="parent" |
||||
app:layout_constraintTop_toTopOf="parent" /> |
||||
|
||||
<TextView |
||||
android:id="@+id/tv_name" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginLeft="12dp" |
||||
android:text="通知" |
||||
android:textColor="@color/white_f1f1f1" |
||||
android:textSize="21sp" |
||||
app:layout_constraintLeft_toRightOf="@+id/iv_avatar" |
||||
app:layout_constraintTop_toTopOf="parent" /> |
||||
|
||||
<TextView |
||||
android:id="@+id/tv_time" |
||||
android:layout_width="0dp" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginLeft="12dp" |
||||
android:text="2023-05-30 26:30:25" |
||||
android:textColor="@color/white_f1f1f1" |
||||
android:textSize="12sp" |
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_name" |
||||
app:layout_constraintLeft_toRightOf="@+id/tv_name" |
||||
app:layout_constraintRight_toRightOf="parent" |
||||
app:layout_constraintTop_toTopOf="@+id/tv_name" /> |
||||
|
||||
<LinearLayout |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginRight="130dp" |
||||
android:layout_marginTop="17dp" |
||||
style="@style/FocusStyle" |
||||
android:background="@drawable/account_password_select" |
||||
android:orientation="vertical" |
||||
app:layout_constraintLeft_toLeftOf="@+id/tv_name" |
||||
app:layout_constraintTop_toBottomOf="@+id/tv_name"> |
||||
|
||||
<TextView |
||||
android:layout_marginTop="16dp" |
||||
android:layout_marginLeft="16dp" |
||||
android:layout_marginRight="16dp" |
||||
android:id="@+id/tv_title" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:nextFocusRight="@+id/tv_content" |
||||
android:text="视频邀请" |
||||
android:textColor="@color/white_f1f1f1" |
||||
android:textSize="16sp" /> |
||||
<TextView |
||||
android:layout_marginTop="16dp" |
||||
android:layout_marginLeft="16dp" |
||||
android:layout_marginRight="16dp" |
||||
android:layout_marginBottom="16dp" |
||||
android:lineSpacingExtra="10dp" |
||||
android:id="@+id/tv_content" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:nextFocusRight="@+id/tv_content" |
||||
tools:text="朱亚狮发起了《2023-07-06朱亚狮远程咨询》" |
||||
android:textColor="@color/white_f1f1f1" |
||||
android:textSize="16sp" /> |
||||
|
||||
|
||||
</LinearLayout> |
||||
</androidx.constraintlayout.widget.ConstraintLayout> |
@ -0,0 +1,81 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||
xmlns:app="http://schemas.android.com/apk/res-auto" |
||||
xmlns:tools="http://schemas.android.com/tools" |
||||
android:id="@+id/constraintlayout" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
||||
android:descendantFocusability="afterDescendants" |
||||
style="@style/FocusStyle"> |
||||
|
||||
<ImageView |
||||
android:id="@+id/iv_avatar" |
||||
android:layout_width="36dp" |
||||
android:layout_height="36dp" |
||||
android:layout_marginRight="47dp" |
||||
android:src="@color/design_default_color_background" |
||||
app:layout_constraintRight_toRightOf="parent" |
||||
app:layout_constraintTop_toTopOf="parent" /> |
||||
|
||||
<TextView |
||||
android:id="@+id/tv_name" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginRight="12dp" |
||||
android:text="通知" |
||||
android:textColor="@color/white_f1f1f1" |
||||
android:textSize="21sp" |
||||
app:layout_constraintRight_toLeftOf="@+id/iv_avatar" |
||||
app:layout_constraintTop_toTopOf="parent" /> |
||||
|
||||
<TextView |
||||
android:id="@+id/tv_time" |
||||
android:layout_width="0dp" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginRight="12dp" |
||||
android:text="2023-05-30 26:30:25" |
||||
android:textColor="@color/white_f1f1f1" |
||||
android:textSize="12sp" |
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_name" |
||||
app:layout_constraintRight_toLeftOf="@+id/tv_name" |
||||
app:layout_constraintRight_toRightOf="parent" |
||||
app:layout_constraintTop_toTopOf="@+id/tv_name" /> |
||||
|
||||
<LinearLayout |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginLeft="130dp" |
||||
android:layout_marginTop="17dp" |
||||
style="@style/FocusStyle" |
||||
android:gravity="right" |
||||
android:background="@drawable/account_password_select" |
||||
android:orientation="vertical" |
||||
app:layout_constraintRight_toRightOf="@+id/tv_name" |
||||
app:layout_constraintTop_toBottomOf="@+id/tv_name"> |
||||
|
||||
<TextView |
||||
android:layout_marginTop="16dp" |
||||
android:layout_marginLeft="16dp" |
||||
android:layout_marginRight="16dp" |
||||
android:id="@+id/tv_title" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:nextFocusRight="@+id/tv_content" |
||||
android:text="视频邀请" |
||||
android:textColor="@color/white_f1f1f1" |
||||
android:textSize="16sp" /> |
||||
<TextView |
||||
android:layout_marginTop="16dp" |
||||
android:layout_marginLeft="16dp" |
||||
android:layout_marginRight="16dp" |
||||
android:layout_marginBottom="16dp" |
||||
android:id="@+id/tv_content" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:nextFocusRight="@+id/tv_content" |
||||
android:lineSpacingExtra="10dp" |
||||
tools:text="朱亚狮发起了《2023-07-06朱亚狮远程咨询》" |
||||
android:textColor="@color/white_f1f1f1" |
||||
android:textSize="16sp" /> |
||||
</LinearLayout> |
||||
</androidx.constraintlayout.widget.ConstraintLayout> |
@ -0,0 +1,38 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||
xmlns:app="http://schemas.android.com/apk/res-auto" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="match_parent"> |
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
app:layout_constraintBottom_toBottomOf="parent" |
||||
app:layout_constraintEnd_toEndOf="parent" |
||||
app:layout_constraintStart_toStartOf="parent" |
||||
app:layout_constraintTop_toTopOf="parent"> |
||||
<ImageView |
||||
android:id="@+id/iv_empty" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:src="@mipmap/icon_appointment_record_empty" |
||||
app:layout_constraintBottom_toBottomOf="parent" |
||||
app:layout_constraintEnd_toEndOf="parent" |
||||
app:layout_constraintStart_toStartOf="parent" |
||||
app:layout_constraintTop_toTopOf="parent" /> |
||||
|
||||
<TextView |
||||
android:id="@+id/tv_hint" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginBottom="25dp" |
||||
android:text="暂无预约记录" |
||||
android:textSize="14sp" |
||||
android:textStyle="bold" |
||||
android:textColor="#FF999999" |
||||
app:layout_constraintBottom_toBottomOf="parent" |
||||
app:layout_constraintEnd_toEndOf="parent" |
||||
app:layout_constraintStart_toStartOf="parent" /> |
||||
</androidx.constraintlayout.widget.ConstraintLayout> |
||||
</androidx.constraintlayout.widget.ConstraintLayout> |
After Width: | Height: | Size: 56 KiB |
Loading…
Reference in new issue