Showing
7 changed files
with
433 additions
and
287 deletions
... | @@ -12,7 +12,7 @@ | ... | @@ -12,7 +12,7 @@ |
12 | android:roundIcon="@mipmap/ic_launcher_round" | 12 | android:roundIcon="@mipmap/ic_launcher_round" |
13 | android:supportsRtl="true" | 13 | android:supportsRtl="true" |
14 | android:networkSecurityConfig="@xml/network_security_config" | 14 | android:networkSecurityConfig="@xml/network_security_config" |
15 | - android:theme="@style/Theme.AppCompat.NoActionBar"> | 15 | + android:theme="@style/AppTheme"> |
16 | <activity android:name=".ui.VideoCheckActivity"></activity> | 16 | <activity android:name=".ui.VideoCheckActivity"></activity> |
17 | <activity android:name=".ui.DeviceManagerActivity" /> | 17 | <activity android:name=".ui.DeviceManagerActivity" /> |
18 | <activity android:name=".ui.RemoteControlRecordActivity" /> | 18 | <activity android:name=".ui.RemoteControlRecordActivity" /> | ... | ... |
1 | package com.sunnni.smartdoorlock.ui; | 1 | package com.sunnni.smartdoorlock.ui; |
2 | 2 | ||
3 | +import androidx.annotation.NonNull; | ||
4 | +import androidx.appcompat.app.AlertDialog; | ||
3 | import androidx.appcompat.app.AppCompatActivity; | 5 | import androidx.appcompat.app.AppCompatActivity; |
4 | import androidx.appcompat.widget.Toolbar; | 6 | import androidx.appcompat.widget.Toolbar; |
5 | import androidx.constraintlayout.widget.ConstraintLayout; | 7 | import androidx.constraintlayout.widget.ConstraintLayout; |
8 | +import androidx.core.view.GravityCompat; | ||
9 | +import androidx.drawerlayout.widget.DrawerLayout; | ||
6 | 10 | ||
7 | import android.annotation.SuppressLint; | 11 | import android.annotation.SuppressLint; |
12 | +import android.content.DialogInterface; | ||
8 | import android.content.Intent; | 13 | import android.content.Intent; |
9 | import android.os.Bundle; | 14 | import android.os.Bundle; |
10 | import android.os.CountDownTimer; | 15 | import android.os.CountDownTimer; |
16 | +import android.view.MenuItem; | ||
11 | import android.view.View; | 17 | import android.view.View; |
12 | import android.widget.Button; | 18 | import android.widget.Button; |
13 | import android.widget.ImageView; | 19 | import android.widget.ImageView; |
14 | import android.widget.TextView; | 20 | import android.widget.TextView; |
21 | +import android.widget.Toast; | ||
15 | 22 | ||
23 | +import com.google.android.material.navigation.NavigationView; | ||
16 | import com.sunnni.smartdoorlock.R; | 24 | import com.sunnni.smartdoorlock.R; |
17 | 25 | ||
18 | -import org.w3c.dom.Text; | ||
19 | - | ||
20 | import java.util.Objects; | 26 | import java.util.Objects; |
21 | -import java.util.Timer; | ||
22 | -import java.util.TimerTask; | ||
23 | - | ||
24 | -// TODO: 타이머 구현 | ||
25 | -// TODO: drawer layout 구현 | ||
26 | 27 | ||
27 | public class MainActivity extends AppCompatActivity { | 28 | public class MainActivity extends AppCompatActivity { |
28 | 29 | ||
29 | - private Button btnSetting; | ||
30 | private Button mBtnTagControl; | 30 | private Button mBtnTagControl; |
31 | private ImageView mBtnTagControlBackground; | 31 | private ImageView mBtnTagControlBackground; |
32 | private TextView mTvTagButtonStatus, mTvTagButtonStatusDetail; | 32 | private TextView mTvTagButtonStatus, mTvTagButtonStatusDetail; |
33 | + DrawerLayout mDrawerLayout; | ||
34 | + | ||
35 | + AlertDialog alertDialog; | ||
33 | 36 | ||
34 | TagTimer timer; | 37 | TagTimer timer; |
35 | 38 | ||
... | @@ -41,16 +44,10 @@ public class MainActivity extends AppCompatActivity { | ... | @@ -41,16 +44,10 @@ public class MainActivity extends AppCompatActivity { |
41 | Toolbar mToolbar = findViewById(R.id.toolbar_main); | 44 | Toolbar mToolbar = findViewById(R.id.toolbar_main); |
42 | setToolbar(mToolbar); | 45 | setToolbar(mToolbar); |
43 | 46 | ||
47 | + setDrawerLayout(); | ||
48 | + | ||
44 | init(); | 49 | init(); |
45 | timer = new TagTimer(5 * 1000, 1000, 5); | 50 | timer = new TagTimer(5 * 1000, 1000, 5); |
46 | - | ||
47 | - btnSetting = (Button) findViewById(R.id.btn_setting); | ||
48 | - btnSetting.setOnClickListener(new View.OnClickListener() { | ||
49 | - @Override | ||
50 | - public void onClick(View view) { | ||
51 | - startActivity(new Intent(MainActivity.this, SettingActivity.class)); | ||
52 | - } | ||
53 | - }); | ||
54 | } | 51 | } |
55 | 52 | ||
56 | // 툴바 설정 | 53 | // 툴바 설정 |
... | @@ -62,6 +59,49 @@ public class MainActivity extends AppCompatActivity { | ... | @@ -62,6 +59,49 @@ public class MainActivity extends AppCompatActivity { |
62 | getSupportActionBar().setHomeAsUpIndicator(R.drawable.baseline_menu_white_24); | 59 | getSupportActionBar().setHomeAsUpIndicator(R.drawable.baseline_menu_white_24); |
63 | } | 60 | } |
64 | 61 | ||
62 | + @Override | ||
63 | + public boolean onOptionsItemSelected(MenuItem item) { | ||
64 | + switch (item.getItemId()) { | ||
65 | + case android.R.id.home: { | ||
66 | + mDrawerLayout.openDrawer(GravityCompat.START); | ||
67 | + return true; | ||
68 | + } | ||
69 | + } | ||
70 | + return super.onOptionsItemSelected(item); | ||
71 | + } | ||
72 | + | ||
73 | + private void setDrawerLayout() { | ||
74 | + mDrawerLayout = findViewById(R.id.drawer_main); | ||
75 | + NavigationView mNavView = findViewById(R.id.nav_view); | ||
76 | + | ||
77 | + mNavView.setNavigationItemSelectedListener(new NavigationView.OnNavigationItemSelectedListener() { | ||
78 | + @Override | ||
79 | + public boolean onNavigationItemSelected(@NonNull MenuItem item) { | ||
80 | + item.setChecked(true); | ||
81 | + mDrawerLayout.closeDrawers(); | ||
82 | + | ||
83 | + switch (item.getItemId()) { | ||
84 | + case R.id.item_remote_control: | ||
85 | + remoteControlDialog(); | ||
86 | + return true; | ||
87 | + case R.id.item_remote_control_record: | ||
88 | + startActivity(new Intent(MainActivity.this, RemoteControlRecordActivity.class)); | ||
89 | + return true; | ||
90 | + case R.id.item_device_manager: | ||
91 | + startActivity(new Intent(MainActivity.this, DeviceManagerActivity.class)); | ||
92 | + return true; | ||
93 | + case R.id.item_video_check: | ||
94 | + startActivity(new Intent(MainActivity.this, VideoCheckActivity.class)); | ||
95 | + return true; | ||
96 | + case R.id.item_logout: | ||
97 | + startActivity(new Intent(MainActivity.this, SettingActivity.class)); | ||
98 | + return true; | ||
99 | + } | ||
100 | + return false; | ||
101 | + } | ||
102 | + }); | ||
103 | + } | ||
104 | + | ||
65 | private void init() { | 105 | private void init() { |
66 | mBtnTagControl = findViewById(R.id.btn_tag_control); | 106 | mBtnTagControl = findViewById(R.id.btn_tag_control); |
67 | mBtnTagControlBackground = findViewById(R.id.btn_tag_control_back); | 107 | mBtnTagControlBackground = findViewById(R.id.btn_tag_control_back); |
... | @@ -81,10 +121,22 @@ public class MainActivity extends AppCompatActivity { | ... | @@ -81,10 +121,22 @@ public class MainActivity extends AppCompatActivity { |
81 | ConstraintLayout mClDeviceManager = findViewById(R.id.container_device_button); | 121 | ConstraintLayout mClDeviceManager = findViewById(R.id.container_device_button); |
82 | ConstraintLayout mClVideoRecord = findViewById(R.id.container_video_button); | 122 | ConstraintLayout mClVideoRecord = findViewById(R.id.container_video_button); |
83 | 123 | ||
124 | + Button mBtnRemoteControl = findViewById(R.id.btn_back_1); | ||
125 | + Button mBtnRemoteRecord = findViewById(R.id.btn_back_2); | ||
126 | + Button mBtnDeviceManager = findViewById(R.id.btn_back_3); | ||
127 | + Button mBtnVideoRecord = findViewById(R.id.btn_back_4); | ||
128 | + | ||
84 | mClRemoteControl.setOnClickListener(new View.OnClickListener() { | 129 | mClRemoteControl.setOnClickListener(new View.OnClickListener() { |
85 | @Override | 130 | @Override |
86 | public void onClick(View v) { | 131 | public void onClick(View v) { |
87 | - // 원격 잠금해제 팝업 | 132 | + remoteControlDialog(); |
133 | + } | ||
134 | + }); | ||
135 | + | ||
136 | + mBtnRemoteControl.setOnClickListener(new View.OnClickListener() { | ||
137 | + @Override | ||
138 | + public void onClick(View v) { | ||
139 | + remoteControlDialog(); | ||
88 | } | 140 | } |
89 | }); | 141 | }); |
90 | 142 | ||
... | @@ -97,6 +149,14 @@ public class MainActivity extends AppCompatActivity { | ... | @@ -97,6 +149,14 @@ public class MainActivity extends AppCompatActivity { |
97 | } | 149 | } |
98 | }); | 150 | }); |
99 | 151 | ||
152 | + mBtnRemoteRecord.setOnClickListener(new View.OnClickListener() { | ||
153 | + @Override | ||
154 | + public void onClick(View v) { | ||
155 | + Intent intent = new Intent(MainActivity.this, RemoteControlRecordActivity.class); | ||
156 | + startActivity(intent); | ||
157 | + } | ||
158 | + }); | ||
159 | + | ||
100 | // 기기 관리 화면으로 이동 | 160 | // 기기 관리 화면으로 이동 |
101 | mClDeviceManager.setOnClickListener(new View.OnClickListener() { | 161 | mClDeviceManager.setOnClickListener(new View.OnClickListener() { |
102 | @Override | 162 | @Override |
... | @@ -106,6 +166,14 @@ public class MainActivity extends AppCompatActivity { | ... | @@ -106,6 +166,14 @@ public class MainActivity extends AppCompatActivity { |
106 | } | 166 | } |
107 | }); | 167 | }); |
108 | 168 | ||
169 | + mBtnDeviceManager.setOnClickListener(new View.OnClickListener() { | ||
170 | + @Override | ||
171 | + public void onClick(View v) { | ||
172 | + Intent intent = new Intent(MainActivity.this, DeviceManagerActivity.class); | ||
173 | + startActivity(intent); | ||
174 | + } | ||
175 | + }); | ||
176 | + | ||
109 | // 비디오 확인 화면으로 이동 | 177 | // 비디오 확인 화면으로 이동 |
110 | mClVideoRecord.setOnClickListener(new View.OnClickListener() { | 178 | mClVideoRecord.setOnClickListener(new View.OnClickListener() { |
111 | @Override | 179 | @Override |
... | @@ -114,6 +182,14 @@ public class MainActivity extends AppCompatActivity { | ... | @@ -114,6 +182,14 @@ public class MainActivity extends AppCompatActivity { |
114 | startActivity(intent); | 182 | startActivity(intent); |
115 | } | 183 | } |
116 | }); | 184 | }); |
185 | + | ||
186 | + mBtnVideoRecord.setOnClickListener(new View.OnClickListener() { | ||
187 | + @Override | ||
188 | + public void onClick(View v) { | ||
189 | + Intent intent = new Intent(MainActivity.this, VideoCheckActivity.class); | ||
190 | + startActivity(intent); | ||
191 | + } | ||
192 | + }); | ||
117 | } | 193 | } |
118 | 194 | ||
119 | // 도어락 태그 버튼 상태에 따라 뷰 변경 | 195 | // 도어락 태그 버튼 상태에 따라 뷰 변경 |
... | @@ -137,6 +213,28 @@ public class MainActivity extends AppCompatActivity { | ... | @@ -137,6 +213,28 @@ public class MainActivity extends AppCompatActivity { |
137 | mBtnTagControlBackground.setSelected(mBtnTagControl.isSelected()); | 213 | mBtnTagControlBackground.setSelected(mBtnTagControl.isSelected()); |
138 | } | 214 | } |
139 | 215 | ||
216 | + private void remoteControlDialog() { | ||
217 | + AlertDialog.Builder builder = new AlertDialog.Builder(this, R.style.AlertDialogTheme); | ||
218 | + builder.setTitle(getString(R.string.menu_remote_control)) | ||
219 | + .setMessage(getString(R.string.alert_message)); | ||
220 | + builder.setPositiveButton("열기", new DialogInterface.OnClickListener() { | ||
221 | + @Override | ||
222 | + public void onClick(DialogInterface dialog, int which) { | ||
223 | + // 원격 해제 구현 부분 | ||
224 | + Toast.makeText(MainActivity.this, "도어락이 열렸습니다.", Toast.LENGTH_SHORT).show(); | ||
225 | + } | ||
226 | + }); | ||
227 | + builder.setNegativeButton("취소", new DialogInterface.OnClickListener() { | ||
228 | + @Override | ||
229 | + public void onClick(DialogInterface dialog, int which) { | ||
230 | + | ||
231 | + } | ||
232 | + }); | ||
233 | + alertDialog = builder.create(); | ||
234 | + alertDialog.show(); | ||
235 | + } | ||
236 | + | ||
237 | + // 타이머 이너클래스 | ||
140 | class TagTimer extends CountDownTimer { | 238 | class TagTimer extends CountDownTimer { |
141 | 239 | ||
142 | int count; | 240 | int count; | ... | ... |
... | @@ -34,8 +34,6 @@ public class SplashActivity extends AppCompatActivity { | ... | @@ -34,8 +34,6 @@ public class SplashActivity extends AppCompatActivity { |
34 | 34 | ||
35 | private Animation logoAnimation; | 35 | private Animation logoAnimation; |
36 | 36 | ||
37 | - private ImageView test; | ||
38 | - | ||
39 | @SuppressLint("ClickableViewAccessibility") | 37 | @SuppressLint("ClickableViewAccessibility") |
40 | @Override | 38 | @Override |
41 | protected void onCreate(Bundle savedInstanceState) { | 39 | protected void onCreate(Bundle savedInstanceState) { | ... | ... |
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.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" |
3 | - xmlns:app="http://schemas.android.com/apk/res-auto" | ||
4 | - xmlns:tools="http://schemas.android.com/tools" | ||
5 | android:layout_width="match_parent" | 3 | android:layout_width="match_parent" |
6 | android:layout_height="match_parent" | 4 | android:layout_height="match_parent" |
7 | - tools:context=".ui.MainActivity"> | 5 | + android:id="@+id/drawer_main" |
8 | - | 6 | + xmlns:app="http://schemas.android.com/apk/res-auto"> |
9 | - <androidx.appcompat.widget.Toolbar | 7 | + |
10 | - android:id="@+id/toolbar_main" | 8 | + <androidx.constraintlayout.widget.ConstraintLayout xmlns:app="http://schemas.android.com/apk/res-auto" |
11 | - android:layout_width="0dp" | 9 | + xmlns:tools="http://schemas.android.com/tools" |
12 | - android:layout_height="?attr/actionBarSize" | 10 | + android:layout_width="match_parent" |
13 | - android:background="@color/colorBackground" | 11 | + android:layout_height="match_parent" |
14 | - app:layout_constraintEnd_toEndOf="parent" | 12 | + android:background="@color/colorAccent" |
15 | - app:layout_constraintStart_toStartOf="parent" | 13 | + tools:context=".ui.MainActivity"> |
16 | - app:layout_constraintTop_toTopOf="parent"> | 14 | + |
17 | - | 15 | + <androidx.appcompat.widget.Toolbar |
18 | - <TextView | 16 | + android:id="@+id/toolbar_main" |
19 | - android:layout_width="wrap_content" | ||
20 | - android:layout_height="wrap_content" | ||
21 | - android:fontFamily="@font/g_market_sans_ttf_medium" | ||
22 | - android:text="@string/app_name_korean" | ||
23 | - android:textColor="@color/colorMainText" | ||
24 | - android:textSize="21sp" /> | ||
25 | - | ||
26 | - </androidx.appcompat.widget.Toolbar> | ||
27 | - | ||
28 | - <androidx.constraintlayout.widget.ConstraintLayout | ||
29 | - android:id="@+id/container_tag_button" | ||
30 | - android:layout_width="0dp" | ||
31 | - android:layout_height="0dp" | ||
32 | - android:background="@color/colorBackground" | ||
33 | - app:layout_constraintEnd_toEndOf="parent" | ||
34 | - app:layout_constraintHeight_default="percent" | ||
35 | - app:layout_constraintHeight_percent="0.45" | ||
36 | - app:layout_constraintStart_toStartOf="parent" | ||
37 | - app:layout_constraintTop_toBottomOf="@+id/toolbar_main"> | ||
38 | - | ||
39 | - <ImageView | ||
40 | - android:id="@+id/btn_tag_control_back" | ||
41 | android:layout_width="0dp" | 17 | android:layout_width="0dp" |
42 | - android:layout_height="0dp" | 18 | + android:layout_height="?attr/actionBarSize" |
43 | - android:src="@drawable/selector_btn_tag_back" | 19 | + android:background="@color/colorBackground" |
44 | - app:layout_constraintDimensionRatio="1:1" | ||
45 | app:layout_constraintEnd_toEndOf="parent" | 20 | app:layout_constraintEnd_toEndOf="parent" |
46 | app:layout_constraintStart_toStartOf="parent" | 21 | app:layout_constraintStart_toStartOf="parent" |
47 | - app:layout_constraintTop_toTopOf="parent" | 22 | + app:layout_constraintTop_toTopOf="parent"> |
48 | - app:layout_constraintWidth_default="percent" | ||
49 | - app:layout_constraintWidth_percent="0.53" /> | ||
50 | 23 | ||
51 | - <Button | 24 | + <TextView |
52 | - style="?android:attr/borderlessButtonStyle" | 25 | + android:layout_width="wrap_content" |
53 | - android:layout_width="0dp" | 26 | + android:layout_height="wrap_content" |
54 | - android:layout_height="0dp" | 27 | + android:fontFamily="@font/g_market_sans_ttf_medium" |
55 | - android:background="@drawable/bg_btn_circle_main" | 28 | + android:text="@string/app_name_korean" |
56 | - app:layout_constraintBottom_toBottomOf="@+id/btn_tag_control_back" | 29 | + android:textColor="@color/colorMainText" |
57 | - app:layout_constraintDimensionRatio="1:1" | 30 | + android:textSize="21sp" /> |
58 | - app:layout_constraintEnd_toEndOf="@id/btn_tag_control_back" | ||
59 | - app:layout_constraintStart_toStartOf="@+id/btn_tag_control_back" | ||
60 | - app:layout_constraintTop_toTopOf="@+id/btn_tag_control_back" | ||
61 | - app:layout_constraintWidth_default="percent" | ||
62 | - app:layout_constraintWidth_percent="0.37" /> | ||
63 | - | ||
64 | - <Button | ||
65 | - android:id="@+id/btn_tag_control" | ||
66 | - style="?android:attr/borderlessButtonStyle" | ||
67 | - android:layout_width="0dp" | ||
68 | - android:layout_height="0dp" | ||
69 | - android:background="@drawable/selector_btn_tag" | ||
70 | - android:text="@string/button_on" | ||
71 | - android:textColor="@color/colorMainText" | ||
72 | - android:textSize="28sp" | ||
73 | - app:layout_constraintBottom_toBottomOf="@+id/btn_tag_control_back" | ||
74 | - app:layout_constraintDimensionRatio="1:1" | ||
75 | - app:layout_constraintEnd_toEndOf="@id/btn_tag_control_back" | ||
76 | - app:layout_constraintStart_toStartOf="@+id/btn_tag_control_back" | ||
77 | - app:layout_constraintTop_toTopOf="@+id/btn_tag_control_back" | ||
78 | - app:layout_constraintWidth_default="percent" | ||
79 | - app:layout_constraintWidth_percent="0.3" /> | ||
80 | - | ||
81 | - <TextView | ||
82 | - android:id="@+id/tv_tag_status" | ||
83 | - android:layout_width="wrap_content" | ||
84 | - android:layout_height="wrap_content" | ||
85 | - android:layout_marginTop="7dp" | ||
86 | - android:fontFamily="@font/g_market_sans_ttf_medium" | ||
87 | - android:text="@string/tag_status_off" | ||
88 | - android:textColor="@color/colorMainText" | ||
89 | - android:textSize="17sp" | ||
90 | - app:layout_constraintEnd_toEndOf="parent" | ||
91 | - app:layout_constraintStart_toStartOf="parent" | ||
92 | - app:layout_constraintTop_toBottomOf="@+id/btn_tag_control_back" /> | ||
93 | - | ||
94 | - <TextView | ||
95 | - android:id="@+id/tv_tag_status_detail" | ||
96 | - android:layout_width="wrap_content" | ||
97 | - android:layout_height="wrap_content" | ||
98 | - android:layout_marginTop="7dp" | ||
99 | - android:fontFamily="@font/g_market_sans_ttf_light" | ||
100 | - android:text="@string/tag_status_off_detail" | ||
101 | - android:textColor="@color/colorMainText" | ||
102 | - android:textSize="15sp" | ||
103 | - app:layout_constraintEnd_toEndOf="parent" | ||
104 | - app:layout_constraintStart_toStartOf="parent" | ||
105 | - app:layout_constraintTop_toBottomOf="@+id/tv_tag_status" /> | ||
106 | 31 | ||
107 | - </androidx.constraintlayout.widget.ConstraintLayout> | 32 | + </androidx.appcompat.widget.Toolbar> |
108 | 33 | ||
109 | - <androidx.constraintlayout.widget.ConstraintLayout | 34 | + <androidx.constraintlayout.widget.ConstraintLayout |
110 | - android:id="@+id/container_menu" | 35 | + android:id="@+id/container_tag_button" |
111 | - android:layout_width="0dp" | ||
112 | - android:layout_height="0dp" | ||
113 | - android:background="@drawable/bg_shadow" | ||
114 | - app:layout_constraintEnd_toEndOf="parent" | ||
115 | - app:layout_constraintHeight_default="percent" | ||
116 | - app:layout_constraintHeight_percent="0.45" | ||
117 | - app:layout_constraintStart_toStartOf="parent" | ||
118 | - app:layout_constraintTop_toBottomOf="@+id/container_tag_button"> | ||
119 | - | ||
120 | - <LinearLayout | ||
121 | - android:id="@+id/line_horizontal" | ||
122 | android:layout_width="0dp" | 36 | android:layout_width="0dp" |
123 | - android:layout_height="0.5dp" | ||
124 | - android:background="@color/colorLine" | ||
125 | - android:orientation="horizontal" | ||
126 | - app:layout_constraintBottom_toBottomOf="parent" | ||
127 | - app:layout_constraintEnd_toEndOf="parent" | ||
128 | - app:layout_constraintStart_toStartOf="parent" | ||
129 | - app:layout_constraintTop_toTopOf="parent" /> | ||
130 | - | ||
131 | - <LinearLayout | ||
132 | - android:id="@+id/line_vertical" | ||
133 | - android:layout_width="0.5dp" | ||
134 | android:layout_height="0dp" | 37 | android:layout_height="0dp" |
135 | - android:background="@color/colorLine" | 38 | + android:background="@color/colorBackground" |
136 | - android:orientation="vertical" | ||
137 | - app:layout_constraintBottom_toBottomOf="parent" | ||
138 | app:layout_constraintEnd_toEndOf="parent" | 39 | app:layout_constraintEnd_toEndOf="parent" |
40 | + app:layout_constraintHeight_default="percent" | ||
41 | + app:layout_constraintHeight_percent="0.45" | ||
139 | app:layout_constraintStart_toStartOf="parent" | 42 | app:layout_constraintStart_toStartOf="parent" |
140 | - app:layout_constraintTop_toTopOf="parent" /> | 43 | + app:layout_constraintTop_toBottomOf="@+id/toolbar_main"> |
141 | - | ||
142 | - <androidx.constraintlayout.widget.ConstraintLayout | ||
143 | - android:id="@+id/container_remote_button" | ||
144 | - android:layout_width="wrap_content" | ||
145 | - android:layout_height="wrap_content" | ||
146 | - android:background="@color/colorAccent" | ||
147 | - app:layout_constraintBottom_toTopOf="@id/line_horizontal" | ||
148 | - app:layout_constraintEnd_toStartOf="@id/line_vertical" | ||
149 | - app:layout_constraintStart_toStartOf="parent" | ||
150 | - app:layout_constraintTop_toTopOf="parent"> | ||
151 | - | ||
152 | - <Button | ||
153 | - android:id="@+id/btn_back_1" | ||
154 | - style="?android:attr/borderlessButtonStyle" | ||
155 | - android:layout_width="48dp" | ||
156 | - android:layout_height="48dp" | ||
157 | - android:background="@drawable/bg_btn_circle_main" | ||
158 | - app:layout_constraintEnd_toEndOf="parent" | ||
159 | - app:layout_constraintStart_toStartOf="parent" | ||
160 | - app:layout_constraintTop_toTopOf="parent" /> | ||
161 | 44 | ||
162 | <ImageView | 45 | <ImageView |
163 | - android:layout_width="wrap_content" | 46 | + android:id="@+id/btn_tag_control_back" |
164 | - android:layout_height="wrap_content" | 47 | + android:layout_width="0dp" |
165 | - android:src="@drawable/baseline_settings_remote_white_24" | 48 | + android:layout_height="0dp" |
166 | - app:layout_constraintBottom_toBottomOf="@id/btn_back_1" | 49 | + android:src="@drawable/selector_btn_tag_back" |
167 | - app:layout_constraintEnd_toEndOf="@id/btn_back_1" | 50 | + app:layout_constraintDimensionRatio="1:1" |
168 | - app:layout_constraintStart_toStartOf="@id/btn_back_1" | ||
169 | - app:layout_constraintTop_toTopOf="@id/btn_back_1" /> | ||
170 | - | ||
171 | - <TextView | ||
172 | - android:layout_width="wrap_content" | ||
173 | - android:layout_height="wrap_content" | ||
174 | - android:layout_marginTop="10dp" | ||
175 | - android:fontFamily="@font/g_market_sans_ttf_medium" | ||
176 | - android:text="@string/menu_remote_control" | ||
177 | - android:textColor="@color/colorBackground" | ||
178 | - android:textSize="15sp" | ||
179 | app:layout_constraintEnd_toEndOf="parent" | 51 | app:layout_constraintEnd_toEndOf="parent" |
180 | app:layout_constraintStart_toStartOf="parent" | 52 | app:layout_constraintStart_toStartOf="parent" |
181 | - app:layout_constraintTop_toBottomOf="@id/btn_back_1" /> | 53 | + app:layout_constraintTop_toTopOf="parent" |
182 | - | 54 | + app:layout_constraintWidth_default="percent" |
183 | - </androidx.constraintlayout.widget.ConstraintLayout> | 55 | + app:layout_constraintWidth_percent="0.53" /> |
184 | - | ||
185 | - <androidx.constraintlayout.widget.ConstraintLayout | ||
186 | - android:id="@+id/container_record_button" | ||
187 | - android:layout_width="wrap_content" | ||
188 | - android:layout_height="wrap_content" | ||
189 | - android:background="@color/colorAccent" | ||
190 | - app:layout_constraintBottom_toTopOf="@id/line_horizontal" | ||
191 | - app:layout_constraintEnd_toEndOf="parent" | ||
192 | - app:layout_constraintStart_toEndOf="@id/line_vertical" | ||
193 | - app:layout_constraintTop_toTopOf="parent"> | ||
194 | 56 | ||
195 | <Button | 57 | <Button |
196 | - android:id="@+id/btn_back_2" | ||
197 | style="?android:attr/borderlessButtonStyle" | 58 | style="?android:attr/borderlessButtonStyle" |
198 | - android:layout_width="48dp" | 59 | + android:layout_width="0dp" |
199 | - android:layout_height="48dp" | 60 | + android:layout_height="0dp" |
200 | android:background="@drawable/bg_btn_circle_main" | 61 | android:background="@drawable/bg_btn_circle_main" |
201 | - app:layout_constraintEnd_toEndOf="parent" | 62 | + app:layout_constraintBottom_toBottomOf="@+id/btn_tag_control_back" |
202 | - app:layout_constraintStart_toStartOf="parent" | 63 | + app:layout_constraintDimensionRatio="1:1" |
203 | - app:layout_constraintTop_toTopOf="parent" /> | 64 | + app:layout_constraintEnd_toEndOf="@id/btn_tag_control_back" |
65 | + app:layout_constraintStart_toStartOf="@+id/btn_tag_control_back" | ||
66 | + app:layout_constraintTop_toTopOf="@+id/btn_tag_control_back" | ||
67 | + app:layout_constraintWidth_default="percent" | ||
68 | + app:layout_constraintWidth_percent="0.37" /> | ||
204 | 69 | ||
205 | - <ImageView | 70 | + <Button |
206 | - android:layout_width="wrap_content" | 71 | + android:id="@+id/btn_tag_control" |
207 | - android:layout_height="wrap_content" | 72 | + style="?android:attr/borderlessButtonStyle" |
208 | - android:src="@drawable/baseline_event_note_white_24" | 73 | + android:layout_width="0dp" |
209 | - app:layout_constraintBottom_toBottomOf="@id/btn_back_2" | 74 | + android:layout_height="0dp" |
210 | - app:layout_constraintEnd_toEndOf="@id/btn_back_2" | 75 | + android:background="@drawable/selector_btn_tag" |
211 | - app:layout_constraintStart_toStartOf="@id/btn_back_2" | 76 | + android:text="@string/button_on" |
212 | - app:layout_constraintTop_toTopOf="@id/btn_back_2" /> | 77 | + android:textColor="@color/colorMainText" |
78 | + android:textSize="28sp" | ||
79 | + app:layout_constraintBottom_toBottomOf="@+id/btn_tag_control_back" | ||
80 | + app:layout_constraintDimensionRatio="1:1" | ||
81 | + app:layout_constraintEnd_toEndOf="@id/btn_tag_control_back" | ||
82 | + app:layout_constraintStart_toStartOf="@+id/btn_tag_control_back" | ||
83 | + app:layout_constraintTop_toTopOf="@+id/btn_tag_control_back" | ||
84 | + app:layout_constraintWidth_default="percent" | ||
85 | + app:layout_constraintWidth_percent="0.3" /> | ||
213 | 86 | ||
214 | <TextView | 87 | <TextView |
88 | + android:id="@+id/tv_tag_status" | ||
215 | android:layout_width="wrap_content" | 89 | android:layout_width="wrap_content" |
216 | android:layout_height="wrap_content" | 90 | android:layout_height="wrap_content" |
217 | - android:layout_marginTop="10dp" | 91 | + android:layout_marginTop="7dp" |
218 | android:fontFamily="@font/g_market_sans_ttf_medium" | 92 | android:fontFamily="@font/g_market_sans_ttf_medium" |
219 | - android:text="@string/menu_remote_control_record" | 93 | + android:text="@string/tag_status_off" |
220 | - android:textColor="@color/colorBackground" | 94 | + android:textColor="@color/colorMainText" |
221 | - android:textSize="15sp" | 95 | + android:textSize="17sp" |
222 | - app:layout_constraintEnd_toEndOf="parent" | ||
223 | - app:layout_constraintStart_toStartOf="parent" | ||
224 | - app:layout_constraintTop_toBottomOf="@id/btn_back_2" /> | ||
225 | - | ||
226 | - </androidx.constraintlayout.widget.ConstraintLayout> | ||
227 | - | ||
228 | - <androidx.constraintlayout.widget.ConstraintLayout | ||
229 | - android:id="@+id/container_device_button" | ||
230 | - android:layout_width="wrap_content" | ||
231 | - android:layout_height="wrap_content" | ||
232 | - android:background="@color/colorAccent" | ||
233 | - app:layout_constraintBottom_toBottomOf="parent" | ||
234 | - app:layout_constraintEnd_toStartOf="@id/line_vertical" | ||
235 | - app:layout_constraintStart_toStartOf="parent" | ||
236 | - app:layout_constraintTop_toBottomOf="@id/line_horizontal"> | ||
237 | - | ||
238 | - <Button | ||
239 | - android:id="@+id/btn_back_3" | ||
240 | - style="?android:attr/borderlessButtonStyle" | ||
241 | - android:layout_width="48dp" | ||
242 | - android:layout_height="48dp" | ||
243 | - android:background="@drawable/bg_btn_circle_main" | ||
244 | app:layout_constraintEnd_toEndOf="parent" | 96 | app:layout_constraintEnd_toEndOf="parent" |
245 | app:layout_constraintStart_toStartOf="parent" | 97 | app:layout_constraintStart_toStartOf="parent" |
246 | - app:layout_constraintTop_toTopOf="parent" /> | 98 | + app:layout_constraintTop_toBottomOf="@+id/btn_tag_control_back" /> |
247 | - | ||
248 | - <ImageView | ||
249 | - android:layout_width="wrap_content" | ||
250 | - android:layout_height="wrap_content" | ||
251 | - android:src="@drawable/baseline_perm_device_information_white_24" | ||
252 | - app:layout_constraintBottom_toBottomOf="@id/btn_back_3" | ||
253 | - app:layout_constraintEnd_toEndOf="@id/btn_back_3" | ||
254 | - app:layout_constraintStart_toStartOf="@id/btn_back_3" | ||
255 | - app:layout_constraintTop_toTopOf="@id/btn_back_3" /> | ||
256 | 99 | ||
257 | <TextView | 100 | <TextView |
101 | + android:id="@+id/tv_tag_status_detail" | ||
258 | android:layout_width="wrap_content" | 102 | android:layout_width="wrap_content" |
259 | android:layout_height="wrap_content" | 103 | android:layout_height="wrap_content" |
260 | - android:layout_marginTop="10dp" | 104 | + android:layout_marginTop="7dp" |
261 | - android:fontFamily="@font/g_market_sans_ttf_medium" | 105 | + android:fontFamily="@font/g_market_sans_ttf_light" |
262 | - android:text="@string/menu_device_manager" | 106 | + android:text="@string/tag_status_off_detail" |
263 | - android:textColor="@color/colorBackground" | 107 | + android:textColor="@color/colorMainText" |
264 | android:textSize="15sp" | 108 | android:textSize="15sp" |
265 | app:layout_constraintEnd_toEndOf="parent" | 109 | app:layout_constraintEnd_toEndOf="parent" |
266 | app:layout_constraintStart_toStartOf="parent" | 110 | app:layout_constraintStart_toStartOf="parent" |
267 | - app:layout_constraintTop_toBottomOf="@id/btn_back_3" /> | 111 | + app:layout_constraintTop_toBottomOf="@+id/tv_tag_status" /> |
268 | 112 | ||
269 | </androidx.constraintlayout.widget.ConstraintLayout> | 113 | </androidx.constraintlayout.widget.ConstraintLayout> |
270 | 114 | ||
271 | <androidx.constraintlayout.widget.ConstraintLayout | 115 | <androidx.constraintlayout.widget.ConstraintLayout |
272 | - android:id="@+id/container_video_button" | 116 | + android:id="@+id/container_menu" |
273 | - android:layout_width="wrap_content" | 117 | + android:layout_width="0dp" |
274 | - android:layout_height="wrap_content" | 118 | + android:layout_height="0dp" |
275 | - android:background="@color/colorAccent" | 119 | + android:background="@drawable/bg_shadow" |
276 | - app:layout_constraintBottom_toBottomOf="parent" | ||
277 | app:layout_constraintEnd_toEndOf="parent" | 120 | app:layout_constraintEnd_toEndOf="parent" |
278 | - app:layout_constraintStart_toEndOf="@id/line_vertical" | 121 | + app:layout_constraintHeight_default="percent" |
279 | - app:layout_constraintTop_toBottomOf="@id/line_horizontal"> | 122 | + app:layout_constraintHeight_percent="0.45" |
123 | + app:layout_constraintStart_toStartOf="parent" | ||
124 | + app:layout_constraintTop_toBottomOf="@+id/container_tag_button"> | ||
125 | + | ||
126 | + <LinearLayout | ||
127 | + android:id="@+id/line_horizontal" | ||
128 | + android:layout_width="0dp" | ||
129 | + android:layout_height="0.5dp" | ||
130 | + android:background="@color/colorLine" | ||
131 | + android:orientation="horizontal" | ||
132 | + app:layout_constraintBottom_toBottomOf="parent" | ||
133 | + app:layout_constraintEnd_toEndOf="parent" | ||
134 | + app:layout_constraintStart_toStartOf="parent" | ||
135 | + app:layout_constraintTop_toTopOf="parent" /> | ||
280 | 136 | ||
281 | - <Button | 137 | + <LinearLayout |
282 | - android:id="@+id/btn_back_4" | 138 | + android:id="@+id/line_vertical" |
283 | - style="?android:attr/borderlessButtonStyle" | 139 | + android:layout_width="0.5dp" |
284 | - android:layout_width="48dp" | 140 | + android:layout_height="0dp" |
285 | - android:layout_height="48dp" | 141 | + android:background="@color/colorLine" |
286 | - android:background="@drawable/bg_btn_circle_main" | 142 | + android:orientation="vertical" |
143 | + app:layout_constraintBottom_toBottomOf="parent" | ||
287 | app:layout_constraintEnd_toEndOf="parent" | 144 | app:layout_constraintEnd_toEndOf="parent" |
288 | app:layout_constraintStart_toStartOf="parent" | 145 | app:layout_constraintStart_toStartOf="parent" |
289 | app:layout_constraintTop_toTopOf="parent" /> | 146 | app:layout_constraintTop_toTopOf="parent" /> |
290 | 147 | ||
291 | - <ImageView | 148 | + <androidx.constraintlayout.widget.ConstraintLayout |
149 | + android:id="@+id/container_remote_button" | ||
150 | + android:layout_width="0dp" | ||
151 | + android:layout_height="0dp" | ||
152 | + android:background="@color/colorAccent" | ||
153 | + app:layout_constraintBottom_toTopOf="@id/line_horizontal" | ||
154 | + app:layout_constraintEnd_toStartOf="@id/line_vertical" | ||
155 | + app:layout_constraintStart_toStartOf="parent" | ||
156 | + app:layout_constraintTop_toTopOf="parent"> | ||
157 | + | ||
158 | + <Button | ||
159 | + android:id="@+id/btn_back_1" | ||
160 | + style="?android:attr/borderlessButtonStyle" | ||
161 | + android:layout_width="48dp" | ||
162 | + android:layout_height="48dp" | ||
163 | + android:background="@drawable/bg_btn_circle_main" | ||
164 | + app:layout_constraintBottom_toTopOf="@+id/tv_remote" | ||
165 | + app:layout_constraintEnd_toEndOf="parent" | ||
166 | + app:layout_constraintStart_toStartOf="parent" | ||
167 | + app:layout_constraintTop_toTopOf="parent" | ||
168 | + app:layout_constraintVertical_chainStyle="packed" /> | ||
169 | + | ||
170 | + <ImageView | ||
171 | + android:layout_width="wrap_content" | ||
172 | + android:layout_height="wrap_content" | ||
173 | + android:src="@drawable/baseline_settings_remote_white_24" | ||
174 | + app:layout_constraintBottom_toBottomOf="@id/btn_back_1" | ||
175 | + app:layout_constraintEnd_toEndOf="@id/btn_back_1" | ||
176 | + app:layout_constraintStart_toStartOf="@id/btn_back_1" | ||
177 | + app:layout_constraintTop_toTopOf="@id/btn_back_1" /> | ||
178 | + | ||
179 | + <TextView | ||
180 | + android:id="@+id/tv_remote" | ||
181 | + android:layout_width="wrap_content" | ||
182 | + android:layout_height="wrap_content" | ||
183 | + android:layout_marginTop="10dp" | ||
184 | + android:fontFamily="@font/g_market_sans_ttf_medium" | ||
185 | + android:text="@string/menu_remote_control" | ||
186 | + android:textColor="@color/colorBackground" | ||
187 | + android:textSize="15sp" | ||
188 | + app:layout_constraintBottom_toBottomOf="parent" | ||
189 | + app:layout_constraintEnd_toEndOf="parent" | ||
190 | + app:layout_constraintStart_toStartOf="parent" | ||
191 | + app:layout_constraintTop_toBottomOf="@id/btn_back_1" | ||
192 | + app:layout_constraintVertical_chainStyle="packed" /> | ||
193 | + | ||
194 | + </androidx.constraintlayout.widget.ConstraintLayout> | ||
195 | + | ||
196 | + <androidx.constraintlayout.widget.ConstraintLayout | ||
197 | + android:id="@+id/container_record_button" | ||
198 | + android:layout_width="0dp" | ||
199 | + android:layout_height="0dp" | ||
200 | + android:background="@color/colorAccent" | ||
201 | + app:layout_constraintBottom_toTopOf="@id/line_horizontal" | ||
202 | + app:layout_constraintEnd_toEndOf="parent" | ||
203 | + app:layout_constraintStart_toEndOf="@id/line_vertical" | ||
204 | + app:layout_constraintTop_toTopOf="parent"> | ||
205 | + | ||
206 | + <Button | ||
207 | + android:id="@+id/btn_back_2" | ||
208 | + style="?android:attr/borderlessButtonStyle" | ||
209 | + android:layout_width="48dp" | ||
210 | + android:layout_height="48dp" | ||
211 | + android:background="@drawable/bg_btn_circle_main" | ||
212 | + app:layout_constraintBottom_toTopOf="@+id/tv_record" | ||
213 | + app:layout_constraintEnd_toEndOf="parent" | ||
214 | + app:layout_constraintStart_toStartOf="parent" | ||
215 | + app:layout_constraintTop_toTopOf="parent" | ||
216 | + app:layout_constraintVertical_chainStyle="packed" /> | ||
217 | + | ||
218 | + <ImageView | ||
219 | + android:layout_width="wrap_content" | ||
220 | + android:layout_height="wrap_content" | ||
221 | + android:src="@drawable/baseline_event_note_white_24" | ||
222 | + app:layout_constraintBottom_toBottomOf="@id/btn_back_2" | ||
223 | + app:layout_constraintEnd_toEndOf="@id/btn_back_2" | ||
224 | + app:layout_constraintStart_toStartOf="@id/btn_back_2" | ||
225 | + app:layout_constraintTop_toTopOf="@id/btn_back_2" /> | ||
226 | + | ||
227 | + <TextView | ||
228 | + android:id="@+id/tv_record" | ||
229 | + android:layout_width="wrap_content" | ||
230 | + android:layout_height="wrap_content" | ||
231 | + android:layout_marginTop="10dp" | ||
232 | + android:fontFamily="@font/g_market_sans_ttf_medium" | ||
233 | + android:text="@string/menu_remote_control_record" | ||
234 | + android:textColor="@color/colorBackground" | ||
235 | + android:textSize="15sp" | ||
236 | + app:layout_constraintBottom_toBottomOf="parent" | ||
237 | + app:layout_constraintEnd_toEndOf="parent" | ||
238 | + app:layout_constraintStart_toStartOf="parent" | ||
239 | + app:layout_constraintTop_toBottomOf="@id/btn_back_2" | ||
240 | + app:layout_constraintVertical_chainStyle="packed" /> | ||
241 | + | ||
242 | + </androidx.constraintlayout.widget.ConstraintLayout> | ||
243 | + | ||
244 | + <androidx.constraintlayout.widget.ConstraintLayout | ||
245 | + android:id="@+id/container_device_button" | ||
292 | android:layout_width="wrap_content" | 246 | android:layout_width="wrap_content" |
293 | android:layout_height="wrap_content" | 247 | android:layout_height="wrap_content" |
294 | - android:src="@drawable/baseline_ondemand_video_white_24" | 248 | + android:background="@color/colorAccent" |
295 | - app:layout_constraintBottom_toBottomOf="@id/btn_back_4" | 249 | + app:layout_constraintBottom_toBottomOf="parent" |
296 | - app:layout_constraintEnd_toEndOf="@id/btn_back_4" | 250 | + app:layout_constraintEnd_toStartOf="@id/line_vertical" |
297 | - app:layout_constraintStart_toStartOf="@id/btn_back_4" | 251 | + app:layout_constraintStart_toStartOf="parent" |
298 | - app:layout_constraintTop_toTopOf="@id/btn_back_4" /> | 252 | + app:layout_constraintTop_toBottomOf="@id/line_horizontal"> |
299 | - | 253 | + |
300 | - <TextView | 254 | + <Button |
255 | + android:id="@+id/btn_back_3" | ||
256 | + style="?android:attr/borderlessButtonStyle" | ||
257 | + android:layout_width="48dp" | ||
258 | + android:layout_height="48dp" | ||
259 | + android:background="@drawable/bg_btn_circle_main" | ||
260 | + app:layout_constraintEnd_toEndOf="parent" | ||
261 | + app:layout_constraintStart_toStartOf="parent" | ||
262 | + app:layout_constraintTop_toTopOf="parent" /> | ||
263 | + | ||
264 | + <ImageView | ||
265 | + android:layout_width="wrap_content" | ||
266 | + android:layout_height="wrap_content" | ||
267 | + android:src="@drawable/baseline_perm_device_information_white_24" | ||
268 | + app:layout_constraintBottom_toBottomOf="@id/btn_back_3" | ||
269 | + app:layout_constraintEnd_toEndOf="@id/btn_back_3" | ||
270 | + app:layout_constraintStart_toStartOf="@id/btn_back_3" | ||
271 | + app:layout_constraintTop_toTopOf="@id/btn_back_3" /> | ||
272 | + | ||
273 | + <TextView | ||
274 | + android:layout_width="wrap_content" | ||
275 | + android:layout_height="wrap_content" | ||
276 | + android:layout_marginTop="10dp" | ||
277 | + android:fontFamily="@font/g_market_sans_ttf_medium" | ||
278 | + android:text="@string/menu_device_manager" | ||
279 | + android:textColor="@color/colorBackground" | ||
280 | + android:textSize="15sp" | ||
281 | + app:layout_constraintEnd_toEndOf="parent" | ||
282 | + app:layout_constraintStart_toStartOf="parent" | ||
283 | + app:layout_constraintTop_toBottomOf="@id/btn_back_3" /> | ||
284 | + | ||
285 | + </androidx.constraintlayout.widget.ConstraintLayout> | ||
286 | + | ||
287 | + <androidx.constraintlayout.widget.ConstraintLayout | ||
288 | + android:id="@+id/container_video_button" | ||
301 | android:layout_width="wrap_content" | 289 | android:layout_width="wrap_content" |
302 | android:layout_height="wrap_content" | 290 | android:layout_height="wrap_content" |
303 | - android:layout_marginTop="10dp" | 291 | + android:background="@color/colorAccent" |
304 | - android:fontFamily="@font/g_market_sans_ttf_medium" | 292 | + app:layout_constraintBottom_toBottomOf="parent" |
305 | - android:text="@string/menu_video_check" | ||
306 | - android:textColor="@color/colorBackground" | ||
307 | - android:textSize="15sp" | ||
308 | app:layout_constraintEnd_toEndOf="parent" | 293 | app:layout_constraintEnd_toEndOf="parent" |
309 | - app:layout_constraintStart_toStartOf="parent" | 294 | + app:layout_constraintStart_toEndOf="@id/line_vertical" |
310 | - app:layout_constraintTop_toBottomOf="@id/btn_back_4" /> | 295 | + app:layout_constraintTop_toBottomOf="@id/line_horizontal"> |
296 | + | ||
297 | + <Button | ||
298 | + android:id="@+id/btn_back_4" | ||
299 | + style="?android:attr/borderlessButtonStyle" | ||
300 | + android:layout_width="48dp" | ||
301 | + android:layout_height="48dp" | ||
302 | + android:background="@drawable/bg_btn_circle_main" | ||
303 | + app:layout_constraintEnd_toEndOf="parent" | ||
304 | + app:layout_constraintStart_toStartOf="parent" | ||
305 | + app:layout_constraintTop_toTopOf="parent" /> | ||
306 | + | ||
307 | + <ImageView | ||
308 | + android:layout_width="wrap_content" | ||
309 | + android:layout_height="wrap_content" | ||
310 | + android:src="@drawable/baseline_ondemand_video_white_24" | ||
311 | + app:layout_constraintBottom_toBottomOf="@id/btn_back_4" | ||
312 | + app:layout_constraintEnd_toEndOf="@id/btn_back_4" | ||
313 | + app:layout_constraintStart_toStartOf="@id/btn_back_4" | ||
314 | + app:layout_constraintTop_toTopOf="@id/btn_back_4" /> | ||
315 | + | ||
316 | + <TextView | ||
317 | + android:layout_width="wrap_content" | ||
318 | + android:layout_height="wrap_content" | ||
319 | + android:layout_marginTop="10dp" | ||
320 | + android:fontFamily="@font/g_market_sans_ttf_medium" | ||
321 | + android:text="@string/menu_video_check" | ||
322 | + android:textColor="@color/colorBackground" | ||
323 | + android:textSize="15sp" | ||
324 | + app:layout_constraintEnd_toEndOf="parent" | ||
325 | + app:layout_constraintStart_toStartOf="parent" | ||
326 | + app:layout_constraintTop_toBottomOf="@id/btn_back_4" /> | ||
327 | + | ||
328 | + </androidx.constraintlayout.widget.ConstraintLayout> | ||
311 | 329 | ||
312 | </androidx.constraintlayout.widget.ConstraintLayout> | 330 | </androidx.constraintlayout.widget.ConstraintLayout> |
313 | 331 | ||
314 | </androidx.constraintlayout.widget.ConstraintLayout> | 332 | </androidx.constraintlayout.widget.ConstraintLayout> |
315 | 333 | ||
316 | - <Button | 334 | + <com.google.android.material.navigation.NavigationView |
317 | - android:id="@+id/btn_setting" | 335 | + android:id="@+id/nav_view" |
318 | android:layout_width="wrap_content" | 336 | android:layout_width="wrap_content" |
319 | - android:layout_height="wrap_content" | ||
320 | - android:text="btn_setting" | ||
321 | - tools:layout_editor_absoluteX="166dp" | ||
322 | - tools:layout_editor_absoluteY="399dp" /> | ||
323 | - | ||
324 | -</androidx.constraintlayout.widget.ConstraintLayout> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
337 | + android:layout_height="match_parent" | ||
338 | + android:layout_gravity="start" | ||
339 | + android:fitsSystemWindows="true" | ||
340 | + app:menu="@menu/menu_navi" /> | ||
341 | +</androidx.drawerlayout.widget.DrawerLayout> | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
app/src/main/res/menu/menu_navi.xml
0 → 100644
1 | +<?xml version="1.0" encoding="utf-8"?> | ||
2 | +<menu xmlns:android="http://schemas.android.com/apk/res/android"> | ||
3 | + | ||
4 | + <item | ||
5 | + android:id="@+id/item_remote_control" | ||
6 | + style="@style/TextAppearance.AppCompat.Widget.ActionBar.Title" | ||
7 | + android:title="@string/menu_remote_control" /> | ||
8 | + <item | ||
9 | + android:id="@+id/item_remote_control_record" | ||
10 | + style="@style/TextAppearance.AppCompat.Widget.ActionBar.Title" | ||
11 | + android:title="@string/menu_remote_control_record" /> | ||
12 | + <item | ||
13 | + android:id="@+id/item_device_manager" | ||
14 | + style="@style/TextAppearance.AppCompat.Widget.ActionBar.Title" | ||
15 | + android:title="@string/menu_device_manager" /> | ||
16 | + <item | ||
17 | + android:id="@+id/item_video_check" | ||
18 | + style="@style/TextAppearance.AppCompat.Widget.ActionBar.Title" | ||
19 | + android:title="@string/menu_video_check" /> | ||
20 | + <item | ||
21 | + android:id="@+id/item_logout" | ||
22 | + style="@style/TextAppearance.AppCompat.Widget.ActionBar.Title" | ||
23 | + android:title="설정" /> | ||
24 | + | ||
25 | +</menu> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
... | @@ -14,4 +14,6 @@ | ... | @@ -14,4 +14,6 @@ |
14 | <string name="tag_status_off_detail">버튼을 누른 후 스캔해주세요</string> | 14 | <string name="tag_status_off_detail">버튼을 누른 후 스캔해주세요</string> |
15 | <string name="tag_status_on">도어락 태그 켜짐</string> | 15 | <string name="tag_status_on">도어락 태그 켜짐</string> |
16 | <string name="tag_status_on_detail">초 후 꺼짐</string> | 16 | <string name="tag_status_on_detail">초 후 꺼짐</string> |
17 | + | ||
18 | + <string name="alert_message">버튼을 클릭하시면 원격으로 도어락을 열 수 있습니다.\n\n정말 도어락을 여시겠습니까?\n\n</string> | ||
17 | </resources> | 19 | </resources> | ... | ... |
... | @@ -3,9 +3,15 @@ | ... | @@ -3,9 +3,15 @@ |
3 | <!-- Base application theme. --> | 3 | <!-- Base application theme. --> |
4 | <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> | 4 | <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> |
5 | <!-- Customize your theme here. --> | 5 | <!-- Customize your theme here. --> |
6 | + <item name="android:alertDialogTheme">@style/AlertDialogTheme</item> | ||
7 | + | ||
6 | <item name="colorPrimary">@color/colorPrimary</item> | 8 | <item name="colorPrimary">@color/colorPrimary</item> |
7 | <item name="colorPrimaryDark">@color/colorPrimaryDark</item> | 9 | <item name="colorPrimaryDark">@color/colorPrimaryDark</item> |
8 | <item name="colorAccent">@color/colorAccent</item> | 10 | <item name="colorAccent">@color/colorAccent</item> |
9 | </style> | 11 | </style> |
10 | 12 | ||
13 | + <style name="AlertDialogTheme" parent="Theme.AppCompat.Light.Dialog.Alert"> | ||
14 | + <item name="colorAccent">@color/colorPrimary</item> | ||
15 | + </style> | ||
16 | + | ||
11 | </resources> | 17 | </resources> | ... | ... |
-
Please register or login to post a comment