@ -0,0 +1,101 @@ |
||||
package com.unionmed.unionmedtv.activity; |
||||
|
||||
import android.content.Context; |
||||
import android.content.Intent; |
||||
import android.os.Bundle; |
||||
import android.view.View; |
||||
import android.widget.FrameLayout; |
||||
import android.widget.TextView; |
||||
|
||||
import androidx.annotation.NonNull; |
||||
import androidx.annotation.Nullable; |
||||
import androidx.fragment.app.Fragment; |
||||
import androidx.fragment.app.FragmentManager; |
||||
import androidx.fragment.app.FragmentPagerAdapter; |
||||
import androidx.fragment.app.FragmentTransaction; |
||||
import androidx.lifecycle.Observer; |
||||
import androidx.recyclerview.widget.RecyclerView; |
||||
import androidx.viewpager.widget.ViewPager; |
||||
import androidx.viewpager2.adapter.FragmentStateAdapter; |
||||
import androidx.viewpager2.widget.ViewPager2; |
||||
|
||||
import com.unionmed.unionmedtv.R; |
||||
import com.unionmed.unionmedtv.adapter.MsgListAdapter; |
||||
import com.unionmed.unionmedtv.adapter.SmartFragmentStatePagerAdapter; |
||||
import com.unionmed.unionmedtv.base.BaseActivity; |
||||
import com.unionmed.unionmedtv.fragment.MsgFragment; |
||||
import com.unionmed.unionmedtv.livedatas.LiveDataBus; |
||||
import com.unionmed.unionmedtv.utils.Constants; |
||||
import com.unionmed.unionmedtv.utils.MsgItemLinearLayoutManager; |
||||
import com.unionmed.unionmedtv.utils.MyLinearLayoutManager; |
||||
import com.unionmed.unionmedtv.utils.OnChildClickListener; |
||||
import com.unionmed.unionmedtv.widgets.TabViewPager; |
||||
|
||||
import org.jetbrains.annotations.NotNull; |
||||
|
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
public class MsgActivity extends BaseActivity { |
||||
private RecyclerView recyclerView; |
||||
private MsgListAdapter msgListAdapter; |
||||
private List<String> list = new ArrayList<>(); |
||||
private FrameLayout frameLayout; |
||||
private TextView tv_title; |
||||
private int lastSelectedPosition = 0; |
||||
|
||||
public static void StartActivity(Context context) { |
||||
Intent intent = new Intent(context, MsgActivity.class); |
||||
context.startActivity(intent); |
||||
} |
||||
|
||||
@Override |
||||
protected void onCreate(@Nullable Bundle savedInstanceState) { |
||||
super.onCreate(savedInstanceState); |
||||
setContentView(R.layout.activity_msg); |
||||
initView(); |
||||
} |
||||
|
||||
public void initView() { |
||||
recyclerView = findViewById(R.id.recyclerView); |
||||
tv_title = findViewById(R.id.tv_title); |
||||
MyLinearLayoutManager myLinearLayoutManager = new MyLinearLayoutManager(MsgActivity.this); |
||||
recyclerView.setLayoutManager(myLinearLayoutManager); |
||||
list.add("通知"); |
||||
list.add("赵医生"); |
||||
list.add("陈医生"); |
||||
list.add("福建医科大学附属医院1"); |
||||
list.add("福建医科大学附属医院2"); |
||||
list.add("福建医科大学附属医院3"); |
||||
msgListAdapter = new MsgListAdapter(R.layout.item_msg_list_layout, list, new OnChildClickListener() { |
||||
@Override |
||||
public <T> void onChildClick(View view, int position, T data) { |
||||
} |
||||
}); |
||||
recyclerView.setAdapter(msgListAdapter); |
||||
FragmentManager fragmentManager = getSupportFragmentManager(); |
||||
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction(); |
||||
fragmentTransaction.replace(R.id.framelayout, new MsgFragment()); |
||||
fragmentTransaction.commit(); |
||||
|
||||
LiveDataBus.get().with(Constants.MSG_LIST_SELECT_ITEM, Integer.class).observe(this, new Observer<Integer>() { |
||||
@Override |
||||
public void onChanged(Integer integer) { |
||||
lastSelectedPosition = integer; |
||||
msgListAdapter.setPostion(lastSelectedPosition); |
||||
msgListAdapter.notifyDataSetChanged(); |
||||
tv_title.setText(list.get(integer)); |
||||
LiveDataBus.get().with(Constants.MSG_REFRESH_ITEM).postValue(""); |
||||
} |
||||
}); |
||||
LiveDataBus.get().with(Constants.MSG_LIST_REFRESH_ITEM, String.class).observe(this, new Observer<String>() { |
||||
@Override |
||||
public void onChanged(String str) { |
||||
View view = myLinearLayoutManager.findViewByPosition(lastSelectedPosition); |
||||
if (view != null) { |
||||
view.requestFocus(); |
||||
} |
||||
} |
||||
}); |
||||
} |
||||
} |
@ -0,0 +1,580 @@ |
||||
package com.unionmed.unionmedtv.activity; |
||||
|
||||
import android.content.Context; |
||||
import android.content.Intent; |
||||
import android.net.Uri; |
||||
import android.os.Bundle; |
||||
import android.os.Handler; |
||||
import android.text.TextUtils; |
||||
import android.util.Log; |
||||
import android.view.SurfaceView; |
||||
import android.view.View; |
||||
import android.widget.FrameLayout; |
||||
import android.widget.ImageView; |
||||
import android.widget.LinearLayout; |
||||
import android.widget.TextView; |
||||
|
||||
import androidx.annotation.Nullable; |
||||
import androidx.constraintlayout.widget.ConstraintLayout; |
||||
import androidx.lifecycle.Observer; |
||||
import androidx.recyclerview.widget.LinearLayoutManager; |
||||
import androidx.recyclerview.widget.RecyclerView; |
||||
|
||||
import com.blankj.utilcode.util.LogUtils; |
||||
import com.blankj.utilcode.util.StringUtils; |
||||
import com.blankj.utilcode.util.ToastUtils; |
||||
import com.bumptech.glide.Glide; |
||||
import com.bumptech.glide.request.RequestOptions; |
||||
import com.hjq.http.EasyHttp; |
||||
import com.hjq.http.listener.OnHttpListener; |
||||
import com.unionmed.unionmedtv.R; |
||||
import com.unionmed.unionmedtv.adapter.RemoteAdapter; |
||||
import com.unionmed.unionmedtv.api.GetImUserInfoApi; |
||||
import com.unionmed.unionmedtv.base.BaseActivity; |
||||
import com.unionmed.unionmedtv.bean.ImUserInfoBean; |
||||
import com.unionmed.unionmedtv.bean.RemoteBean; |
||||
import com.unionmed.unionmedtv.bean.Video; |
||||
import com.unionmed.unionmedtv.livedatas.LiveDataBus; |
||||
import com.unionmed.unionmedtv.network.ApiResponse; |
||||
import com.unionmed.unionmedtv.utils.CacheUtil; |
||||
import com.unionmed.unionmedtv.utils.Constants; |
||||
|
||||
import java.util.ArrayList; |
||||
import java.util.HashMap; |
||||
import java.util.Iterator; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
import cn.rongcloud.rtc.api.stream.RCRTCVideoView; |
||||
import cn.rongcloud.rtc.core.RendererCommon; |
||||
import io.rong.calllib.IRongCallListener; |
||||
import io.rong.calllib.RongCallClient; |
||||
import io.rong.calllib.RongCallCommon; |
||||
import io.rong.calllib.RongCallSession; |
||||
import io.rong.imlib.RongIMClient; |
||||
import io.rong.imlib.model.Conversation; |
||||
import io.rong.imlib.model.UserInfo; |
||||
|
||||
public class VideoCallActivity extends BaseActivity implements View.OnClickListener { |
||||
/** |
||||
* @param context |
||||
* @param targetId |
||||
* @param type 1 呼叫者 0 被叫者 |
||||
*/ |
||||
public static void startActivity(Context context, String targetId, String groupId, String type) { |
||||
Intent intent = new Intent(context, VideoCallActivity.class); |
||||
intent.putExtra("targetId", targetId); |
||||
intent.putExtra("type", type); |
||||
intent.putExtra("groupId", groupId); |
||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); |
||||
context.startActivity(intent); |
||||
} |
||||
|
||||
public static String CALL = "1";//1 呼叫者
|
||||
public static String CALLED = "0";//0 被叫者
|
||||
|
||||
private String targetId; |
||||
private String groupId; |
||||
private String type; |
||||
private LinearLayout lin_put_through;//接听
|
||||
private LinearLayout lin_hang_up;//挂断
|
||||
private LinearLayout lin_mute;//静音
|
||||
private LinearLayout lin_turn_off_camera;//关闭摄像头
|
||||
private ImageView iv_icon;//被叫者头像
|
||||
private TextView tv_name;//被叫者昵称
|
||||
private TextView tv_tip;//
|
||||
private ImageView iv_camera;//
|
||||
private ImageView iv_put_through;//
|
||||
private ImageView iv_hang_up;//
|
||||
private TextView tv_camera;//
|
||||
private ImageView iv_mute;//
|
||||
private TextView tv_mute;//
|
||||
private TextView tv_time;//通话时长
|
||||
private FrameLayout local; |
||||
private RecyclerView recyclerView; |
||||
private RemoteAdapter remoteAdapter; |
||||
public static CallStatus currentStatus = CallStatus.Idle; |
||||
private UsetInfo usetInfo; |
||||
|
||||
public UsetInfo getUsetInfo() { |
||||
return usetInfo; |
||||
} |
||||
|
||||
public void setUsetInfo(UsetInfo usetInfo) { |
||||
this.usetInfo = usetInfo; |
||||
} |
||||
|
||||
private String imgPath = ""; |
||||
private String name = ""; |
||||
|
||||
/** |
||||
* idle 通话结束 |
||||
* Calling 电话拨出 |
||||
* BeCall 代接听 |
||||
* OnCall 已接通 |
||||
*/ |
||||
public enum CallStatus { |
||||
Idle, |
||||
Calling, |
||||
BeCall, |
||||
OnCall |
||||
} |
||||
|
||||
@Override |
||||
protected void onCreate(@Nullable Bundle savedInstanceState) { |
||||
super.onCreate(savedInstanceState); |
||||
setContentView(R.layout.activity_video_call); |
||||
local = findViewById(R.id.local); |
||||
iv_icon = findViewById(R.id.iv_icon); |
||||
tv_name = findViewById(R.id.tv_name); |
||||
tv_camera = findViewById(R.id.tv_camera); |
||||
iv_camera = findViewById(R.id.iv_camera); |
||||
iv_camera.setOnClickListener(this); |
||||
tv_mute = findViewById(R.id.tv_mute); |
||||
iv_mute = findViewById(R.id.iv_mute); |
||||
iv_mute.setOnClickListener(this); |
||||
iv_put_through = findViewById(R.id.iv_put_through); |
||||
iv_put_through.setOnClickListener(this); |
||||
iv_hang_up = findViewById(R.id.iv_hang_up); |
||||
iv_hang_up.setOnClickListener(this); |
||||
tv_tip = findViewById(R.id.tv_tip); |
||||
tv_time = findViewById(R.id.tv_time); |
||||
recyclerView = findViewById(R.id.recyclerView); |
||||
recyclerView.setLayoutManager(new LinearLayoutManager(VideoCallActivity.this)); |
||||
remoteAdapter = new RemoteAdapter(R.layout.item_remote_layout); |
||||
recyclerView.setAdapter(remoteAdapter); |
||||
lin_put_through = findViewById(R.id.lin_put_through); |
||||
lin_put_through.setOnClickListener(this); |
||||
lin_hang_up = findViewById(R.id.lin_hang_up); |
||||
lin_hang_up.setOnClickListener(this); |
||||
lin_mute = findViewById(R.id.lin_mute); |
||||
lin_mute.setOnClickListener(this); |
||||
lin_turn_off_camera = findViewById(R.id.lin_turn_off_camera); |
||||
lin_turn_off_camera.setOnClickListener(this); |
||||
lin_turn_off_camera.setSelected(true); |
||||
lin_mute.setSelected(true); |
||||
|
||||
initIRongCallListener(); |
||||
type =getIntent().getStringExtra("type"); |
||||
targetId = getIntent().getStringExtra("targetId"); |
||||
groupId = getIntent().getStringExtra("groupId"); |
||||
if(type.equals("1")){ |
||||
if (!TextUtils.isEmpty(targetId)) { |
||||
List<String> userIds = new ArrayList<>(); |
||||
userIds.add(targetId); |
||||
RongCallClient.getInstance().startCall(Conversation.ConversationType.GROUP, groupId, |
||||
userIds, null, RongCallCommon.CallMediaType.VIDEO, null); |
||||
} |
||||
}else { |
||||
changeUi(null); |
||||
} |
||||
getUserInfoByServer(targetId); |
||||
} |
||||
private long time = 0; |
||||
Handler handler; |
||||
private void reckonByTime() { |
||||
handler = new Handler(); |
||||
Runnable updateTask = new Runnable() { |
||||
@Override |
||||
public void run() { |
||||
time++; |
||||
if (time >= 3600) { |
||||
tv_time.setText( |
||||
String.format( |
||||
"%d:%02d:%02d", time / 3600, (time % 3600) / 60, (time % 60))); |
||||
} else { |
||||
tv_time.setText(String.format("%02d:%02d", (time % 3600) / 60, (time % 60))); |
||||
} |
||||
|
||||
// 再次延迟执行任务
|
||||
handler.postDelayed(this, 1000); |
||||
} |
||||
}; |
||||
// 延迟执行任务
|
||||
handler.postDelayed(updateTask, 1000); |
||||
} |
||||
public void initIRongCallListener() { |
||||
RongCallClient.getInstance().setVoIPCallListener(new IRongCallListener() { |
||||
private void addLocalView(SurfaceView view) { |
||||
local.removeAllViews(); |
||||
local.addView(view); |
||||
} |
||||
|
||||
private void clearViews() { |
||||
local.removeAllViews(); |
||||
} |
||||
|
||||
/** |
||||
* 电话已拨出。 |
||||
* 主叫端拨出电话后,通过回调 onCallOutgoing 通知当前 call 的详细信息。 |
||||
* |
||||
* @param callSession 通话实体。 |
||||
* @param localVideo 本地 camera 信息。 |
||||
*/ |
||||
@Override |
||||
public void onCallOutgoing(RongCallSession callSession, SurfaceView localVideo) { |
||||
Log.i("TAG", "onCallOutgoing: ================="+callSession.getActiveTime()); |
||||
currentStatus = CallStatus.Calling; |
||||
changeUi(null); |
||||
} |
||||
|
||||
/** |
||||
* 已建立通话。 |
||||
* 通话接通时,通过回调 onCallConnected 通知当前 call 的详细信息。 |
||||
* |
||||
* @param callSession 通话实体。 |
||||
* @param localVideo 本地 camera 信息。 |
||||
*/ |
||||
@Override |
||||
public void onCallConnected(RongCallSession callSession, SurfaceView localVideo) { |
||||
reckonByTime(); |
||||
currentStatus = CallStatus.OnCall; |
||||
changeUi(null); |
||||
RemoteBean remoteBean = new RemoteBean(); |
||||
remoteBean.setUserId(targetId); |
||||
remoteBean.setSurfaceView(localVideo); |
||||
remoteAdapter.addData(remoteBean); |
||||
remoteBean.setPath(CacheUtil.getToken().getHeadImg()); |
||||
remoteBean.setName(CacheUtil.getToken().getName()); |
||||
} |
||||
|
||||
/** |
||||
* 通话结束。 |
||||
* 通话中,对方挂断,己方挂断,或者通话过程网络异常造成的通话中断,都会回调 onCallDisconnected。 |
||||
* |
||||
* @param callSession 通话实体。 |
||||
* @param reason 通话中断原因。 |
||||
*/ |
||||
@Override |
||||
public void onCallDisconnected(RongCallSession callSession, RongCallCommon.CallDisconnectedReason reason) { |
||||
currentStatus = CallStatus.Idle; |
||||
changeUi(reason); |
||||
|
||||
} |
||||
|
||||
/** |
||||
* 被叫端正在振铃。 |
||||
* 主叫端拨出电话,被叫端收到请求,发出振铃响应时,回调 onRemoteUserRinging。 |
||||
* |
||||
* @param userId 振铃端用户 id。 |
||||
*/ |
||||
@Override |
||||
public void onRemoteUserRinging(String userId) { |
||||
Log.i("TAG", "onRemoteUserRinging: =============" + userId); |
||||
|
||||
} |
||||
|
||||
@Override |
||||
public void onRemoteUserAccept(String userId, RongCallCommon.CallMediaType mediaType) { |
||||
|
||||
} |
||||
|
||||
/** |
||||
* 被叫端加入通话。 |
||||
* 主叫端拨出电话,被叫端收到请求后,加入通话,回调 onRemoteUserJoined。 |
||||
* |
||||
* @param userId 加入用户的 id。<br /> |
||||
* @param mediaType 加入用户的媒体类型,audio or video。<br /> |
||||
* @param userType 加入用户的类型,1:正常用户,2:观察者。<br /> |
||||
* @param remoteVideo 加入用户者的 camera 信息。如果 userType为2,remoteVideo对象为空;<br /> |
||||
* 如果对端调用{@link RongCallClient#startCall(int, boolean, Conversation.ConversationType, String, List, List, RongCallCommon.CallMediaType, String, StartCameraCallback)} 或 |
||||
* {@link RongCallClient#acceptCall(String, int, boolean, StartCameraCallback)}开始的音视频通话,则可以使用如下设置改变对端视频流的镜像显示:<br /> |
||||
* <pre class="prettyprint"> |
||||
* public void onRemoteUserJoined(String userId, RongCallCommon.CallMediaType mediaType, int userType, SurfaceView remoteVideo) { |
||||
* if (null != remoteVideo) { |
||||
* ((RongRTCVideoView) remoteVideo).setMirror( boolean);//观看对方视频流是否镜像处理
|
||||
* } |
||||
* } |
||||
* </pre> |
||||
*/ |
||||
@Override |
||||
public void onRemoteUserJoined(String userId, RongCallCommon.CallMediaType mediaType, int userType, SurfaceView remoteVideo) { |
||||
getUserInfoByServer(userId); |
||||
setUsetInfo(new UsetInfo() { |
||||
@Override |
||||
public void success(ImUserInfoBean imUserInfoBean) { |
||||
if (userId.equals(targetId)) { |
||||
((RCRTCVideoView)remoteVideo).setScalingType(RendererCommon.ScalingType.SCALE_ASPECT_FILL); |
||||
addLocalView(remoteVideo); |
||||
imgPath = imUserInfoBean.getHeadImg(); |
||||
name = imUserInfoBean.getName(); |
||||
} else { |
||||
RemoteBean remoteBean = new RemoteBean(); |
||||
remoteBean.setUserId(userId); |
||||
remoteBean.setSurfaceView(remoteVideo); |
||||
remoteAdapter.addData(remoteBean); |
||||
remoteBean.setPath(imUserInfoBean.getHeadImg()); |
||||
remoteBean.setName(imUserInfoBean.getName()); |
||||
} |
||||
} |
||||
|
||||
@Override |
||||
public void fail() { |
||||
if (userId.equals(targetId)) { |
||||
addLocalView(remoteVideo); |
||||
} else { |
||||
RemoteBean remoteBean = new RemoteBean(); |
||||
remoteBean.setUserId(userId); |
||||
remoteBean.setSurfaceView(remoteVideo); |
||||
remoteAdapter.addData(remoteBean); |
||||
} |
||||
} |
||||
}); |
||||
} |
||||
|
||||
@Override |
||||
public void onRemoteUserInvited(String userId, RongCallCommon.CallMediaType mediaType) { |
||||
Log.i("TAG", "onRemoteUserInvited: ================" + userId); |
||||
} |
||||
|
||||
/** |
||||
* 通话中的远端参与者离开。 |
||||
* 回调 onRemoteUserLeft 通知状态更新。 |
||||
* |
||||
* @param userId 远端参与者的 id。 |
||||
* @param reason 远端参与者离开原因。 |
||||
*/ |
||||
@Override |
||||
public void onRemoteUserLeft(String userId, RongCallCommon.CallDisconnectedReason reason) { |
||||
Iterator<RemoteBean> iterator = remoteAdapter.getData().iterator(); |
||||
while (iterator.hasNext()) { |
||||
RemoteBean remoteBean = iterator.next(); |
||||
if (remoteBean.getUserId().equals(userId)) { |
||||
iterator.remove(); |
||||
} |
||||
((FrameLayout) remoteBean.getView()).removeAllViews(); |
||||
} |
||||
remoteAdapter.notifyDataSetChanged(); |
||||
} |
||||
|
||||
@Override |
||||
public void onMediaTypeChanged(String userId, RongCallCommon.CallMediaType mediaType, SurfaceView video) { |
||||
|
||||
} |
||||
|
||||
@Override |
||||
public void onError(RongCallCommon.CallErrorCode errorCode) { |
||||
currentStatus = CallStatus.Idle; |
||||
finish(); |
||||
ToastUtils.showLong("通话出现错误了" + errorCode); |
||||
} |
||||
|
||||
@Override |
||||
public void onRemoteCameraDisabled(String userId, boolean disabled) { |
||||
if (userId.equals(targetId)) { |
||||
if (disabled) { |
||||
local.setVisibility(View.GONE); |
||||
iv_icon.setVisibility(View.VISIBLE); |
||||
Glide.with(VideoCallActivity.this) |
||||
.load(imgPath) |
||||
.apply(new RequestOptions() |
||||
.placeholder(R.mipmap.rc_default_portrait) |
||||
) |
||||
.into(iv_icon); |
||||
} else { |
||||
local.setVisibility(View.VISIBLE); |
||||
iv_icon.setVisibility(View.GONE); |
||||
} |
||||
} else { |
||||
for (int i = 0; i < remoteAdapter.getData().size(); i++) { |
||||
if (remoteAdapter.getData().get(i).getUserId().equals(userId)) { |
||||
remoteAdapter.getData().get(i).setCameraDisabled(disabled); |
||||
} |
||||
} |
||||
remoteAdapter.notifyDataSetChanged(); |
||||
} |
||||
|
||||
} |
||||
|
||||
@Override |
||||
public void onRemoteMicrophoneDisabled(String userId, boolean disabled) { |
||||
|
||||
} |
||||
|
||||
@Override |
||||
public void onNetworkReceiveLost(String userId, int lossRate) { |
||||
|
||||
} |
||||
|
||||
@Override |
||||
public void onNetworkSendLost(int lossRate, int delay) { |
||||
|
||||
} |
||||
|
||||
@Override |
||||
public void onFirstRemoteVideoFrame(String userId, int height, int width) { |
||||
|
||||
} |
||||
|
||||
@Override |
||||
public void onAudioLevelSend(String audioLevel) { |
||||
|
||||
} |
||||
|
||||
@Override |
||||
public void onAudioLevelReceive(HashMap<String, String> audioLevel) { |
||||
|
||||
} |
||||
|
||||
@Override |
||||
public void onRemoteUserPublishVideoStream(String userId, String streamId, String tag, SurfaceView surfaceView) { |
||||
|
||||
} |
||||
|
||||
@Override |
||||
public void onRemoteUserUnpublishVideoStream(String userId, String streamId, String tag) { |
||||
|
||||
} |
||||
}); |
||||
} |
||||
|
||||
private void changeUi(RongCallCommon.CallDisconnectedReason reason) { |
||||
if (CallStatus.Idle == currentStatus) {//通话结束
|
||||
|
||||
if (reason != null) { |
||||
String text = null; |
||||
switch (reason) { |
||||
case REMOTE_BUSY_LINE: |
||||
text = "对方忙,请稍后再试"; |
||||
break; |
||||
case REMOTE_CANCEL: |
||||
text = "对方已取消"; |
||||
break; |
||||
case REMOTE_REJECT: |
||||
text = "对方已拒绝"; |
||||
break; |
||||
case NO_RESPONSE: |
||||
text = "对方未接听"; |
||||
break; |
||||
case NETWORK_ERROR: |
||||
case HANGUP: |
||||
case REMOTE_HANGUP: |
||||
break; |
||||
} |
||||
if (!TextUtils.isEmpty(text)) { |
||||
ToastUtils.showLong(text); |
||||
} |
||||
} |
||||
finish(); |
||||
} else if (CallStatus.Calling == currentStatus) {//电话拨出
|
||||
iv_icon.setVisibility(View.VISIBLE); |
||||
tv_name.setVisibility(View.VISIBLE); |
||||
tv_tip.setVisibility(View.VISIBLE); |
||||
lin_hang_up.setVisibility(View.VISIBLE); |
||||
} else if (CallStatus.BeCall == currentStatus) {//等待接听
|
||||
iv_icon.setVisibility(View.VISIBLE); |
||||
tv_name.setVisibility(View.VISIBLE); |
||||
tv_tip.setVisibility(View.VISIBLE); |
||||
lin_hang_up.setVisibility(View.VISIBLE); |
||||
lin_put_through.setVisibility(View.VISIBLE); |
||||
lin_mute.setVisibility(View.VISIBLE); |
||||
lin_hang_up.setVisibility(View.VISIBLE); |
||||
} else if (CallStatus.OnCall == currentStatus) {//已接听
|
||||
iv_icon.setVisibility(View.GONE); |
||||
tv_name.setVisibility(View.GONE); |
||||
tv_tip.setVisibility(View.GONE); |
||||
lin_put_through.setVisibility(View.GONE); |
||||
lin_turn_off_camera.setVisibility(View.VISIBLE); |
||||
lin_mute.setVisibility(View.VISIBLE); |
||||
lin_hang_up.setVisibility(View.VISIBLE); |
||||
|
||||
} |
||||
} |
||||
|
||||
private interface UsetInfo { |
||||
void success(ImUserInfoBean imUserInfoBean); |
||||
|
||||
void fail(); |
||||
} |
||||
|
||||
//获取用户信息
|
||||
private void getUserInfoByServer(String userId) { |
||||
EasyHttp.post(VideoCallActivity.this) |
||||
.api(new GetImUserInfoApi(CacheUtil.getToken().getToken(), userId)) |
||||
.request(new OnHttpListener<ApiResponse<ApiResponse<ImUserInfoBean>>>() { |
||||
@Override |
||||
public void onSucceed(ApiResponse<ApiResponse<ImUserInfoBean>> result) { |
||||
if (null != result.getData() && result.getData().isInnerRequestSucceed() |
||||
&& null != result.getData().getData()) { |
||||
Glide.with(VideoCallActivity.this) |
||||
.load(result.getData().getData().getHeadImg()) |
||||
.apply(new RequestOptions() |
||||
.placeholder(R.color.white_e1e1e1) |
||||
) |
||||
.into(iv_icon); |
||||
tv_name.setText(result.getData().getData().getName()); |
||||
if (type.equals("1")) { |
||||
tv_tip.setText("等待对方接听"); |
||||
} else { |
||||
tv_tip.setText("对方邀请您进行通话"); |
||||
} |
||||
if (usetInfo != null) { |
||||
usetInfo.success(result.getData().getData()); |
||||
} |
||||
} else { |
||||
if (usetInfo != null) { |
||||
usetInfo.fail(); |
||||
} |
||||
LogUtils.e("用户信息数据解析失败"); |
||||
} |
||||
} |
||||
|
||||
@Override |
||||
public void onFail(Exception e) { |
||||
LogUtils.e("用户信息失败", "失败:" + e); |
||||
} |
||||
}); |
||||
} |
||||
|
||||
@Override |
||||
public void onClick(View view) { |
||||
if (view.getId() == R.id.lin_put_through||view.getId()==R.id.iv_put_through) {//接听
|
||||
if (RongCallClient.getInstance() != null && RongCallClient.getInstance().getCallSession() != null) { |
||||
RongCallClient.getInstance().acceptCall(RongCallClient.getInstance().getCallSession().getCallId()); |
||||
} |
||||
} else if (view.getId() == R.id.lin_hang_up||view.getId()==R.id.iv_hang_up) {//挂断
|
||||
if (RongCallClient.getInstance() != null && RongCallClient.getInstance().getCallSession() != null) { |
||||
RongCallClient.getInstance().hangUpCall(RongCallClient.getInstance().getCallSession().getCallId()); |
||||
} |
||||
} else if (view.getId() == R.id.lin_mute || view.getId() == R.id.iv_mute) {//静音
|
||||
if (lin_mute.isSelected()) { |
||||
RongCallClient.getInstance().setEnableLocalAudio(false); |
||||
lin_mute.setSelected(false); |
||||
iv_mute.setImageDrawable(getResources().getDrawable(R.mipmap.icon_mute_off)); |
||||
tv_mute.setText("静音"); |
||||
|
||||
} else { |
||||
RongCallClient.getInstance().setEnableLocalAudio(true); |
||||
lin_mute.setSelected(true); |
||||
iv_mute.setImageDrawable(getResources().getDrawable(R.mipmap.icon_mute_on)); |
||||
tv_mute.setText("声音已开"); |
||||
} |
||||
} else if (view.getId() == R.id.lin_turn_off_camera || view.getId() == R.id.iv_camera) {//关闭摄像头
|
||||
if (lin_turn_off_camera.isSelected()) { |
||||
RongCallClient.getInstance().setEnableLocalVideo(false); |
||||
lin_turn_off_camera.setSelected(false); |
||||
iv_camera.setImageDrawable(getResources().getDrawable(R.mipmap.icon_camera_off)); |
||||
tv_camera.setText("摄像头已关"); |
||||
} else { |
||||
RongCallClient.getInstance().setEnableLocalVideo(true); |
||||
lin_turn_off_camera.setSelected(true); |
||||
iv_camera.setImageDrawable(getResources().getDrawable(R.mipmap.icon_camera_on)); |
||||
tv_camera.setText("摄像头已开"); |
||||
} |
||||
for (int i = 0; i < remoteAdapter.getData().size(); i++) { |
||||
if (remoteAdapter.getData().get(i).getUserId().equals(targetId)) { |
||||
remoteAdapter.getData().get(i).setCameraDisabled(!lin_turn_off_camera.isSelected()); |
||||
} |
||||
} |
||||
remoteAdapter.notifyDataSetChanged(); |
||||
} |
||||
} |
||||
|
||||
@Override |
||||
protected void onDestroy() { |
||||
super.onDestroy(); |
||||
if(handler!=null){ |
||||
handler.removeCallbacksAndMessages(null); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,88 @@ |
||||
package com.unionmed.unionmedtv.adapter; |
||||
|
||||
import android.graphics.Color; |
||||
import android.view.View; |
||||
import android.widget.ImageView; |
||||
import android.widget.TextView; |
||||
|
||||
import androidx.annotation.Nullable; |
||||
import androidx.recyclerview.widget.RecyclerView; |
||||
|
||||
import com.bumptech.glide.Glide; |
||||
import com.bumptech.glide.request.RequestOptions; |
||||
import com.chad.library.adapter.base.BaseDelegateMultiAdapter; |
||||
import com.chad.library.adapter.base.delegate.BaseMultiTypeDelegate; |
||||
import com.chad.library.adapter.base.viewholder.BaseViewHolder; |
||||
import com.unionmed.unionmedtv.R; |
||||
import com.unionmed.unionmedtv.activity.MsgActivity; |
||||
import com.unionmed.unionmedtv.utils.OnChildClickListener; |
||||
|
||||
import org.jetbrains.annotations.NotNull; |
||||
|
||||
import java.util.List; |
||||
|
||||
public class MsgItemAdapter extends BaseDelegateMultiAdapter<String, BaseViewHolder> { |
||||
private OnChildClickListener onChildClickListener; |
||||
|
||||
public MsgItemAdapter(@Nullable List<String> data, OnChildClickListener onChildClickListener) { |
||||
super(data); |
||||
this.onChildClickListener = onChildClickListener; |
||||
setMultiTypeDelegate(new BaseMultiTypeDelegate<String>() { |
||||
@Override |
||||
public int getItemType(@NotNull List<? extends String> data, int position) { |
||||
// 根据数据,自己判断应该返回的类型
|
||||
if (data.get(position).equals("1")) { |
||||
return 0; |
||||
} else if (data.get(position).equals("2")) { |
||||
return 1; |
||||
} else if (data.get(position).equals("3")) { |
||||
return 2; |
||||
} else if (data.get(position).equals("4")) { |
||||
return 3; |
||||
} else if (data.get(position).equals("5")) { |
||||
return 4; |
||||
} else if (data.get(position).equals("6")) { |
||||
return 5; |
||||
} else { |
||||
return 0; |
||||
} |
||||
} |
||||
}); |
||||
getMultiTypeDelegate() |
||||
.addItemType(0, R.layout.item_msg_text_left_layout) |
||||
.addItemType(1, R.layout.item_msg_text_right_layout) |
||||
.addItemType(2, R.layout.item_msg_image_left_layout) |
||||
.addItemType(3, R.layout.item_msg_image_right_layout) |
||||
.addItemType(4, R.layout.item_msg_order_left_layout) |
||||
.addItemType(5, R.layout.item_msg_order_right_layout); |
||||
} |
||||
|
||||
|
||||
@Override |
||||
protected void convert(@NotNull BaseViewHolder vh, String s) { |
||||
if (vh.getItemViewType() == 0) { |
||||
|
||||
} else if (vh.getItemViewType() == 2) { |
||||
ImageView iv_imag = vh.findView(R.id.iv_image); |
||||
Glide.with(getContext()) |
||||
.load("https://lmg.jj20.com/up/allimg/4k/s/02/210924233115O14-0-lp.jpg") |
||||
.apply(new RequestOptions() |
||||
.placeholder(R.color.white_e1e1e1) |
||||
) |
||||
.into(iv_imag); |
||||
} |
||||
// TextView tv_content=vh.findView(R.id.tv_content);
|
||||
// if(getContext() instanceof MsgActivity){
|
||||
// RecyclerView recyclerView=((MsgActivity) getContext()).findViewById(R.id.recyclerView);
|
||||
// tv_content.setNextFocusLeftId(recyclerView.getId());
|
||||
// }
|
||||
|
||||
vh.itemView.setOnClickListener(new View.OnClickListener() { |
||||
@Override |
||||
public void onClick(View view) { |
||||
onChildClickListener.onChildClick(view, vh.getLayoutPosition(), s); |
||||
} |
||||
}); |
||||
|
||||
} |
||||
} |
@ -0,0 +1,67 @@ |
||||
package com.unionmed.unionmedtv.adapter; |
||||
|
||||
import android.text.TextUtils; |
||||
import android.util.Log; |
||||
import android.view.View; |
||||
import android.widget.ImageView; |
||||
import android.widget.TextView; |
||||
|
||||
import androidx.annotation.Nullable; |
||||
import androidx.constraintlayout.widget.ConstraintLayout; |
||||
|
||||
import com.bumptech.glide.Glide; |
||||
import com.bumptech.glide.request.RequestOptions; |
||||
import com.chad.library.adapter.base.BaseDelegateMultiAdapter; |
||||
import com.chad.library.adapter.base.BaseQuickAdapter; |
||||
import com.chad.library.adapter.base.delegate.BaseMultiTypeDelegate; |
||||
import com.chad.library.adapter.base.viewholder.BaseViewHolder; |
||||
import com.unionmed.unionmedtv.R; |
||||
import com.unionmed.unionmedtv.api.GetNearDoctorApi; |
||||
import com.unionmed.unionmedtv.livedatas.LiveDataBus; |
||||
import com.unionmed.unionmedtv.utils.Constants; |
||||
import com.unionmed.unionmedtv.utils.OnChildClickListener; |
||||
|
||||
import org.jetbrains.annotations.NotNull; |
||||
|
||||
import java.util.List; |
||||
|
||||
public class MsgListAdapter extends BaseQuickAdapter<String, BaseViewHolder> { |
||||
private OnChildClickListener onChildClickListener; |
||||
private int postion=0; |
||||
|
||||
public int getPostion() { |
||||
return postion; |
||||
} |
||||
|
||||
public void setPostion(int postion) { |
||||
this.postion = postion; |
||||
} |
||||
|
||||
public MsgListAdapter(int layoutResId, @Nullable List<String> data, OnChildClickListener onChildClickListener) { |
||||
super(layoutResId, data); |
||||
this.onChildClickListener = onChildClickListener; |
||||
|
||||
} |
||||
|
||||
|
||||
@Override |
||||
protected void convert(@NotNull BaseViewHolder vh, String s) { |
||||
TextView tv_title = vh.findView(R.id.tv_title); |
||||
tv_title.setText(s); |
||||
ConstraintLayout constraintlayout=vh.findView(R.id.constraintlayout); |
||||
if(vh.getLayoutPosition()==postion){ |
||||
constraintlayout.setSelected(true); |
||||
constraintlayout.requestFocus(); |
||||
}else { |
||||
constraintlayout.setSelected(false); |
||||
constraintlayout.clearFocus(); |
||||
} |
||||
vh.itemView.setOnClickListener(new View.OnClickListener() { |
||||
@Override |
||||
public void onClick(View view) { |
||||
onChildClickListener.onChildClick(view, vh.getLayoutPosition(), s); |
||||
} |
||||
}); |
||||
|
||||
} |
||||
} |
@ -0,0 +1,59 @@ |
||||
package com.unionmed.unionmedtv.adapter; |
||||
|
||||
import android.text.TextUtils; |
||||
import android.view.View; |
||||
import android.widget.FrameLayout; |
||||
import android.widget.ImageView; |
||||
import android.widget.TextView; |
||||
|
||||
import androidx.annotation.Nullable; |
||||
|
||||
import com.bumptech.glide.Glide; |
||||
import com.bumptech.glide.request.RequestOptions; |
||||
import com.chad.library.adapter.base.BaseDelegateMultiAdapter; |
||||
import com.chad.library.adapter.base.BaseQuickAdapter; |
||||
import com.chad.library.adapter.base.delegate.BaseMultiTypeDelegate; |
||||
import com.chad.library.adapter.base.viewholder.BaseViewHolder; |
||||
import com.unionmed.unionmedtv.R; |
||||
import com.unionmed.unionmedtv.activity.VideoCallActivity; |
||||
import com.unionmed.unionmedtv.api.GetNearDoctorApi; |
||||
import com.unionmed.unionmedtv.bean.RemoteBean; |
||||
import com.unionmed.unionmedtv.utils.CacheUtil; |
||||
import com.unionmed.unionmedtv.utils.OnChildClickListener; |
||||
|
||||
import org.jetbrains.annotations.NotNull; |
||||
|
||||
import java.util.List; |
||||
|
||||
public class RemoteAdapter extends BaseQuickAdapter<RemoteBean, BaseViewHolder> { |
||||
private OnChildClickListener onChildClickListener; |
||||
|
||||
public RemoteAdapter(int layoutResId) { |
||||
super(layoutResId); |
||||
} |
||||
|
||||
|
||||
@Override |
||||
protected void convert(@NotNull BaseViewHolder vh, RemoteBean remoteBean) { |
||||
FrameLayout remote = vh.findView(R.id.remote); |
||||
ImageView iv_avatar = vh.findView(R.id.iv_avatar); |
||||
remoteBean.setView(remote); |
||||
remote.removeAllViews(); |
||||
remoteBean.getSurfaceView().setZOrderOnTop(true); |
||||
remote.addView(remoteBean.getSurfaceView()); |
||||
if (remoteBean.isCameraDisabled()) { |
||||
iv_avatar.setVisibility(View.VISIBLE); |
||||
remote.setVisibility(View.GONE); |
||||
} else { |
||||
iv_avatar.setVisibility(View.GONE); |
||||
remote.setVisibility(View.VISIBLE); |
||||
Glide.with(getContext()) |
||||
.load(remoteBean.getPath()) |
||||
.apply(new RequestOptions() |
||||
.placeholder(R.mipmap.rc_default_portrait) |
||||
) |
||||
.into(iv_avatar); |
||||
} |
||||
} |
||||
|
||||
} |
@ -0,0 +1,314 @@ |
||||
package com.unionmed.unionmedtv.api; |
||||
|
||||
import androidx.annotation.NonNull; |
||||
|
||||
import com.hjq.http.config.IRequestApi; |
||||
import com.hjq.http.config.IRequestType; |
||||
import com.hjq.http.model.BodyType; |
||||
|
||||
import org.jetbrains.annotations.NotNull; |
||||
|
||||
import java.util.List; |
||||
|
||||
|
||||
public class ApplyVideoApi implements IRequestApi , IRequestType { |
||||
@NonNull |
||||
@NotNull |
||||
@Override |
||||
public String getApi() { |
||||
return "/message/applyVideo"; |
||||
} |
||||
|
||||
|
||||
private List<String> pkeys; |
||||
private String type; |
||||
public ApplyVideoApi(List<String> pkeys, String type) { |
||||
this.pkeys = pkeys; |
||||
this.type = type; |
||||
} |
||||
|
||||
|
||||
@NonNull |
||||
@NotNull |
||||
@Override |
||||
public BodyType getBodyType() { |
||||
return BodyType.JSON; |
||||
} |
||||
|
||||
public class ApplyVideoModel{ |
||||
|
||||
private String createTime; |
||||
private FromBean from; |
||||
private String groupID; |
||||
private String groupName; |
||||
private String to; |
||||
private String type; |
||||
|
||||
public String getCreateTime() { |
||||
return createTime; |
||||
} |
||||
|
||||
public void setCreateTime(String createTime) { |
||||
this.createTime = createTime; |
||||
} |
||||
|
||||
public FromBean getFrom() { |
||||
return from; |
||||
} |
||||
|
||||
public void setFrom(FromBean from) { |
||||
this.from = from; |
||||
} |
||||
|
||||
public String getGroupID() { |
||||
return groupID; |
||||
} |
||||
|
||||
public void setGroupID(String groupID) { |
||||
this.groupID = groupID; |
||||
} |
||||
|
||||
public String getGroupName() { |
||||
return groupName; |
||||
} |
||||
|
||||
public void setGroupName(String groupName) { |
||||
this.groupName = groupName; |
||||
} |
||||
|
||||
public String getTo() { |
||||
return to; |
||||
} |
||||
|
||||
public void setTo(String to) { |
||||
this.to = to; |
||||
} |
||||
|
||||
public String getType() { |
||||
return type; |
||||
} |
||||
|
||||
public void setType(String type) { |
||||
this.type = type; |
||||
} |
||||
|
||||
public class FromBean { |
||||
private String bank_authentication; |
||||
private String code_validity; |
||||
private String create_date; |
||||
private String delete_date; |
||||
private String freeconsultation; |
||||
private String identity_id; |
||||
private String im_password; |
||||
private String im_useraccount; |
||||
private Integer isdelete; |
||||
private Integer isdevelopment; |
||||
private Integer isuse; |
||||
private String login_name; |
||||
private String media_id; |
||||
private String mobile; |
||||
private String name; |
||||
private String password; |
||||
private String pay_password; |
||||
private String personid; |
||||
private String photo_url; |
||||
private Integer pkey; |
||||
private String preRegion; |
||||
private String update_date; |
||||
private String upkey; |
||||
private String zt; |
||||
|
||||
public String getBank_authentication() { |
||||
return bank_authentication; |
||||
} |
||||
|
||||
public void setBank_authentication(String bank_authentication) { |
||||
this.bank_authentication = bank_authentication; |
||||
} |
||||
|
||||
public String getCode_validity() { |
||||
return code_validity; |
||||
} |
||||
|
||||
public void setCode_validity(String code_validity) { |
||||
this.code_validity = code_validity; |
||||
} |
||||
|
||||
public String getCreate_date() { |
||||
return create_date; |
||||
} |
||||
|
||||
public void setCreate_date(String create_date) { |
||||
this.create_date = create_date; |
||||
} |
||||
|
||||
public String getDelete_date() { |
||||
return delete_date; |
||||
} |
||||
|
||||
public void setDelete_date(String delete_date) { |
||||
this.delete_date = delete_date; |
||||
} |
||||
|
||||
public String getFreeconsultation() { |
||||
return freeconsultation; |
||||
} |
||||
|
||||
public void setFreeconsultation(String freeconsultation) { |
||||
this.freeconsultation = freeconsultation; |
||||
} |
||||
|
||||
public String getIdentity_id() { |
||||
return identity_id; |
||||
} |
||||
|
||||
public void setIdentity_id(String identity_id) { |
||||
this.identity_id = identity_id; |
||||
} |
||||
|
||||
public String getIm_password() { |
||||
return im_password; |
||||
} |
||||
|
||||
public void setIm_password(String im_password) { |
||||
this.im_password = im_password; |
||||
} |
||||
|
||||
public String getIm_useraccount() { |
||||
return im_useraccount; |
||||
} |
||||
|
||||
public void setIm_useraccount(String im_useraccount) { |
||||
this.im_useraccount = im_useraccount; |
||||
} |
||||
|
||||
public Integer getIsdelete() { |
||||
return isdelete; |
||||
} |
||||
|
||||
public void setIsdelete(Integer isdelete) { |
||||
this.isdelete = isdelete; |
||||
} |
||||
|
||||
public Integer getIsdevelopment() { |
||||
return isdevelopment; |
||||
} |
||||
|
||||
public void setIsdevelopment(Integer isdevelopment) { |
||||
this.isdevelopment = isdevelopment; |
||||
} |
||||
|
||||
public Integer getIsuse() { |
||||
return isuse; |
||||
} |
||||
|
||||
public void setIsuse(Integer isuse) { |
||||
this.isuse = isuse; |
||||
} |
||||
|
||||
public String getLogin_name() { |
||||
return login_name; |
||||
} |
||||
|
||||
public void setLogin_name(String login_name) { |
||||
this.login_name = login_name; |
||||
} |
||||
|
||||
public String getMedia_id() { |
||||
return media_id; |
||||
} |
||||
|
||||
public void setMedia_id(String media_id) { |
||||
this.media_id = media_id; |
||||
} |
||||
|
||||
public String getMobile() { |
||||
return mobile; |
||||
} |
||||
|
||||
public void setMobile(String mobile) { |
||||
this.mobile = mobile; |
||||
} |
||||
|
||||
public String getName() { |
||||
return name; |
||||
} |
||||
|
||||
public void setName(String name) { |
||||
this.name = name; |
||||
} |
||||
|
||||
public String getPassword() { |
||||
return password; |
||||
} |
||||
|
||||
public void setPassword(String password) { |
||||
this.password = password; |
||||
} |
||||
|
||||
public String getPay_password() { |
||||
return pay_password; |
||||
} |
||||
|
||||
public void setPay_password(String pay_password) { |
||||
this.pay_password = pay_password; |
||||
} |
||||
|
||||
public String getPersonid() { |
||||
return personid; |
||||
} |
||||
|
||||
public void setPersonid(String personid) { |
||||
this.personid = personid; |
||||
} |
||||
|
||||
public String getPhoto_url() { |
||||
return photo_url; |
||||
} |
||||
|
||||
public void setPhoto_url(String photo_url) { |
||||
this.photo_url = photo_url; |
||||
} |
||||
|
||||
public Integer getPkey() { |
||||
return pkey; |
||||
} |
||||
|
||||
public void setPkey(Integer pkey) { |
||||
this.pkey = pkey; |
||||
} |
||||
|
||||
public String getPreRegion() { |
||||
return preRegion; |
||||
} |
||||
|
||||
public void setPreRegion(String preRegion) { |
||||
this.preRegion = preRegion; |
||||
} |
||||
|
||||
public String getUpdate_date() { |
||||
return update_date; |
||||
} |
||||
|
||||
public void setUpdate_date(String update_date) { |
||||
this.update_date = update_date; |
||||
} |
||||
|
||||
public String getUpkey() { |
||||
return upkey; |
||||
} |
||||
|
||||
public void setUpkey(String upkey) { |
||||
this.upkey = upkey; |
||||
} |
||||
|
||||
public String getZt() { |
||||
return zt; |
||||
} |
||||
|
||||
public void setZt(String zt) { |
||||
this.zt = zt; |
||||
} |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,36 @@ |
||||
package com.unionmed.unionmedtv.api; |
||||
|
||||
import androidx.annotation.NonNull; |
||||
|
||||
import com.hjq.http.annotation.HttpHeader; |
||||
import com.hjq.http.config.IRequestApi; |
||||
import com.hjq.http.config.IRequestType; |
||||
import com.hjq.http.model.BodyType; |
||||
|
||||
import org.jetbrains.annotations.NotNull; |
||||
|
||||
import java.util.List; |
||||
|
||||
|
||||
public class GetImUserInfoApi implements IRequestApi, IRequestType { |
||||
@NonNull |
||||
@NotNull |
||||
@Override |
||||
public String getApi() { |
||||
return "/index/getUserInfoByImaccount"; |
||||
} |
||||
|
||||
@HttpHeader |
||||
private String token; |
||||
private String imaccount; |
||||
public GetImUserInfoApi(String token, String imaccount) { |
||||
this.token = token; |
||||
this.imaccount = imaccount; |
||||
} |
||||
@NonNull |
||||
@Override |
||||
public BodyType getBodyType() { |
||||
return BodyType.JSON; |
||||
} |
||||
|
||||
} |
@ -0,0 +1,154 @@ |
||||
package com.unionmed.unionmedtv.bean; |
||||
|
||||
public class ImUserInfoBean { |
||||
/*{ |
||||
"name": "谢航宇", |
||||
"headImg": "http://47.118.51.167:9000/appheadimg/appheadimg_1622108669577.jpg", |
||||
"mobile": "17720718419", |
||||
"preRegion": null, |
||||
"isAtuh": "1", |
||||
"upkey": "7", |
||||
"pkey": null, |
||||
"identity_id": null, |
||||
"isSetPsw": null, |
||||
"im_useraccount": "717720718419", |
||||
"im_password": null, |
||||
"currentAddress": null |
||||
userType:100-系统,200-医院,300-用户 |
||||
}*/ |
||||
private String name; |
||||
private String headImg; |
||||
private String mobile; |
||||
private Object preRegion; |
||||
private String isAtuh; |
||||
private String upkey; |
||||
private Object pkey; |
||||
private Object identity_id; |
||||
private Object isSetPsw; |
||||
private String im_useraccount; |
||||
private Object im_password; |
||||
private Object currentAddress; |
||||
private String userType; |
||||
private String isuse;//1账号可用,0账号已注销
|
||||
private String online; |
||||
|
||||
public String getOnline() { |
||||
return online; |
||||
} |
||||
|
||||
public void setOnline(String online) { |
||||
this.online = online; |
||||
} |
||||
|
||||
public String getIsuse() { |
||||
return isuse; |
||||
} |
||||
|
||||
public void setIsuse(String isuse) { |
||||
this.isuse = isuse; |
||||
} |
||||
|
||||
public String getUserType() { |
||||
return userType; |
||||
} |
||||
|
||||
public void setUserType(String userType) { |
||||
this.userType = userType; |
||||
} |
||||
|
||||
public String getName() { |
||||
return name; |
||||
} |
||||
|
||||
public void setName(String name) { |
||||
this.name = name; |
||||
} |
||||
|
||||
public String getHeadImg() { |
||||
return headImg; |
||||
} |
||||
|
||||
public void setHeadImg(String headImg) { |
||||
this.headImg = headImg; |
||||
} |
||||
|
||||
public String getMobile() { |
||||
return mobile; |
||||
} |
||||
|
||||
public void setMobile(String mobile) { |
||||
this.mobile = mobile; |
||||
} |
||||
|
||||
public Object getPreRegion() { |
||||
return preRegion; |
||||
} |
||||
|
||||
public void setPreRegion(Object preRegion) { |
||||
this.preRegion = preRegion; |
||||
} |
||||
|
||||
public String getIsAtuh() { |
||||
return isAtuh; |
||||
} |
||||
|
||||
public void setIsAtuh(String isAtuh) { |
||||
this.isAtuh = isAtuh; |
||||
} |
||||
|
||||
public String getUpkey() { |
||||
return upkey; |
||||
} |
||||
|
||||
public void setUpkey(String upkey) { |
||||
this.upkey = upkey; |
||||
} |
||||
|
||||
public Object getPkey() { |
||||
return pkey; |
||||
} |
||||
|
||||
public void setPkey(Object pkey) { |
||||
this.pkey = pkey; |
||||
} |
||||
|
||||
public Object getIdentity_id() { |
||||
return identity_id; |
||||
} |
||||
|
||||
public void setIdentity_id(Object identity_id) { |
||||
this.identity_id = identity_id; |
||||
} |
||||
|
||||
public Object getIsSetPsw() { |
||||
return isSetPsw; |
||||
} |
||||
|
||||
public void setIsSetPsw(Object isSetPsw) { |
||||
this.isSetPsw = isSetPsw; |
||||
} |
||||
|
||||
public String getIm_useraccount() { |
||||
return im_useraccount; |
||||
} |
||||
|
||||
public void setIm_useraccount(String im_useraccount) { |
||||
this.im_useraccount = im_useraccount; |
||||
} |
||||
|
||||
public Object getIm_password() { |
||||
return im_password; |
||||
} |
||||
|
||||
public void setIm_password(Object im_password) { |
||||
this.im_password = im_password; |
||||
} |
||||
|
||||
public Object getCurrentAddress() { |
||||
return currentAddress; |
||||
} |
||||
|
||||
public void setCurrentAddress(Object currentAddress) { |
||||
this.currentAddress = currentAddress; |
||||
} |
||||
} |
@ -0,0 +1,63 @@ |
||||
package com.unionmed.unionmedtv.bean; |
||||
|
||||
|
||||
import android.view.SurfaceView; |
||||
import android.view.View; |
||||
|
||||
public class RemoteBean{ |
||||
private String userId; |
||||
private SurfaceView surfaceView; |
||||
private String path;//用户头像
|
||||
private String name;//用户名称
|
||||
private View view; |
||||
|
||||
public View getView() { |
||||
return view; |
||||
} |
||||
|
||||
public void setView(View view) { |
||||
this.view = view; |
||||
} |
||||
|
||||
private boolean cameraDisabled=false;//摄像头是否关闭
|
||||
|
||||
public boolean isCameraDisabled() { |
||||
return cameraDisabled; |
||||
} |
||||
|
||||
public void setCameraDisabled(boolean cameraDisabled) { |
||||
this.cameraDisabled = cameraDisabled; |
||||
} |
||||
|
||||
public String getPath() { |
||||
return path; |
||||
} |
||||
|
||||
public void setPath(String path) { |
||||
this.path = path; |
||||
} |
||||
|
||||
public String getName() { |
||||
return name; |
||||
} |
||||
|
||||
public void setName(String name) { |
||||
this.name = name; |
||||
} |
||||
|
||||
public String getUserId() { |
||||
return userId; |
||||
} |
||||
|
||||
public void setUserId(String userId) { |
||||
this.userId = userId; |
||||
} |
||||
|
||||
public SurfaceView getSurfaceView() { |
||||
return surfaceView; |
||||
} |
||||
|
||||
public void setSurfaceView(SurfaceView surfaceView) { |
||||
this.surfaceView = surfaceView; |
||||
} |
||||
} |
@ -0,0 +1,122 @@ |
||||
package com.unionmed.unionmedtv.fragment; |
||||
|
||||
import android.os.Bundle; |
||||
import android.os.Handler; |
||||
import android.view.LayoutInflater; |
||||
import android.view.View; |
||||
import android.view.ViewGroup; |
||||
import android.widget.LinearLayout; |
||||
import android.widget.TextView; |
||||
|
||||
import androidx.fragment.app.Fragment; |
||||
import androidx.lifecycle.Observer; |
||||
import androidx.recyclerview.widget.RecyclerView; |
||||
|
||||
import com.blankj.utilcode.util.ToastUtils; |
||||
import com.example.yideng.loaddialoglibrary.LmiotDialog; |
||||
import com.unionmed.unionmedtv.R; |
||||
import com.unionmed.unionmedtv.activity.DoctorActivity; |
||||
import com.unionmed.unionmedtv.adapter.MsgItemAdapter; |
||||
import com.unionmed.unionmedtv.livedatas.LiveDataBus; |
||||
import com.unionmed.unionmedtv.utils.Constants; |
||||
import com.unionmed.unionmedtv.utils.LinearSpacingItemDecoration; |
||||
import com.unionmed.unionmedtv.utils.MsgItemLinearLayoutManager; |
||||
import com.unionmed.unionmedtv.utils.OnChildClickListener; |
||||
|
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
|
||||
public class MsgFragment extends Fragment implements View.OnClickListener { |
||||
private RecyclerView recyclerView; |
||||
private MsgItemAdapter msgItemAdapter; |
||||
private List<String> list = new ArrayList<>(); |
||||
private LinearLayout lin; |
||||
private TextView tv_look; |
||||
|
||||
@Override |
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { |
||||
View view = inflater.inflate(R.layout.fragment_msg, container, false); |
||||
recyclerView = view.findViewById(R.id.recyclerView); |
||||
lin = view.findViewById(R.id.lin); |
||||
tv_look = view.findViewById(R.id.tv_look); |
||||
tv_look.setOnClickListener(this); |
||||
tv_look.setOnFocusChangeListener(new View.OnFocusChangeListener() { |
||||
@Override |
||||
public void onFocusChange(View view, boolean b) { |
||||
if (b == false) { |
||||
LiveDataBus.get().with(Constants.MSG_LIST_REFRESH_ITEM).postValue(""); |
||||
} |
||||
} |
||||
}); |
||||
MsgItemLinearLayoutManager msgItemLinearLayoutManager = new MsgItemLinearLayoutManager(getActivity()); |
||||
msgItemLinearLayoutManager.setLeftView(getActivity().findViewById(R.id.recyclerView)); |
||||
msgItemLinearLayoutManager.setRecyclerView(recyclerView); |
||||
recyclerView.setLayoutManager(msgItemLinearLayoutManager); |
||||
recyclerView.addItemDecoration(new LinearSpacingItemDecoration(getActivity(), 14)); |
||||
list.clear(); |
||||
list.add("1"); |
||||
list.add("2"); |
||||
list.add("3"); |
||||
list.add("4"); |
||||
list.add("5"); |
||||
list.add("6"); |
||||
msgItemAdapter = new MsgItemAdapter(list, new OnChildClickListener() { |
||||
@Override |
||||
public <T> void onChildClick(View view, int position, T data) { |
||||
|
||||
} |
||||
}); |
||||
recyclerView.setAdapter(msgItemAdapter); |
||||
if (list.size() > 0) { |
||||
recyclerView.smoothScrollToPosition(list.size() - 1); |
||||
} |
||||
LiveDataBus.get().with(Constants.MSG_SELECT_ITEM, Integer.class).observe(getActivity(), new Observer<Integer>() { |
||||
@Override |
||||
public void onChanged(Integer integer) { |
||||
recyclerView.clearFocus(); |
||||
if (recyclerView.getVisibility() == View.VISIBLE) { |
||||
msgItemLinearLayoutManager.scrollToPosition(list.size() - 1); |
||||
recyclerView.post(new Runnable() { |
||||
@Override |
||||
public void run() { |
||||
if (msgItemLinearLayoutManager.getItemCount() > 0) { |
||||
int pos = msgItemLinearLayoutManager.findLastVisibleItemPosition(); |
||||
recyclerView.smoothScrollToPosition(pos); |
||||
View selectView = msgItemLinearLayoutManager.findViewByPosition(pos); |
||||
if (selectView != null) { |
||||
selectView.requestFocus(); |
||||
}else { |
||||
recyclerView.requestFocus(); |
||||
} |
||||
} else { |
||||
LiveDataBus.get().with(Constants.MSG_LIST_REFRESH_ITEM).postValue(""); |
||||
} |
||||
} |
||||
}); |
||||
} |
||||
} |
||||
}); |
||||
//刷新页面聊天数据
|
||||
LiveDataBus.get().with(Constants.MSG_REFRESH_ITEM, String.class).observe(getActivity(), new Observer<String>() { |
||||
@Override |
||||
public void onChanged(String s) { |
||||
lin.setVisibility(View.VISIBLE); |
||||
recyclerView.setVisibility(View.GONE); |
||||
// LmiotDialog.show(getActivity());
|
||||
} |
||||
}); |
||||
return view; |
||||
} |
||||
|
||||
@Override |
||||
public void onClick(View view) { |
||||
if (view.getId() == R.id.tv_look) { |
||||
lin.setVisibility(View.GONE); |
||||
lin.clearFocus(); |
||||
recyclerView.setVisibility(View.VISIBLE); |
||||
recyclerView.clearFocus(); |
||||
LiveDataBus.get().with(Constants.MSG_SELECT_ITEM).postValue(0); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,96 @@ |
||||
package com.unionmed.unionmedtv.utils; |
||||
|
||||
import android.content.Context; |
||||
import android.os.Build; |
||||
import android.util.AttributeSet; |
||||
import android.view.View; |
||||
|
||||
import androidx.annotation.RequiresApi; |
||||
import androidx.recyclerview.widget.LinearLayoutManager; |
||||
import androidx.recyclerview.widget.RecyclerView; |
||||
|
||||
import com.unionmed.unionmedtv.livedatas.LiveDataBus; |
||||
|
||||
/** |
||||
* NAME:YONG_ |
||||
* Created at: 2019/4/30 |
||||
* Describe: 防止RecyclerView快速移动焦点跑飞 |
||||
*/ |
||||
public class MsgItemLinearLayoutManager extends LinearLayoutManager { |
||||
private RecyclerView recyclerView; |
||||
private View leftView; |
||||
|
||||
public RecyclerView getRecyclerView() { |
||||
return recyclerView; |
||||
} |
||||
|
||||
public void setRecyclerView(RecyclerView recyclerView) { |
||||
this.recyclerView = recyclerView; |
||||
} |
||||
|
||||
public View getLeftView() { |
||||
return leftView; |
||||
} |
||||
|
||||
public void setLeftView(View leftView) { |
||||
this.leftView = leftView; |
||||
} |
||||
|
||||
public MsgItemLinearLayoutManager(Context context) { |
||||
super(context); |
||||
} |
||||
|
||||
public MsgItemLinearLayoutManager(Context context, int orientation, boolean reverseLayout) { |
||||
super(context, orientation, reverseLayout); |
||||
} |
||||
|
||||
public MsgItemLinearLayoutManager(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { |
||||
super(context, attrs, defStyleAttr, defStyleRes); |
||||
} |
||||
|
||||
|
||||
@Override |
||||
public View onInterceptFocusSearch(View focused, int direction) { |
||||
int currentPosition = getPosition(getFocusedChild()); |
||||
switch (direction) { |
||||
case View.FOCUS_DOWN: |
||||
if (currentPosition != getItemCount() - 1) { |
||||
if(recyclerView!=null){ |
||||
recyclerView.smoothScrollToPosition(currentPosition + 1); |
||||
} |
||||
return findViewByPosition(currentPosition + 1); |
||||
} else { |
||||
if(recyclerView!=null){ |
||||
recyclerView.smoothScrollToPosition(currentPosition); |
||||
} |
||||
return findViewByPosition(currentPosition); |
||||
} |
||||
case View.FOCUS_UP: |
||||
if (currentPosition != 0) { |
||||
if(recyclerView!=null){ |
||||
recyclerView.smoothScrollToPosition(currentPosition-1); |
||||
} |
||||
return findViewByPosition(currentPosition - 1); |
||||
} else { |
||||
if(recyclerView!=null){ |
||||
recyclerView.smoothScrollToPosition(currentPosition); |
||||
} |
||||
return findViewByPosition(currentPosition); |
||||
} |
||||
case View.FOCUS_LEFT: |
||||
LiveDataBus.get().with(Constants.MSG_LIST_REFRESH_ITEM).postValue(""); |
||||
if(leftView!=null){ |
||||
leftView.requestFocus(); |
||||
return leftView; |
||||
} |
||||
break; |
||||
case View.FOCUS_RIGHT: |
||||
if(recyclerView!=null){ |
||||
recyclerView.smoothScrollToPosition(currentPosition); |
||||
} |
||||
return findViewByPosition(currentPosition); |
||||
} |
||||
return super.onInterceptFocusSearch(focused, direction); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,86 @@ |
||||
package com.unionmed.unionmedtv.utils; |
||||
|
||||
import android.animation.ValueAnimator; |
||||
import android.content.Context; |
||||
import android.graphics.Rect; |
||||
import android.os.Build; |
||||
import android.util.AttributeSet; |
||||
import android.util.Log; |
||||
import android.view.View; |
||||
import android.view.animation.CycleInterpolator; |
||||
|
||||
import androidx.annotation.NonNull; |
||||
import androidx.annotation.RequiresApi; |
||||
import androidx.recyclerview.widget.GridLayoutManager; |
||||
import androidx.recyclerview.widget.LinearLayoutManager; |
||||
import androidx.recyclerview.widget.RecyclerView; |
||||
|
||||
import com.unionmed.unionmedtv.livedatas.LiveDataBus; |
||||
|
||||
import org.jetbrains.annotations.NotNull; |
||||
|
||||
/** |
||||
* NAME:YONG_ |
||||
* Created at: 2019/4/30 |
||||
* Describe: 防止RecyclerView快速移动焦点跑飞 |
||||
*/ |
||||
public class MyLinearLayoutManager extends LinearLayoutManager { |
||||
private View rightView; |
||||
|
||||
public View getRightView() { |
||||
return rightView; |
||||
} |
||||
|
||||
public void setRightView(View rightView) { |
||||
this.rightView = rightView; |
||||
} |
||||
|
||||
|
||||
public MyLinearLayoutManager(Context context) { |
||||
super(context); |
||||
} |
||||
|
||||
public MyLinearLayoutManager(Context context, int orientation, boolean reverseLayout) { |
||||
super(context, orientation, reverseLayout); |
||||
} |
||||
|
||||
public MyLinearLayoutManager(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { |
||||
super(context, attrs, defStyleAttr, defStyleRes); |
||||
} |
||||
|
||||
|
||||
@Override |
||||
public View onInterceptFocusSearch(View focused, int direction) { |
||||
int currentPosition = getPosition(getFocusedChild()); |
||||
switch (direction) { |
||||
case View.FOCUS_DOWN: |
||||
if (currentPosition == getItemCount() - 1) { |
||||
scrollToPosition(currentPosition); |
||||
return findViewByPosition(currentPosition); |
||||
} else { |
||||
scrollToPosition(currentPosition + 1); |
||||
LiveDataBus.get().with(Constants.MSG_LIST_SELECT_ITEM).postValue(currentPosition + 1); |
||||
return findViewByPosition(currentPosition + 1); |
||||
} |
||||
case View.FOCUS_UP: |
||||
if (currentPosition == 0) { |
||||
scrollToPosition(currentPosition); |
||||
return findViewByPosition(currentPosition); |
||||
} else { |
||||
scrollToPosition(currentPosition - 1); |
||||
LiveDataBus.get().with(Constants.MSG_LIST_SELECT_ITEM).postValue(currentPosition - 1); |
||||
return findViewByPosition(currentPosition - 1); |
||||
} |
||||
case View.FOCUS_LEFT: |
||||
scrollToPosition(currentPosition); |
||||
return findViewByPosition(currentPosition); |
||||
case View.FOCUS_RIGHT: |
||||
LiveDataBus.get().with(Constants.MSG_SELECT_ITEM).postValue(currentPosition - 1); |
||||
if (rightView != null) { |
||||
rightView.requestFocus(); |
||||
return rightView; |
||||
} |
||||
} |
||||
return super.onInterceptFocusSearch(focused, direction); |
||||
} |
||||
} |
@ -0,0 +1,9 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" |
||||
android:shape="rectangle"> |
||||
<solid android:color="#00ffffff"/> |
||||
</shape> |
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,9 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" |
||||
android:shape="rectangle"> |
||||
<solid android:color="#101E27"/> |
||||
</shape> |
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,9 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" |
||||
android:shape="rectangle"> |
||||
<solid android:color="#50616d"/> |
||||
</shape> |
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,7 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> |
||||
<item android:drawable="@drawable/bg_101e27" android:state_focused="true" /> |
||||
<item android:drawable="@drawable/bg_101e27" android:state_pressed="true" /> |
||||
<item android:drawable="@drawable/bg_50616d" android:state_selected="true" /> |
||||
<item android:drawable="@drawable/bg_00ffffff" /> |
||||
</selector> |
@ -0,0 +1,50 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="match_parent" |
||||
android:orientation="horizontal"> |
||||
|
||||
<LinearLayout |
||||
android:layout_width="275dp" |
||||
android:layout_height="match_parent" |
||||
android:background="#0B2D45" |
||||
android:orientation="vertical"> |
||||
|
||||
<TextView |
||||
android:layout_width="match_parent" |
||||
android:layout_height="83dp" |
||||
android:gravity="center" |
||||
android:text="消息通知" |
||||
android:textColor="@color/white_f1f1f1" |
||||
android:textSize="21sp" /> |
||||
|
||||
<androidx.recyclerview.widget.RecyclerView |
||||
android:id="@+id/recyclerView" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="match_parent" |
||||
android:overScrollMode="never" /> |
||||
</LinearLayout> |
||||
|
||||
<LinearLayout |
||||
android:layout_width="match_parent" |
||||
android:layout_height="match_parent" |
||||
android:background="#cc101E27" |
||||
android:orientation="vertical"> |
||||
|
||||
<TextView |
||||
android:id="@+id/tv_title" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="83dp" |
||||
android:gravity="center" |
||||
android:text="通知" |
||||
android:textColor="@color/white_f1f1f1" |
||||
android:textSize="21sp" /> |
||||
|
||||
<FrameLayout |
||||
android:id="@+id/framelayout" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="match_parent" /> |
||||
|
||||
</LinearLayout> |
||||
|
||||
</LinearLayout> |
@ -0,0 +1,195 @@ |
||||
<?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:layout_width="match_parent" |
||||
android:layout_height="match_parent" |
||||
android:background="@drawable/bg_gradient_home" |
||||
tools:ignore="MissingPrefix" |
||||
tools:context="com.unionmed.unionmedtv.activity.AppInstalledActivity"> |
||||
<FrameLayout |
||||
android:id="@+id/local" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="match_parent" |
||||
tools:layout_editor_absoluteX="0dp" |
||||
tools:layout_editor_absoluteY="0dp" /> |
||||
<ImageView |
||||
android:id="@+id/iv_icon" |
||||
android:layout_width="120dp" |
||||
android:layout_height="120dp" |
||||
android:layout_marginTop="72dp" |
||||
android:src="@mipmap/rc_default_portrait" |
||||
app:layout_constraintLeft_toLeftOf="parent" |
||||
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_marginTop="16dp" |
||||
android:textColor="@color/white_f1f1f1" |
||||
android:textSize="28sp" |
||||
android:textStyle="bold" |
||||
app:layout_constraintLeft_toLeftOf="parent" |
||||
app:layout_constraintRight_toRightOf="parent" |
||||
app:layout_constraintTop_toBottomOf="@+id/iv_icon" |
||||
tools:text="用户名" /> |
||||
|
||||
<TextView |
||||
android:id="@+id/tv_tip" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginTop="8dp" |
||||
android:textColor="@color/white_f1f1f1" |
||||
android:textSize="16sp" |
||||
app:layout_constraintLeft_toLeftOf="parent" |
||||
app:layout_constraintRight_toRightOf="parent" |
||||
app:layout_constraintTop_toBottomOf="@+id/tv_name" |
||||
android:text="邀请你进行视频通话…" /> |
||||
<TextView |
||||
android:id="@+id/tv_time" |
||||
app:layout_constraintBottom_toTopOf="@+id/lin" |
||||
app:layout_constraintLeft_toLeftOf="parent" |
||||
app:layout_constraintRight_toRightOf="parent" |
||||
android:layout_marginBottom="24dp" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:textSize="28sp" |
||||
android:textColor="@color/white_f1f1f1" |
||||
tools:text="00:03"/> |
||||
|
||||
<LinearLayout |
||||
android:id="@+id/lin" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginBottom="24dp" |
||||
android:orientation="horizontal" |
||||
app:layout_constraintBottom_toBottomOf="parent" |
||||
app:layout_constraintLeft_toLeftOf="parent" |
||||
app:layout_constraintRight_toRightOf="parent"> |
||||
<LinearLayout |
||||
android:visibility="gone" |
||||
android:id="@+id/lin_turn_off_camera" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginRight="84dp" |
||||
android:gravity="center" |
||||
android:orientation="vertical"> |
||||
|
||||
<ImageView |
||||
android:id="@+id/iv_camera" |
||||
android:layout_width="80dp" |
||||
android:layout_height="80dp" |
||||
android:background="@drawable/bg_focus_selector_10" |
||||
android:clickable="true" |
||||
android:focusable="true" |
||||
android:focusableInTouchMode="true" |
||||
android:src="@mipmap/icon_camera_on" |
||||
/> |
||||
|
||||
<TextView |
||||
android:id="@+id/tv_camera" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginTop="16dp" |
||||
android:text="摄像头已开" |
||||
android:textColor="@color/white_f1f1f1" |
||||
android:textSize="21sp" /> |
||||
</LinearLayout> |
||||
<LinearLayout |
||||
android:id="@+id/lin_put_through" |
||||
android:visibility="invisible" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginRight="84dp" |
||||
android:gravity="center" |
||||
android:orientation="vertical"> |
||||
|
||||
<ImageView |
||||
android:id="@+id/iv_put_through" |
||||
android:background="@drawable/bg_focus_selector_10" |
||||
android:clickable="true" |
||||
android:focusable="true" |
||||
android:focusableInTouchMode="true" |
||||
android:layout_width="80dp" |
||||
android:layout_height="80dp" |
||||
android:src="@mipmap/icon_put_through" /> |
||||
|
||||
<TextView |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginTop="16dp" |
||||
android:text="接通" |
||||
android:textColor="@color/white_f1f1f1" |
||||
android:textSize="21sp" /> |
||||
</LinearLayout> |
||||
|
||||
<LinearLayout |
||||
android:id="@+id/lin_hang_up" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginRight="84dp" |
||||
android:gravity="center" |
||||
android:orientation="vertical"> |
||||
|
||||
<ImageView |
||||
android:id="@+id/iv_hang_up" |
||||
android:layout_width="80dp" |
||||
android:layout_height="80dp" |
||||
android:background="@drawable/bg_focus_selector_10" |
||||
android:clickable="true" |
||||
android:focusable="true" |
||||
android:focusableInTouchMode="true" |
||||
android:src="@mipmap/icon_hang_up" /> |
||||
|
||||
<TextView |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginTop="16dp" |
||||
android:text="挂断" |
||||
android:textColor="@color/white_f1f1f1" |
||||
android:textSize="21sp" /> |
||||
</LinearLayout> |
||||
|
||||
<LinearLayout |
||||
android:id="@+id/lin_mute" |
||||
android:visibility="invisible" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:gravity="center" |
||||
android:orientation="vertical"> |
||||
|
||||
<ImageView |
||||
android:id="@+id/iv_mute" |
||||
android:layout_width="80dp" |
||||
android:layout_height="80dp" |
||||
android:background="@drawable/bg_focus_selector_10" |
||||
android:clickable="true" |
||||
android:focusable="true" |
||||
android:nextFocusRight="@+id/iv_mute" |
||||
android:focusableInTouchMode="true" |
||||
android:src="@mipmap/icon_mute_on" |
||||
/> |
||||
|
||||
<TextView |
||||
android:id="@+id/tv_mute" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginTop="16dp" |
||||
android:text="声音开启" |
||||
android:textColor="@color/white_f1f1f1" |
||||
android:textSize="21sp" /> |
||||
</LinearLayout> |
||||
|
||||
</LinearLayout> |
||||
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView |
||||
android:id="@+id/recyclerView" |
||||
app:layout_constraintTop_toTopOf="parent" |
||||
app:layout_constraintRight_toRightOf="parent" |
||||
android:layout_width="200dp" |
||||
android:layout_height="match_parent"/> |
||||
</androidx.constraintlayout.widget.ConstraintLayout> |
@ -0,0 +1,58 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="match_parent" |
||||
xmlns:app="http://schemas.android.com/apk/res-auto"> |
||||
<LinearLayout |
||||
android:id="@+id/lin" |
||||
android:layout_width="400dp" |
||||
android:layout_height="wrap_content" |
||||
android:gravity="center" |
||||
android:background="@drawable/bg_btn_50616d_radius_18" |
||||
android:orientation="vertical" |
||||
app:layout_constraintTop_toTopOf="parent" |
||||
app:layout_constraintBottom_toBottomOf="parent" |
||||
app:layout_constraintLeft_toLeftOf="parent" |
||||
app:layout_constraintRight_toRightOf="parent" |
||||
> |
||||
|
||||
<TextView |
||||
android:layout_marginTop="16dp" |
||||
android:layout_marginLeft="16dp" |
||||
android:layout_marginRight="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" /> |
||||
|
||||
<TextView |
||||
android:id="@+id/tv_look" |
||||
style="@style/FocusStyle" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:background="@drawable/account_password_select" |
||||
android:layout_marginTop="19dp" |
||||
android:layout_marginBottom="16dp" |
||||
android:paddingTop="8dp" |
||||
android:paddingBottom="8dp" |
||||
android:paddingLeft="64dp" |
||||
android:paddingRight="64dp" |
||||
android:text="点击获取" |
||||
android:textColor="@color/white_f1f1f1" |
||||
android:textSize="16sp"/> |
||||
</LinearLayout> |
||||
<androidx.recyclerview.widget.RecyclerView |
||||
android:id="@+id/recyclerView" |
||||
android:focusable="true" |
||||
android:focusableInTouchMode="true" |
||||
android:addStatesFromChildren="true" |
||||
android:descendantFocusability="afterDescendants" |
||||
android:visibility="gone" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="match_parent" |
||||
android:overScrollMode="never" /> |
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout> |
@ -0,0 +1,75 @@ |
||||
<?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" |
||||
> |
||||
|
||||
<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" /> |
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout |
||||
style="@style/FocusStyle" |
||||
android:layout_width="200dp" |
||||
android:layout_height="310dp" |
||||
android:layout_margin="@dimen/dp_10" |
||||
android:layout_marginTop="17dp" |
||||
app:layout_constraintLeft_toLeftOf="@+id/tv_name" |
||||
app:layout_constraintTop_toBottomOf="@+id/tv_name" |
||||
> |
||||
|
||||
<ImageView |
||||
app:layout_constraintTop_toTopOf="parent" |
||||
app:layout_constraintLeft_toLeftOf="parent" |
||||
android:id="@+id/iv_image" |
||||
android:layout_width="200dp" |
||||
android:layout_height="300dp" |
||||
android:layout_marginRight="130dp" |
||||
android:scaleType="centerCrop" |
||||
android:src="@drawable/search" |
||||
/> |
||||
|
||||
<View |
||||
tools:ignore="ContentDescription" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="match_parent" |
||||
android:background="@drawable/bg_focus_selector_10" |
||||
android:duplicateParentState="true" |
||||
android:scaleType="fitXY" |
||||
app:layout_constraintLeft_toLeftOf="parent" |
||||
app:layout_constraintRight_toRightOf="parent" |
||||
app:layout_constraintTop_toTopOf="parent" /> |
||||
</androidx.constraintlayout.widget.ConstraintLayout> |
||||
</androidx.constraintlayout.widget.ConstraintLayout> |
@ -0,0 +1,75 @@ |
||||
<?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" |
||||
> |
||||
|
||||
<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" /> |
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout |
||||
style="@style/FocusStyle" |
||||
android:layout_width="200dp" |
||||
android:layout_height="310dp" |
||||
android:layout_margin="@dimen/dp_10" |
||||
android:layout_marginTop="17dp" |
||||
app:layout_constraintRight_toRightOf="@+id/tv_name" |
||||
app:layout_constraintTop_toBottomOf="@+id/tv_name"> |
||||
|
||||
<ImageView |
||||
android:id="@+id/iv_image" |
||||
style="@style/FocusStyle" |
||||
android:layout_width="200dp" |
||||
android:layout_height="300dp" |
||||
android:layout_marginLeft="130dp" |
||||
android:background="@drawable/account_password_select" |
||||
android:src="@mipmap/icon_search" |
||||
app:layout_constraintRight_toRightOf="parent" |
||||
app:layout_constraintTop_toTopOf="parent" /> |
||||
|
||||
<View |
||||
android:layout_width="match_parent" |
||||
android:layout_height="match_parent" |
||||
android:background="@drawable/bg_focus_selector_10" |
||||
android:duplicateParentState="true" |
||||
android:scaleType="fitXY" |
||||
app:layout_constraintLeft_toLeftOf="parent" |
||||
app:layout_constraintRight_toRightOf="parent" |
||||
app:layout_constraintTop_toTopOf="parent" |
||||
tools:ignore="ContentDescription" /> |
||||
</androidx.constraintlayout.widget.ConstraintLayout> |
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout> |
@ -0,0 +1,34 @@ |
||||
<?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" |
||||
style="@style/FocusStyle" |
||||
android:id="@+id/constraintlayout" |
||||
android:layout_width="match_parent" |
||||
android:background="@drawable/msg_list_item_select" |
||||
android:layout_height="52dp"> |
||||
|
||||
<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_constraintBottom_toBottomOf="parent" |
||||
app:layout_constraintLeft_toLeftOf="parent" |
||||
app:layout_constraintTop_toTopOf="parent" /> |
||||
|
||||
<TextView |
||||
android:id="@+id/tv_title" |
||||
android:singleLine="true" |
||||
android:ellipsize="end" |
||||
android:layout_width="0dp" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginLeft="12dp" |
||||
android:text="通知" |
||||
android:textColor="@color/white_f1f1f1" |
||||
android:textSize="21sp" |
||||
app:layout_constraintBottom_toBottomOf="parent" |
||||
app:layout_constraintLeft_toRightOf="@+id/iv_avatar" |
||||
app:layout_constraintRight_toRightOf="parent" |
||||
app:layout_constraintTop_toTopOf="parent" /> |
||||
</androidx.constraintlayout.widget.ConstraintLayout> |
@ -0,0 +1,80 @@ |
||||
<?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" |
||||
> |
||||
|
||||
<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="0dp" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginRight="130dp" |
||||
android:layout_marginTop="17dp" |
||||
android:gravity="center" |
||||
android:background="@drawable/bg_btn_50616d_radius_18" |
||||
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_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" /> |
||||
|
||||
<TextView |
||||
style="@style/FocusStyle" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:background="@drawable/account_password_select" |
||||
android:layout_marginTop="19dp" |
||||
android:layout_marginBottom="16dp" |
||||
android:paddingTop="8dp" |
||||
android:paddingBottom="8dp" |
||||
android:paddingLeft="64dp" |
||||
android:paddingRight="64dp" |
||||
android:text="查看详情" |
||||
android:textColor="@color/white_f1f1f1" |
||||
android:textSize="16sp"/> |
||||
</LinearLayout> |
||||
</androidx.constraintlayout.widget.ConstraintLayout> |
@ -0,0 +1,80 @@ |
||||
<?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" |
||||
> |
||||
|
||||
<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="0dp" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginLeft="130dp" |
||||
android:layout_marginTop="17dp" |
||||
android:gravity="center" |
||||
android:background="@drawable/bg_btn_50616d_radius_18" |
||||
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_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" /> |
||||
|
||||
<TextView |
||||
style="@style/FocusStyle" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:background="@drawable/account_password_select" |
||||
android:layout_marginTop="19dp" |
||||
android:layout_marginBottom="16dp" |
||||
android:paddingTop="8dp" |
||||
android:paddingBottom="8dp" |
||||
android:paddingLeft="64dp" |
||||
android:paddingRight="64dp" |
||||
android:text="查看详情" |
||||
android:textColor="@color/white_f1f1f1" |
||||
android:textSize="16sp"/> |
||||
</LinearLayout> |
||||
</androidx.constraintlayout.widget.ConstraintLayout> |
@ -0,0 +1,58 @@ |
||||
<?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" |
||||
> |
||||
|
||||
<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" /> |
||||
|
||||
<TextView |
||||
android:id="@+id/tv_content" |
||||
style="@style/FocusStyle" |
||||
android:layout_width="0dp" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginTop="17dp" |
||||
android:layout_marginRight="130dp" |
||||
android:background="@drawable/account_password_select" |
||||
android:padding="16dp" |
||||
android:text="通知文案通知文案通知文案通知文案通知文案通知文案通知文案 通知文案通知文案通知文案" |
||||
android:nextFocusRight="@+id/tv_content" |
||||
android:textSize="16sp" |
||||
android:textColor="@color/white_f1f1f1" |
||||
app:layout_constraintLeft_toLeftOf="@+id/tv_name" |
||||
app:layout_constraintRight_toRightOf="parent" |
||||
app:layout_constraintTop_toBottomOf="@+id/tv_name" /> |
||||
</androidx.constraintlayout.widget.ConstraintLayout> |
@ -0,0 +1,58 @@ |
||||
<?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" |
||||
> |
||||
|
||||
<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" /> |
||||
|
||||
<TextView |
||||
android:id="@+id/tv_content" |
||||
style="@style/FocusStyle" |
||||
android:layout_width="0dp" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginTop="17dp" |
||||
android:layout_marginLeft="130dp" |
||||
android:background="@drawable/account_password_select" |
||||
android:padding="16dp" |
||||
android:text="通知文案通知文案通知文案通知文案通知文案通知文案通知文案 通知文案通知文案通知文案" |
||||
android:nextFocusRight="@+id/tv_content" |
||||
android:textSize="16sp" |
||||
android:textColor="@color/white_f1f1f1" |
||||
app:layout_constraintLeft_toLeftOf="parent" |
||||
app:layout_constraintRight_toRightOf="@+id/tv_name" |
||||
app:layout_constraintTop_toBottomOf="@+id/tv_name" /> |
||||
</androidx.constraintlayout.widget.ConstraintLayout> |
@ -0,0 +1,25 @@ |
||||
<?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="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
tools:ignore="MissingPrefix" |
||||
> |
||||
<ImageView |
||||
android:id="@+id/iv_avatar" |
||||
android:visibility="gone" |
||||
app:layout_constraintTop_toTopOf="parent" |
||||
app:layout_constraintRight_toRightOf="parent" |
||||
android:layout_width="200dp" |
||||
android:layout_height="200dp" |
||||
android:layout_margin="10dp" /> |
||||
<FrameLayout |
||||
app:layout_constraintTop_toTopOf="parent" |
||||
app:layout_constraintRight_toRightOf="parent" |
||||
android:id="@+id/remote" |
||||
android:layout_width="200dp" |
||||
android:layout_height="200dp" |
||||
android:layout_margin="10dp" /> |
||||
</androidx.constraintlayout.widget.ConstraintLayout> |
After Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 8.0 KiB |
After Width: | Height: | Size: 6.7 KiB |
After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 5.1 KiB |
After Width: | Height: | Size: 7.4 KiB |
@ -1,2 +1,6 @@ |
||||
include ':app' |
||||
include ':library-player' |
||||
include ':imlib' |
||||
include ':calllib' |
||||
include ':rtclib' |
||||
|
||||
|