sunnnl

비디오 뷰 퍼블리싱 완료, api 추가 연결 및 video 객체 점검 필요

...@@ -42,4 +42,7 @@ dependencies { ...@@ -42,4 +42,7 @@ dependencies {
42 //gson: https://github.com/google/gson 42 //gson: https://github.com/google/gson
43 implementation 'com.google.code.gson:gson:2.8.6' 43 implementation 'com.google.code.gson:gson:2.8.6'
44 implementation 'com.squareup.retrofit2:converter-gson:2.6.2' 44 implementation 'com.squareup.retrofit2:converter-gson:2.6.2'
45 +
46 + // 이미지 url 출력
47 + implementation 'com.github.bumptech.glide:glide:4.10.0'
45 } 48 }
......
...@@ -9,17 +9,18 @@ ...@@ -9,17 +9,18 @@
9 android:allowBackup="true" 9 android:allowBackup="true"
10 android:icon="@mipmap/ic_launcher" 10 android:icon="@mipmap/ic_launcher"
11 android:label="@string/app_name" 11 android:label="@string/app_name"
12 + android:networkSecurityConfig="@xml/network_security_config"
12 android:roundIcon="@mipmap/ic_launcher_round" 13 android:roundIcon="@mipmap/ic_launcher_round"
13 android:supportsRtl="true" 14 android:supportsRtl="true"
14 - android:networkSecurityConfig="@xml/network_security_config" 15 + android:theme="@style/AppTheme"
15 - android:theme="@style/AppTheme"> 16 + android:usesCleartextTraffic="true">
16 <activity android:name=".ui.VideoCheckActivity"></activity> 17 <activity android:name=".ui.VideoCheckActivity"></activity>
17 <activity android:name=".ui.DeviceManagerActivity" /> 18 <activity android:name=".ui.DeviceManagerActivity" />
18 <activity android:name=".ui.RemoteControlRecordActivity" /> 19 <activity android:name=".ui.RemoteControlRecordActivity" />
19 <activity 20 <activity
20 android:name=".ui.SplashActivity" 21 android:name=".ui.SplashActivity"
21 android:noHistory="true" 22 android:noHistory="true"
22 - android:screenOrientation="fullSensor" > 23 + android:screenOrientation="fullSensor">
23 24
24 <intent-filter> 25 <intent-filter>
25 <action android:name="android.intent.action.MAIN" /> 26 <action android:name="android.intent.action.MAIN" />
......
...@@ -215,7 +215,7 @@ public class Api { ...@@ -215,7 +215,7 @@ public class Api {
215 Iterator it = resp.getAsJsonArray("videoList").iterator(); 215 Iterator it = resp.getAsJsonArray("videoList").iterator();
216 while(it.hasNext()) { 216 while(it.hasNext()) {
217 JsonObject jsonObject = (JsonObject) it.next(); 217 JsonObject jsonObject = (JsonObject) it.next();
218 - videos.add(new Video(jsonObject.get("vid_name").getAsString(), jsonObject.get("thumb").getAsString(), jsonObject.get("created").getAsString())); 218 + videos.add(new Video(jsonObject.get("vid_name").getAsString(), jsonObject.get("thumb").getAsString(), jsonObject.get("created").getAsString(), "01:14"));
219 } 219 }
220 callback.callbackMethod(videos); 220 callback.callbackMethod(videos);
221 } else { 221 } else {
......
...@@ -5,11 +5,13 @@ public class Video { ...@@ -5,11 +5,13 @@ public class Video {
5 private String thumb; 5 private String thumb;
6 private String created; 6 private String created;
7 private String s3link; 7 private String s3link;
8 + private String playTime;
8 9
9 - public Video(String vidName, String thumb, String created) { 10 + public Video(String vidName, String thumb, String created, String playTime) {
10 this.vidName = vidName; 11 this.vidName = vidName;
11 this.thumb = thumb; 12 this.thumb = thumb;
12 this.created = created; 13 this.created = created;
14 + this.playTime = playTime;
13 } 15 }
14 16
15 public void setS3link(String s3link) { 17 public void setS3link(String s3link) {
...@@ -31,4 +33,8 @@ public class Video { ...@@ -31,4 +33,8 @@ public class Video {
31 public String getVidName() { 33 public String getVidName() {
32 return vidName; 34 return vidName;
33 } 35 }
36 +
37 + public String getPlayTime() {
38 + return playTime;
39 + }
34 } 40 }
......
...@@ -19,16 +19,16 @@ public class RemoteRecordRvAdapter extends RecyclerView.Adapter<RemoteRecordRvAd ...@@ -19,16 +19,16 @@ public class RemoteRecordRvAdapter extends RecyclerView.Adapter<RemoteRecordRvAd
19 19
20 ArrayList<RemoteRecord> recordList; 20 ArrayList<RemoteRecord> recordList;
21 21
22 - static class RemoteRecordViewHolder extends RecyclerView.ViewHolder{ 22 + static class RemoteRecordViewHolder extends RecyclerView.ViewHolder {
23 TextView mTvDeviceName, mTvRemoteDate; 23 TextView mTvDeviceName, mTvRemoteDate;
24 24
25 - RemoteRecordViewHolder(View v){ 25 + RemoteRecordViewHolder(View v) {
26 super(v); 26 super(v);
27 this.mTvDeviceName = v.findViewById(R.id.tv_device_name); 27 this.mTvDeviceName = v.findViewById(R.id.tv_device_name);
28 this.mTvRemoteDate = v.findViewById(R.id.tv_remote_date); 28 this.mTvRemoteDate = v.findViewById(R.id.tv_remote_date);
29 } 29 }
30 30
31 - void bind(RemoteRecord record){ 31 + void bind(RemoteRecord record) {
32 mTvDeviceName.setText(record.getDeviceName()); 32 mTvDeviceName.setText(record.getDeviceName());
33 mTvRemoteDate.setText(record.getCreated()); 33 mTvRemoteDate.setText(record.getCreated());
34 } 34 }
......
...@@ -2,6 +2,10 @@ package com.sunnni.smartdoorlock.ui; ...@@ -2,6 +2,10 @@ package com.sunnni.smartdoorlock.ui;
2 2
3 import androidx.appcompat.app.AppCompatActivity; 3 import androidx.appcompat.app.AppCompatActivity;
4 import androidx.appcompat.widget.Toolbar; 4 import androidx.appcompat.widget.Toolbar;
5 +import androidx.core.widget.NestedScrollView;
6 +import androidx.recyclerview.widget.GridLayoutManager;
7 +import androidx.recyclerview.widget.LinearLayoutManager;
8 +import androidx.recyclerview.widget.RecyclerView;
5 9
6 import android.content.Intent; 10 import android.content.Intent;
7 import android.os.Bundle; 11 import android.os.Bundle;
...@@ -20,6 +24,9 @@ import java.util.Objects; ...@@ -20,6 +24,9 @@ import java.util.Objects;
20 public class VideoCheckActivity extends AppCompatActivity { 24 public class VideoCheckActivity extends AppCompatActivity {
21 25
22 ArrayList<Video> mVideoList = new ArrayList<Video>(); 26 ArrayList<Video> mVideoList = new ArrayList<Video>();
27 + RecyclerView mRecyclerView;
28 + VideoRvAdapter mAdapter;
29 +
23 Button mBtnRemoveVideo; 30 Button mBtnRemoveVideo;
24 Button mBtnViewVideo; 31 Button mBtnViewVideo;
25 32
...@@ -35,6 +42,8 @@ public class VideoCheckActivity extends AppCompatActivity { ...@@ -35,6 +42,8 @@ public class VideoCheckActivity extends AppCompatActivity {
35 mBtnViewVideo = (Button) findViewById(R.id.btn_view_video); 42 mBtnViewVideo = (Button) findViewById(R.id.btn_view_video);
36 43
37 getVideos(); 44 getVideos();
45 + init();
46 + setRecyclerView();
38 47
39 mBtnRemoveVideo.setOnClickListener(new View.OnClickListener() { 48 mBtnRemoveVideo.setOnClickListener(new View.OnClickListener() {
40 @Override 49 @Override
...@@ -114,9 +123,22 @@ public class VideoCheckActivity extends AppCompatActivity { ...@@ -114,9 +123,22 @@ public class VideoCheckActivity extends AppCompatActivity {
114 } else { 123 } else {
115 mVideoList.clear(); 124 mVideoList.clear();
116 mVideoList.addAll(0, (ArrayList<Video>) obj); 125 mVideoList.addAll(0, (ArrayList<Video>) obj);
117 - //mAdapter.notifyDataSetChanged(); 126 + mAdapter.notifyDataSetChanged();
118 } 127 }
119 } 128 }
120 }); 129 });
121 } 130 }
131 +
132 + private void init(){
133 + NestedScrollView nestedScrollView = findViewById(R.id.scroll_video_check);
134 + nestedScrollView.getParent().requestChildFocus(nestedScrollView, nestedScrollView);
135 + }
136 +
137 + private void setRecyclerView(){
138 + mRecyclerView = findViewById(R.id.rv_video_list);
139 + GridLayoutManager manager = new GridLayoutManager(this, 2);
140 + mAdapter = new VideoRvAdapter(mVideoList);
141 + mRecyclerView.setLayoutManager(manager);
142 + mRecyclerView.setAdapter(mAdapter);
143 + }
122 } 144 }
......
1 +package com.sunnni.smartdoorlock.ui;
2 +
3 +import android.content.DialogInterface;
4 +import android.content.Intent;
5 +import android.view.LayoutInflater;
6 +import android.view.View;
7 +import android.view.ViewGroup;
8 +import android.widget.ImageView;
9 +import android.widget.TextView;
10 +import android.widget.Toast;
11 +
12 +import androidx.annotation.NonNull;
13 +import androidx.appcompat.app.AlertDialog;
14 +import androidx.constraintlayout.widget.ConstraintLayout;
15 +import androidx.recyclerview.widget.RecyclerView;
16 +
17 +import com.bumptech.glide.Glide;
18 +import com.sunnni.smartdoorlock.R;
19 +import com.sunnni.smartdoorlock.api.Api;
20 +import com.sunnni.smartdoorlock.data.RemoteRecord;
21 +import com.sunnni.smartdoorlock.data.Video;
22 +
23 +import java.util.ArrayList;
24 +
25 +public class VideoRvAdapter extends RecyclerView.Adapter<VideoRvAdapter.VideoViewHolder> {
26 +
27 + ArrayList<Video> videoList;
28 +
29 + static class VideoViewHolder extends RecyclerView.ViewHolder {
30 + TextView mTvDate, mTvPlayTime;
31 + ImageView mImgThumbnail, mImgDelete;
32 + ConstraintLayout mCtnItem;
33 +
34 + VideoViewHolder(View v) {
35 + super(v);
36 + this.mCtnItem = v.findViewById(R.id.cl_item_video);
37 + this.mTvDate = v.findViewById(R.id.tv_date);
38 + this.mTvPlayTime = v.findViewById(R.id.tv_play_time);
39 + this.mImgThumbnail = v.findViewById(R.id.img_thumbnail);
40 + this.mImgDelete = v.findViewById(R.id.img_delete);
41 + }
42 +
43 + void bind(final Video video) {
44 + mTvDate.setText(video.getCreated());
45 + mTvPlayTime.setText(video.getPlayTime());
46 +
47 + Glide.with(itemView.getContext())
48 + .load(video.getThumb())
49 + .into(mImgThumbnail);
50 +
51 + mImgDelete.setOnClickListener(new View.OnClickListener() {
52 + @Override
53 + public void onClick(View v) {
54 + AlertDialog.Builder builder = new AlertDialog.Builder(itemView.getContext(), R.style.AlertDialogTheme);
55 + builder.setTitle("확인")
56 + .setMessage(R.string.alert_message_delete);
57 + builder.setPositiveButton("삭제", new DialogInterface.OnClickListener() {
58 + @Override
59 + public void onClick(DialogInterface dialog, int which) {
60 + Api.removeVideo(video, new Api.Callback() {
61 + @Override
62 + public void callbackMethod(Object obj) {
63 + if(obj==null){
64 + Toast.makeText(itemView.getContext(), "연결 상태가 불안정합니다.", Toast.LENGTH_SHORT).show();
65 + itemView.getContext().startActivity(new Intent(itemView.getContext(), MainActivity.class));
66 + // TODO: finish 하거나 or intent flag 설정하기
67 + return;
68 +
69 + } else {
70 + Toast.makeText(itemView.getContext(), "삭제되었습니다.", Toast.LENGTH_LONG).show();
71 + // 삭제 구현
72 + }
73 + }
74 + });
75 + }
76 + });
77 + builder.setNegativeButton("취소", new DialogInterface.OnClickListener() {
78 + @Override
79 + public void onClick(DialogInterface dialog, int which) {
80 +
81 + }
82 + });
83 + AlertDialog alertDialog = builder.create();
84 + alertDialog.show();
85 + }
86 + });
87 +
88 + mCtnItem.setOnClickListener(new View.OnClickListener() {
89 + @Override
90 + public void onClick(View v) {
91 + if (video.getS3link() == null){
92 + Api.getVideo(video, new Api.Callback() {
93 + @Override
94 + public void callbackMethod(Object obj) {
95 + if (obj == null) {
96 + Toast.makeText(itemView.getContext(), "연결 상태가 불안정합니다.", Toast.LENGTH_SHORT).show();
97 + itemView.getContext().startActivity(new Intent(itemView.getContext(), MainActivity.class));
98 + return;
99 + } else {
100 + String s3link = (String) obj;
101 + video.setS3link(s3link);
102 + // TODO : 비디오 재생 코드 구현 (video.setS3link를 통해)
103 + }
104 + }
105 + });
106 + }
107 + }
108 + });
109 + }
110 + }
111 +
112 + public VideoRvAdapter(ArrayList<Video> list) {
113 + this.videoList = list;
114 + }
115 +
116 + @NonNull
117 + @Override
118 + public VideoViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
119 + View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.rv_item_video, parent, false);
120 + return new VideoViewHolder(view);
121 + }
122 +
123 + @Override
124 + public void onBindViewHolder(@NonNull VideoViewHolder holder, int position) {
125 + holder.bind(videoList.get(position));
126 + }
127 +
128 + @Override
129 + public int getItemCount() {
130 + return videoList.size();
131 + }
132 +}
1 +<vector xmlns:android="http://schemas.android.com/apk/res/android"
2 + android:width="24dp"
3 + android:height="24dp"
4 + android:viewportWidth="24"
5 + android:viewportHeight="24"
6 + android:tint="#455a64">
7 + <path
8 + android:fillColor="@android:color/white"
9 + android:pathData="M9,11L7,11v2h2v-2zM13,11h-2v2h2v-2zM17,11h-2v2h2v-2zM19,4h-1L18,2h-2v2L8,4L8,2L6,2v2L5,4c-1.11,0 -1.99,0.9 -1.99,2L3,20c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2L21,6c0,-1.1 -0.9,-2 -2,-2zM19,20L5,20L5,9h14v11z"/>
10 +</vector>
1 +<vector xmlns:android="http://schemas.android.com/apk/res/android"
2 + android:width="24dp"
3 + android:height="24dp"
4 + android:tint="#607d8b"
5 + android:viewportWidth="24"
6 + android:viewportHeight="24">
7 + <path
8 + android:fillColor="@android:color/white"
9 + android:pathData="M21,3L3,3c-1.11,0 -2,0.89 -2,2v12c0,1.1 0.89,2 2,2h5v2h8v-2h5c1.1,0 1.99,-0.9 1.99,-2L23,5c0,-1.11 -0.9,-2 -2,-2zM21,17L3,17L3,5h18v12zM16,11l-7,4L9,7z" />
10 +</vector>
1 +<vector xmlns:android="http://schemas.android.com/apk/res/android"
2 + android:width="24dp"
3 + android:height="24dp"
4 + android:viewportWidth="24"
5 + android:viewportHeight="24"
6 + android:tint="@color/colorAccent">
7 + <path
8 + android:fillColor="@android:color/white"
9 + android:pathData="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2V9c0,-1.1 -0.9,-2 -2,-2H8c-1.1,0 -2,0.9 -2,2v10zM18,4h-2.5l-0.71,-0.71c-0.18,-0.18 -0.44,-0.29 -0.7,-0.29H9.91c-0.26,0 -0.52,0.11 -0.7,0.29L8.5,4H6c-0.55,0 -1,0.45 -1,1s0.45,1 1,1h12c0.55,0 1,-0.45 1,-1s-0.45,-1 -1,-1z"/>
10 +</vector>
1 +<vector xmlns:android="http://schemas.android.com/apk/res/android"
2 + android:width="24dp"
3 + android:height="24dp"
4 + android:viewportWidth="24"
5 + android:viewportHeight="24"
6 + android:tint="#ff5252">
7 + <path
8 + android:fillColor="@android:color/white"
9 + android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2z"/>
10 +</vector>
...@@ -62,10 +62,10 @@ ...@@ -62,10 +62,10 @@
62 app:layout_constraintTop_toBottomOf="@+id/toolbar_remote_control_record" /> 62 app:layout_constraintTop_toBottomOf="@+id/toolbar_remote_control_record" />
63 63
64 <TextView 64 <TextView
65 + android:includeFontPadding="false"
65 android:layout_width="wrap_content" 66 android:layout_width="wrap_content"
66 android:layout_height="wrap_content" 67 android:layout_height="wrap_content"
67 android:layout_marginStart="3dp" 68 android:layout_marginStart="3dp"
68 - android:layout_marginTop="2dp"
69 android:fontFamily="@font/g_market_sans_ttf_medium" 69 android:fontFamily="@font/g_market_sans_ttf_medium"
70 android:text="@string/menu_remote_control_record" 70 android:text="@string/menu_remote_control_record"
71 android:textColor="#111111" 71 android:textColor="#111111"
......
1 <?xml version="1.0" encoding="utf-8"?> 1 <?xml version="1.0" encoding="utf-8"?>
2 -<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" 2 +<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
3 - xmlns:app="http://schemas.android.com/apk/res-auto" 3 + android:id="@+id/scroll_video_check"
4 - xmlns:tools="http://schemas.android.com/tools"
5 android:layout_width="match_parent" 4 android:layout_width="match_parent"
6 android:layout_height="match_parent" 5 android:layout_height="match_parent"
7 - tools:context=".ui.VideoCheckActivity"> 6 + android:background="@color/colorAccent">
7 + <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
8 +xmlns:app="http://schemas.android.com/apk/res-auto"
9 +xmlns:tools="http://schemas.android.com/tools"
10 +android:layout_width="match_parent"
11 +android:layout_height="match_parent"
12 +tools:context=".ui.VideoCheckActivity">
8 13
9 - <androidx.appcompat.widget.Toolbar 14 +<androidx.appcompat.widget.Toolbar
10 android:id="@+id/toolbar_video_check" 15 android:id="@+id/toolbar_video_check"
11 android:layout_width="0dp" 16 android:layout_width="0dp"
12 android:layout_height="?attr/actionBarSize" 17 android:layout_height="?attr/actionBarSize"
13 android:background="@color/colorBackground" 18 android:background="@color/colorBackground"
19 + android:elevation="7dp"
14 app:layout_constraintEnd_toEndOf="parent" 20 app:layout_constraintEnd_toEndOf="parent"
15 app:layout_constraintStart_toStartOf="parent" 21 app:layout_constraintStart_toStartOf="parent"
16 - android:elevation="7dp"
17 app:layout_constraintTop_toTopOf="parent"> 22 app:layout_constraintTop_toTopOf="parent">
18 23
19 <TextView 24 <TextView
...@@ -24,28 +29,74 @@ ...@@ -24,28 +29,74 @@
24 android:textColor="@color/colorMainText" 29 android:textColor="@color/colorMainText"
25 android:textSize="15sp" /> 30 android:textSize="15sp" />
26 31
27 - </androidx.appcompat.widget.Toolbar> 32 +</androidx.appcompat.widget.Toolbar>
28 33
29 - <Button 34 +<androidx.constraintlayout.widget.Guideline
30 - android:id="@+id/btn_remove_video" 35 + android:id="@+id/gl_start"
31 android:layout_width="wrap_content" 36 android:layout_width="wrap_content"
32 android:layout_height="wrap_content" 37 android:layout_height="wrap_content"
33 - android:layout_marginBottom="563dp" 38 + android:orientation="vertical"
34 - android:layout_marginStart="100dp"
35 - android:text="btn_remove_video"
36 app:layout_constraintBottom_toBottomOf="parent" 39 app:layout_constraintBottom_toBottomOf="parent"
40 + app:layout_constraintGuide_percent="0.05"
37 app:layout_constraintStart_toStartOf="parent" 41 app:layout_constraintStart_toStartOf="parent"
42 + app:layout_constraintTop_toTopOf="parent" />
43 +
44 +<androidx.constraintlayout.widget.Guideline
45 + android:id="@+id/gl_end"
46 + android:layout_width="wrap_content"
47 + android:layout_height="wrap_content"
48 + android:orientation="vertical"
49 + app:layout_constraintBottom_toBottomOf="parent"
50 + app:layout_constraintGuide_percent="0.95"
51 + app:layout_constraintStart_toStartOf="parent"
52 + app:layout_constraintTop_toTopOf="parent" />
53 +
54 +<ImageView
55 + android:id="@+id/img_icon_list"
56 + android:layout_width="wrap_content"
57 + android:layout_height="wrap_content"
58 + android:layout_marginTop="20dp"
59 + android:src="@drawable/round_format_list_bulleted_24"
60 + app:layout_constraintStart_toStartOf="@id/gl_start"
38 app:layout_constraintTop_toBottomOf="@+id/toolbar_video_check" /> 61 app:layout_constraintTop_toBottomOf="@+id/toolbar_video_check" />
39 62
40 - <Button 63 +<TextView
64 + android:layout_width="wrap_content"
65 + android:layout_height="wrap_content"
66 + android:layout_marginStart="3dp"
67 + android:fontFamily="@font/g_market_sans_ttf_medium"
68 + android:includeFontPadding="false"
69 + android:text="@string/video_list"
70 + android:textColor="#111111"
71 + android:textSize="17sp"
72 + app:layout_constraintBottom_toBottomOf="@id/img_icon_list"
73 + app:layout_constraintStart_toEndOf="@id/img_icon_list"
74 + app:layout_constraintTop_toTopOf="@+id/img_icon_list" />
75 +
76 +<androidx.recyclerview.widget.RecyclerView
77 + android:id="@+id/rv_video_list"
78 + android:layout_width="0dp"
79 + android:layout_height="wrap_content"
80 + android:layout_marginTop="10dp"
81 + app:layout_constraintEnd_toEndOf="@id/gl_end"
82 + app:layout_constraintStart_toStartOf="@id/gl_start"
83 + app:layout_constraintTop_toBottomOf="@+id/img_icon_list" />
84 +
85 +<Button
86 + android:id="@+id/btn_remove_video"
87 + android:layout_width="wrap_content"
88 + android:layout_height="wrap_content"
89 + android:text="btn_remove_video"
90 + app:layout_constraintBottom_toBottomOf="parent"
91 + app:layout_constraintStart_toStartOf="parent" />
92 +
93 +<Button
41 android:id="@+id/btn_view_video" 94 android:id="@+id/btn_view_video"
42 android:layout_width="wrap_content" 95 android:layout_width="wrap_content"
43 android:layout_height="wrap_content" 96 android:layout_height="wrap_content"
44 - android:layout_marginBottom="504dp"
45 - android:layout_marginStart="6dp"
46 android:text="btn_view_video" 97 android:text="btn_view_video"
47 app:layout_constraintBottom_toBottomOf="parent" 98 app:layout_constraintBottom_toBottomOf="parent"
48 - app:layout_constraintStart_toStartOf="@+id/btn_remove_video" 99 + app:layout_constraintEnd_toEndOf="parent" />
49 - app:layout_constraintTop_toBottomOf="@+id/toolbar_video_check" />
50 100
51 </androidx.constraintlayout.widget.ConstraintLayout> 101 </androidx.constraintlayout.widget.ConstraintLayout>
102 +</androidx.core.widget.NestedScrollView>
...\ No newline at end of file ...\ No newline at end of file
......
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
3 + xmlns:app="http://schemas.android.com/apk/res-auto"
4 + android:layout_width="match_parent"
5 + android:layout_height="wrap_content"
6 + android:layout_marginBottom="10dp"
7 + android:layout_marginHorizontal="5dp"
8 + app:cardCornerRadius="2dp">
9 +
10 + <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
11 + android:layout_width="match_parent"
12 + android:layout_height="match_parent"
13 + android:id="@+id/cl_item_video"
14 + android:background="@color/colorAccent">
15 +
16 + <ImageView
17 + android:id="@+id/img_thumbnail"
18 + android:layout_width="0dp"
19 + android:layout_height="0dp"
20 + android:background="@color/colorPrimary"
21 + app:layout_constraintDimensionRatio="7:3"
22 + app:layout_constraintEnd_toEndOf="parent"
23 + app:layout_constraintStart_toStartOf="parent"
24 + app:layout_constraintTop_toTopOf="parent" />
25 +
26 + <ImageView
27 + android:id="@+id/img_date"
28 + android:layout_width="12dp"
29 + android:layout_height="12dp"
30 + android:layout_marginStart="15dp"
31 + android:layout_marginTop="20dp"
32 + android:layout_marginBottom="2dp"
33 + android:src="@drawable/baseline_date_range_24"
34 + app:layout_constraintBottom_toTopOf="@+id/img_video"
35 + app:layout_constraintStart_toStartOf="parent"
36 + app:layout_constraintTop_toBottomOf="@id/img_thumbnail"
37 + app:layout_constraintVertical_chainStyle="packed" />
38 +
39 + <TextView
40 + android:id="@+id/tv_date"
41 + android:layout_width="wrap_content"
42 + android:layout_height="wrap_content"
43 + android:layout_marginStart="3dp"
44 + android:fontFamily="@font/g_market_sans_ttf_medium"
45 + android:includeFontPadding="false"
46 + android:text="@string/sample_date"
47 + android:textColor="#455a64"
48 + android:textSize="11sp"
49 + app:layout_constraintBottom_toBottomOf="@id/img_date"
50 + app:layout_constraintStart_toEndOf="@+id/img_date"
51 + app:layout_constraintTop_toTopOf="@id/img_date" />
52 +
53 + <ImageView
54 + android:id="@+id/img_video"
55 + android:layout_width="12dp"
56 + android:layout_height="12dp"
57 + android:layout_marginTop="2dp"
58 + android:layout_marginBottom="20dp"
59 + android:src="@drawable/baseline_ondemand_video_small_24"
60 + app:layout_constraintBottom_toBottomOf="parent"
61 + app:layout_constraintStart_toStartOf="@id/img_date"
62 + app:layout_constraintTop_toBottomOf="@id/img_date"
63 + app:layout_constraintVertical_chainStyle="packed" />
64 +
65 + <TextView
66 + android:id="@+id/tv_play_time"
67 + android:layout_width="wrap_content"
68 + android:layout_height="wrap_content"
69 + android:layout_marginStart="3dp"
70 + android:fontFamily="@font/g_market_sans_ttf_medium"
71 + android:includeFontPadding="false"
72 + android:text="@string/sample_play_time"
73 + android:textColor="#607d8b"
74 + android:textSize="11sp"
75 + app:layout_constraintBottom_toBottomOf="@id/img_video"
76 + app:layout_constraintStart_toEndOf="@+id/img_video"
77 + app:layout_constraintTop_toTopOf="@id/img_video" />
78 +
79 + <Button
80 + android:id="@+id/btn_back"
81 + style="?android:attr/borderlessButtonStyle"
82 + android:layout_width="48dp"
83 + android:layout_height="48dp"
84 + android:layout_marginEnd="10dp"
85 + android:background="@drawable/round_lens_delete_24"
86 + app:layout_constraintBottom_toBottomOf="@id/img_thumbnail"
87 + app:layout_constraintEnd_toEndOf="parent"
88 + app:layout_constraintTop_toBottomOf="@+id/img_thumbnail" />
89 +
90 + <ImageView
91 + android:id="@+id/img_delete"
92 + android:layout_width="24dp"
93 + android:layout_height="24dp"
94 + android:src="@drawable/round_delete_white_24"
95 + app:layout_constraintBottom_toBottomOf="@id/btn_back"
96 + app:layout_constraintEnd_toEndOf="@id/btn_back"
97 + app:layout_constraintStart_toStartOf="@+id/btn_back"
98 + app:layout_constraintTop_toTopOf="@id/btn_back" />
99 +
100 + </androidx.constraintlayout.widget.ConstraintLayout>
101 +</androidx.cardview.widget.CardView>
...\ No newline at end of file ...\ No newline at end of file
...@@ -27,9 +27,11 @@ ...@@ -27,9 +27,11 @@
27 27
28 <string name="sample_device_name">Galaxy Note 10</string> 28 <string name="sample_device_name">Galaxy Note 10</string>
29 <string name="sample_remote_date">2020.10.07(수) 17:50:00</string> 29 <string name="sample_remote_date">2020.10.07(수) 17:50:00</string>
30 + <string name="sample_play_time">01:41</string>
30 31
31 <string name="video_settings">비디오 설정</string> 32 <string name="video_settings">비디오 설정</string>
32 <string name="video_auto_record">비디오 자동 녹화</string> 33 <string name="video_auto_record">비디오 자동 녹화</string>
34 + <string name="video_list">비디오 목록</string>
33 35
34 <string name="logout">로그아웃</string> 36 <string name="logout">로그아웃</string>
35 37
......