Showing
7 changed files
with
184 additions
and
38 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" | 3 | + android:layout_width="match_parent" |
4 | + android:layout_height="match_parent" | ||
5 | + android:id="@+id/drawer_main" | ||
6 | + xmlns:app="http://schemas.android.com/apk/res-auto"> | ||
7 | + | ||
8 | + <androidx.constraintlayout.widget.ConstraintLayout xmlns:app="http://schemas.android.com/apk/res-auto" | ||
4 | xmlns:tools="http://schemas.android.com/tools" | 9 | xmlns:tools="http://schemas.android.com/tools" |
5 | android:layout_width="match_parent" | 10 | android:layout_width="match_parent" |
6 | android:layout_height="match_parent" | 11 | android:layout_height="match_parent" |
12 | + android:background="@color/colorAccent" | ||
7 | tools:context=".ui.MainActivity"> | 13 | tools:context=".ui.MainActivity"> |
8 | 14 | ||
9 | <androidx.appcompat.widget.Toolbar | 15 | <androidx.appcompat.widget.Toolbar |
... | @@ -141,8 +147,8 @@ | ... | @@ -141,8 +147,8 @@ |
141 | 147 | ||
142 | <androidx.constraintlayout.widget.ConstraintLayout | 148 | <androidx.constraintlayout.widget.ConstraintLayout |
143 | android:id="@+id/container_remote_button" | 149 | android:id="@+id/container_remote_button" |
144 | - android:layout_width="wrap_content" | 150 | + android:layout_width="0dp" |
145 | - android:layout_height="wrap_content" | 151 | + android:layout_height="0dp" |
146 | android:background="@color/colorAccent" | 152 | android:background="@color/colorAccent" |
147 | app:layout_constraintBottom_toTopOf="@id/line_horizontal" | 153 | app:layout_constraintBottom_toTopOf="@id/line_horizontal" |
148 | app:layout_constraintEnd_toStartOf="@id/line_vertical" | 154 | app:layout_constraintEnd_toStartOf="@id/line_vertical" |
... | @@ -155,9 +161,11 @@ | ... | @@ -155,9 +161,11 @@ |
155 | android:layout_width="48dp" | 161 | android:layout_width="48dp" |
156 | android:layout_height="48dp" | 162 | android:layout_height="48dp" |
157 | android:background="@drawable/bg_btn_circle_main" | 163 | android:background="@drawable/bg_btn_circle_main" |
164 | + app:layout_constraintBottom_toTopOf="@+id/tv_remote" | ||
158 | app:layout_constraintEnd_toEndOf="parent" | 165 | app:layout_constraintEnd_toEndOf="parent" |
159 | app:layout_constraintStart_toStartOf="parent" | 166 | app:layout_constraintStart_toStartOf="parent" |
160 | - app:layout_constraintTop_toTopOf="parent" /> | 167 | + app:layout_constraintTop_toTopOf="parent" |
168 | + app:layout_constraintVertical_chainStyle="packed" /> | ||
161 | 169 | ||
162 | <ImageView | 170 | <ImageView |
163 | android:layout_width="wrap_content" | 171 | android:layout_width="wrap_content" |
... | @@ -169,6 +177,7 @@ | ... | @@ -169,6 +177,7 @@ |
169 | app:layout_constraintTop_toTopOf="@id/btn_back_1" /> | 177 | app:layout_constraintTop_toTopOf="@id/btn_back_1" /> |
170 | 178 | ||
171 | <TextView | 179 | <TextView |
180 | + android:id="@+id/tv_remote" | ||
172 | android:layout_width="wrap_content" | 181 | android:layout_width="wrap_content" |
173 | android:layout_height="wrap_content" | 182 | android:layout_height="wrap_content" |
174 | android:layout_marginTop="10dp" | 183 | android:layout_marginTop="10dp" |
... | @@ -176,16 +185,18 @@ | ... | @@ -176,16 +185,18 @@ |
176 | android:text="@string/menu_remote_control" | 185 | android:text="@string/menu_remote_control" |
177 | android:textColor="@color/colorBackground" | 186 | android:textColor="@color/colorBackground" |
178 | android:textSize="15sp" | 187 | android:textSize="15sp" |
188 | + app:layout_constraintBottom_toBottomOf="parent" | ||
179 | app:layout_constraintEnd_toEndOf="parent" | 189 | app:layout_constraintEnd_toEndOf="parent" |
180 | app:layout_constraintStart_toStartOf="parent" | 190 | app:layout_constraintStart_toStartOf="parent" |
181 | - app:layout_constraintTop_toBottomOf="@id/btn_back_1" /> | 191 | + app:layout_constraintTop_toBottomOf="@id/btn_back_1" |
192 | + app:layout_constraintVertical_chainStyle="packed" /> | ||
182 | 193 | ||
183 | </androidx.constraintlayout.widget.ConstraintLayout> | 194 | </androidx.constraintlayout.widget.ConstraintLayout> |
184 | 195 | ||
185 | <androidx.constraintlayout.widget.ConstraintLayout | 196 | <androidx.constraintlayout.widget.ConstraintLayout |
186 | android:id="@+id/container_record_button" | 197 | android:id="@+id/container_record_button" |
187 | - android:layout_width="wrap_content" | 198 | + android:layout_width="0dp" |
188 | - android:layout_height="wrap_content" | 199 | + android:layout_height="0dp" |
189 | android:background="@color/colorAccent" | 200 | android:background="@color/colorAccent" |
190 | app:layout_constraintBottom_toTopOf="@id/line_horizontal" | 201 | app:layout_constraintBottom_toTopOf="@id/line_horizontal" |
191 | app:layout_constraintEnd_toEndOf="parent" | 202 | app:layout_constraintEnd_toEndOf="parent" |
... | @@ -198,9 +209,11 @@ | ... | @@ -198,9 +209,11 @@ |
198 | android:layout_width="48dp" | 209 | android:layout_width="48dp" |
199 | android:layout_height="48dp" | 210 | android:layout_height="48dp" |
200 | android:background="@drawable/bg_btn_circle_main" | 211 | android:background="@drawable/bg_btn_circle_main" |
212 | + app:layout_constraintBottom_toTopOf="@+id/tv_record" | ||
201 | app:layout_constraintEnd_toEndOf="parent" | 213 | app:layout_constraintEnd_toEndOf="parent" |
202 | app:layout_constraintStart_toStartOf="parent" | 214 | app:layout_constraintStart_toStartOf="parent" |
203 | - app:layout_constraintTop_toTopOf="parent" /> | 215 | + app:layout_constraintTop_toTopOf="parent" |
216 | + app:layout_constraintVertical_chainStyle="packed" /> | ||
204 | 217 | ||
205 | <ImageView | 218 | <ImageView |
206 | android:layout_width="wrap_content" | 219 | android:layout_width="wrap_content" |
... | @@ -212,6 +225,7 @@ | ... | @@ -212,6 +225,7 @@ |
212 | app:layout_constraintTop_toTopOf="@id/btn_back_2" /> | 225 | app:layout_constraintTop_toTopOf="@id/btn_back_2" /> |
213 | 226 | ||
214 | <TextView | 227 | <TextView |
228 | + android:id="@+id/tv_record" | ||
215 | android:layout_width="wrap_content" | 229 | android:layout_width="wrap_content" |
216 | android:layout_height="wrap_content" | 230 | android:layout_height="wrap_content" |
217 | android:layout_marginTop="10dp" | 231 | android:layout_marginTop="10dp" |
... | @@ -219,9 +233,11 @@ | ... | @@ -219,9 +233,11 @@ |
219 | android:text="@string/menu_remote_control_record" | 233 | android:text="@string/menu_remote_control_record" |
220 | android:textColor="@color/colorBackground" | 234 | android:textColor="@color/colorBackground" |
221 | android:textSize="15sp" | 235 | android:textSize="15sp" |
236 | + app:layout_constraintBottom_toBottomOf="parent" | ||
222 | app:layout_constraintEnd_toEndOf="parent" | 237 | app:layout_constraintEnd_toEndOf="parent" |
223 | app:layout_constraintStart_toStartOf="parent" | 238 | app:layout_constraintStart_toStartOf="parent" |
224 | - app:layout_constraintTop_toBottomOf="@id/btn_back_2" /> | 239 | + app:layout_constraintTop_toBottomOf="@id/btn_back_2" |
240 | + app:layout_constraintVertical_chainStyle="packed" /> | ||
225 | 241 | ||
226 | </androidx.constraintlayout.widget.ConstraintLayout> | 242 | </androidx.constraintlayout.widget.ConstraintLayout> |
227 | 243 | ||
... | @@ -313,12 +329,13 @@ | ... | @@ -313,12 +329,13 @@ |
313 | 329 | ||
314 | </androidx.constraintlayout.widget.ConstraintLayout> | 330 | </androidx.constraintlayout.widget.ConstraintLayout> |
315 | 331 | ||
316 | - <Button | 332 | + </androidx.constraintlayout.widget.ConstraintLayout> |
317 | - android:id="@+id/btn_setting" | ||
318 | - 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 | 333 | ||
324 | -</androidx.constraintlayout.widget.ConstraintLayout> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
334 | + <com.google.android.material.navigation.NavigationView | ||
335 | + android:id="@+id/nav_view" | ||
336 | + android:layout_width="wrap_content" | ||
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