Showing
32 changed files
with
469 additions
and
219 deletions
... | @@ -11,21 +11,26 @@ | ... | @@ -11,21 +11,26 @@ |
11 | android:label="@string/app_name" | 11 | android:label="@string/app_name" |
12 | android:roundIcon="@mipmap/ic_launcher_round" | 12 | android:roundIcon="@mipmap/ic_launcher_round" |
13 | android:supportsRtl="true" | 13 | android:supportsRtl="true" |
14 | - android:theme="@style/AppTheme"> | 14 | + android:networkSecurityConfig="@xml/network_security_config" |
15 | + android:theme="@style/Theme.AppCompat.NoActionBar"> | ||
15 | <activity android:name=".ui.VideoCheckActivity"></activity> | 16 | <activity android:name=".ui.VideoCheckActivity"></activity> |
16 | <activity android:name=".ui.DeviceManagerActivity" /> | 17 | <activity android:name=".ui.DeviceManagerActivity" /> |
17 | <activity android:name=".ui.RemoteControlRecordActivity" /> | 18 | <activity android:name=".ui.RemoteControlRecordActivity" /> |
18 | <activity | 19 | <activity |
19 | android:name=".ui.SplashActivity" | 20 | android:name=".ui.SplashActivity" |
20 | android:noHistory="true" | 21 | android:noHistory="true" |
21 | - android:screenOrientation="fullSensor" /> | 22 | + android:screenOrientation="fullSensor" > |
22 | - <activity android:name=".ui.MainActivity"> | 23 | + |
23 | <intent-filter> | 24 | <intent-filter> |
24 | <action android:name="android.intent.action.MAIN" /> | 25 | <action android:name="android.intent.action.MAIN" /> |
25 | 26 | ||
26 | <category android:name="android.intent.category.LAUNCHER" /> | 27 | <category android:name="android.intent.category.LAUNCHER" /> |
27 | </intent-filter> | 28 | </intent-filter> |
28 | </activity> | 29 | </activity> |
30 | + <activity android:name=".ui.MainActivity"> | ||
31 | + | ||
32 | + </activity> | ||
33 | + <activity android:name=".ui.SettingActivity" /> | ||
29 | </application> | 34 | </application> |
30 | 35 | ||
31 | </manifest> | 36 | </manifest> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
app/src/main/ic_launcher-playstore.png
0 → 100644
22.3 KB
1 | +package com.sunnni.smartdoorlock.api; | ||
2 | + | ||
3 | +import android.os.Handler; | ||
4 | +import android.util.Log; | ||
5 | + | ||
6 | +import com.google.gson.JsonArray; | ||
7 | +import com.google.gson.JsonElement; | ||
8 | +import com.google.gson.JsonObject; | ||
9 | +import com.google.gson.JsonParser; | ||
10 | + | ||
11 | +import org.json.JSONObject; | ||
12 | + | ||
13 | +import java.io.BufferedInputStream; | ||
14 | +import java.io.BufferedReader; | ||
15 | +import java.io.InputStream; | ||
16 | +import java.io.InputStreamReader; | ||
17 | +import java.io.OutputStream; | ||
18 | +import java.net.HttpURLConnection; | ||
19 | +import java.net.URL; | ||
20 | +import java.util.Iterator; | ||
21 | +import java.util.Set; | ||
22 | + | ||
23 | +public class Api { | ||
24 | + public interface Callback { | ||
25 | + void callbackMethod(Object obj); | ||
26 | + } | ||
27 | + | ||
28 | + static private final String DOMAIN = "gateway.bu.to"; | ||
29 | + static private String accessToken = null; | ||
30 | + | ||
31 | + static private void callApi(final String method, final String endpoint, final JsonObject params, final Callback callback) { | ||
32 | + final Handler handler = new Handler(); | ||
33 | + new Thread() { | ||
34 | + public void run() { | ||
35 | + ApiResult apiResult; | ||
36 | + try { | ||
37 | + String queryString = ""; | ||
38 | + if(("GET".equals(method) || "DELETE".equals(method)) && params != null) { | ||
39 | + Set<String> keys = params.keySet(); | ||
40 | + Iterator<String> iter = keys.iterator(); | ||
41 | + while(iter.hasNext()) { | ||
42 | + String key = iter.next(); | ||
43 | + queryString += "&" + key + "=" + params.get(key).getAsString(); | ||
44 | + } | ||
45 | + queryString = "?" + queryString.substring(1); | ||
46 | + } | ||
47 | + | ||
48 | + URL url = new URL("http://" + Api.DOMAIN + endpoint + queryString); | ||
49 | + HttpURLConnection conn = (HttpURLConnection) url.openConnection(); | ||
50 | + conn.setRequestMethod(method); | ||
51 | + | ||
52 | + if(accessToken != null) { | ||
53 | + conn.setRequestProperty("access_token", accessToken); | ||
54 | + } | ||
55 | + | ||
56 | + if("POST".equals(method) || "PUT".equals(method)) { | ||
57 | + if(params == null) { | ||
58 | + throw new Exception("params is null"); | ||
59 | + } | ||
60 | + OutputStream os = conn.getOutputStream(); | ||
61 | + os.write(params.toString().getBytes()); | ||
62 | + os.flush(); | ||
63 | + os.close(); | ||
64 | + } | ||
65 | + | ||
66 | + int status = conn.getResponseCode(); | ||
67 | + Log.d("status", String.valueOf(status)); | ||
68 | + InputStream is = conn.getErrorStream(); | ||
69 | + if(is == null) | ||
70 | + is = conn.getInputStream(); | ||
71 | + | ||
72 | + StringBuilder builder = new StringBuilder(); | ||
73 | + BufferedReader reader = new BufferedReader(new InputStreamReader(is, "UTF-8")); | ||
74 | + String line; | ||
75 | + while((line = reader.readLine()) != null) { | ||
76 | + builder.append(line); | ||
77 | + } | ||
78 | + | ||
79 | + Log.d("http result", builder.toString()); | ||
80 | + JsonElement jsonElement = JsonParser.parseString(builder.toString()); | ||
81 | + | ||
82 | + apiResult = new ApiResult(status < 300, status, jsonElement); | ||
83 | + } catch (Exception e) { | ||
84 | + e.printStackTrace(); | ||
85 | + apiResult = new ApiResult(false); | ||
86 | + } | ||
87 | + | ||
88 | + final ApiResult finalApiResult = apiResult; | ||
89 | + handler.post(new Runnable() { | ||
90 | + @Override | ||
91 | + public void run() { | ||
92 | + callback.callbackMethod(finalApiResult); | ||
93 | + } | ||
94 | + }); | ||
95 | + } | ||
96 | + }.start(); | ||
97 | + } | ||
98 | + | ||
99 | + static public void setAccessToken(String accessToken) { | ||
100 | + Api.accessToken = accessToken; | ||
101 | + } | ||
102 | + | ||
103 | + static public void auth(String doorId, final Callback callback) { | ||
104 | + if("123123123".equals(doorId)) { | ||
105 | + // 테스트를 위한 super pass | ||
106 | + callback.callbackMethod(new Auth(true, "superpass")); | ||
107 | + return; | ||
108 | + } | ||
109 | + | ||
110 | + JsonObject params = new JsonObject(); | ||
111 | + params.addProperty("door_id", doorId); | ||
112 | + callApi("GET", "/api/auth", params, new Callback() { | ||
113 | + @Override | ||
114 | + public void callbackMethod(Object obj) { | ||
115 | + ApiResult apiResult = (ApiResult) obj; | ||
116 | + if(apiResult.isSuccess()) { | ||
117 | + JsonObject resp = (JsonObject) apiResult.getData(); | ||
118 | + if(resp.get("is_available").getAsBoolean()) { | ||
119 | + callback.callbackMethod(new Auth(true, resp.get("access_token").getAsString())); | ||
120 | + } else { | ||
121 | + callback.callbackMethod(new Auth(false)); | ||
122 | + } | ||
123 | + } else { | ||
124 | + callback.callbackMethod(null); | ||
125 | + } | ||
126 | + } | ||
127 | + }); | ||
128 | + } | ||
129 | + | ||
130 | + static public void getSetting(final Callback callback) { | ||
131 | + callApi("GET", "/api/setting", null, new Callback() { | ||
132 | + @Override | ||
133 | + public void callbackMethod(Object obj) { | ||
134 | + ApiResult apiResult = (ApiResult) obj; | ||
135 | + if(apiResult.isSuccess()) { | ||
136 | + JsonObject resp = (JsonObject) apiResult.getData(); | ||
137 | + callback.callbackMethod(new Setting(resp.get("recording").getAsBoolean())); | ||
138 | + } else { | ||
139 | + callback.callbackMethod(null); | ||
140 | + } | ||
141 | + } | ||
142 | + }); | ||
143 | + } | ||
144 | + | ||
145 | + static public void setSetting(Setting setting, final Callback callback) { | ||
146 | + JsonObject params = new JsonObject(); | ||
147 | + params.addProperty("recording", setting.getRecording()); | ||
148 | + | ||
149 | + callApi("PUT", "/api/setting", params, new Callback() { | ||
150 | + @Override | ||
151 | + public void callbackMethod(Object obj) { | ||
152 | + ApiResult apiResult = (ApiResult) obj; | ||
153 | + if(apiResult.isSuccess()) { | ||
154 | + callback.callbackMethod(true); | ||
155 | + } else { | ||
156 | + callback.callbackMethod(null); | ||
157 | + } | ||
158 | + } | ||
159 | + }); | ||
160 | + } | ||
161 | +} |
1 | +package com.sunnni.smartdoorlock.api; | ||
2 | + | ||
3 | +import com.google.gson.JsonElement; | ||
4 | +import com.google.gson.JsonObject; | ||
5 | + | ||
6 | +public class ApiResult { | ||
7 | + public boolean isSuccess() { | ||
8 | + return this.success; | ||
9 | + } | ||
10 | + | ||
11 | + public Object getData() { | ||
12 | + return this.data; | ||
13 | + } | ||
14 | + | ||
15 | + public int getStatus() { | ||
16 | + return this.status; | ||
17 | + } | ||
18 | + | ||
19 | + public ApiResult(boolean success, int status, JsonElement obj) { | ||
20 | + this.success = success; | ||
21 | + this.data = obj; | ||
22 | + this.status = status; | ||
23 | + } | ||
24 | + | ||
25 | + public ApiResult(boolean success) { | ||
26 | + this.success = success; | ||
27 | + this.data = null; | ||
28 | + this.status = 999; | ||
29 | + } | ||
30 | + | ||
31 | + private boolean success; | ||
32 | + private JsonElement data; | ||
33 | + private int status; | ||
34 | +} |
1 | +package com.sunnni.smartdoorlock.api; | ||
2 | + | ||
3 | +public class Auth { | ||
4 | + private boolean isAvailable; | ||
5 | + private String accessToken = null; | ||
6 | + | ||
7 | + public Auth(boolean isAvailable, String accessToken) { | ||
8 | + this.isAvailable = isAvailable; | ||
9 | + this.accessToken = accessToken; | ||
10 | + } | ||
11 | + | ||
12 | + public Auth(boolean isAvailable) { | ||
13 | + this.isAvailable = isAvailable; | ||
14 | + } | ||
15 | + | ||
16 | + public boolean getIsAvailable() { | ||
17 | + return this.isAvailable; | ||
18 | + } | ||
19 | + | ||
20 | + public String getAccessToken() { | ||
21 | + return this.accessToken; | ||
22 | + } | ||
23 | +} |
1 | +package com.sunnni.smartdoorlock.ui; | ||
2 | + | ||
3 | +import android.content.Intent; | ||
4 | +import android.content.SharedPreferences; | ||
5 | +import android.os.Bundle; | ||
6 | +import android.view.View; | ||
7 | +import android.widget.Button; | ||
8 | +import android.widget.CompoundButton; | ||
9 | +import android.widget.Switch; | ||
10 | +import android.widget.Toast; | ||
11 | + | ||
12 | +import com.sunnni.smartdoorlock.R; | ||
13 | +import com.sunnni.smartdoorlock.api.Api; | ||
14 | +import com.sunnni.smartdoorlock.api.Setting; | ||
15 | + | ||
16 | +import androidx.appcompat.app.AppCompatActivity; | ||
17 | + | ||
18 | +public class SettingActivity extends AppCompatActivity { | ||
19 | + private Switch swcRecording; | ||
20 | + private Button btnLogout; | ||
21 | + | ||
22 | + @Override | ||
23 | + protected void onCreate(Bundle savedInstanceState) { | ||
24 | + super.onCreate(savedInstanceState); | ||
25 | + setContentView(R.layout.activity_setting); | ||
26 | + btnLogout = (Button) findViewById(R.id.btn_logout); | ||
27 | + btnLogout.setOnClickListener(new View.OnClickListener() { | ||
28 | + @Override | ||
29 | + public void onClick(View view) { | ||
30 | + SharedPreferences pref = getSharedPreferences("gateway", MODE_PRIVATE); | ||
31 | + SharedPreferences.Editor editor = pref.edit(); | ||
32 | + editor.remove("accessToken"); | ||
33 | + editor.commit(); | ||
34 | + startActivity(new Intent(SettingActivity.this, SplashActivity.class)); | ||
35 | + } | ||
36 | + }); | ||
37 | + | ||
38 | + swcRecording = (Switch) findViewById(R.id.swc_recording); | ||
39 | + swcRecording.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { | ||
40 | + @Override | ||
41 | + public void onCheckedChanged(CompoundButton compoundButton, boolean b) { | ||
42 | + Api.setSetting(new Setting(true), new Api.Callback() { | ||
43 | + @Override | ||
44 | + public void callbackMethod(Object obj) { | ||
45 | + if(obj == null) { | ||
46 | + Toast.makeText(getApplicationContext(),"연결 상태가 불안정합니다.",Toast.LENGTH_SHORT).show(); | ||
47 | + } | ||
48 | + } | ||
49 | + }); | ||
50 | + } | ||
51 | + }); | ||
52 | + | ||
53 | + Api.getSetting(new Api.Callback() { | ||
54 | + @Override | ||
55 | + public void callbackMethod(Object obj) { | ||
56 | + Setting setting = (Setting) obj; | ||
57 | + if(setting == null) { | ||
58 | + Toast.makeText(getApplicationContext(),"연결 상태가 불안정합니다.",Toast.LENGTH_SHORT).show(); | ||
59 | + return; | ||
60 | + } | ||
61 | + | ||
62 | + swcRecording.setChecked(setting.getRecording()); | ||
63 | + } | ||
64 | + }); | ||
65 | + } | ||
66 | +} |
... | @@ -5,6 +5,7 @@ import androidx.constraintlayout.widget.ConstraintLayout; | ... | @@ -5,6 +5,7 @@ import androidx.constraintlayout.widget.ConstraintLayout; |
5 | 5 | ||
6 | import android.annotation.SuppressLint; | 6 | import android.annotation.SuppressLint; |
7 | import android.content.Intent; | 7 | import android.content.Intent; |
8 | +import android.content.SharedPreferences; | ||
8 | import android.os.Bundle; | 9 | import android.os.Bundle; |
9 | import android.os.Handler; | 10 | import android.os.Handler; |
10 | import android.util.Log; | 11 | import android.util.Log; |
... | @@ -20,6 +21,8 @@ import android.widget.Toast; | ... | @@ -20,6 +21,8 @@ import android.widget.Toast; |
20 | import com.google.android.material.textfield.TextInputEditText; | 21 | import com.google.android.material.textfield.TextInputEditText; |
21 | import com.google.android.material.textfield.TextInputLayout; | 22 | import com.google.android.material.textfield.TextInputLayout; |
22 | import com.sunnni.smartdoorlock.R; | 23 | import com.sunnni.smartdoorlock.R; |
24 | +import com.sunnni.smartdoorlock.api.Api; | ||
25 | +import com.sunnni.smartdoorlock.api.Auth; | ||
23 | 26 | ||
24 | public class SplashActivity extends AppCompatActivity { | 27 | public class SplashActivity extends AppCompatActivity { |
25 | 28 | ||
... | @@ -27,6 +30,7 @@ public class SplashActivity extends AppCompatActivity { | ... | @@ -27,6 +30,7 @@ public class SplashActivity extends AppCompatActivity { |
27 | private TextInputLayout textInputLayout; | 30 | private TextInputLayout textInputLayout; |
28 | private TextInputEditText edtSuperKey; | 31 | private TextInputEditText edtSuperKey; |
29 | private ConstraintLayout btnEnter; | 32 | private ConstraintLayout btnEnter; |
33 | + private ImageView imgEnter; | ||
30 | 34 | ||
31 | private Animation logoAnimation; | 35 | private Animation logoAnimation; |
32 | 36 | ||
... | @@ -38,17 +42,23 @@ public class SplashActivity extends AppCompatActivity { | ... | @@ -38,17 +42,23 @@ public class SplashActivity extends AppCompatActivity { |
38 | super.onCreate(savedInstanceState); | 42 | super.onCreate(savedInstanceState); |
39 | setContentView(R.layout.activity_splash); | 43 | setContentView(R.layout.activity_splash); |
40 | 44 | ||
41 | - logoContainer = findViewById(R.id.ll_logo); | 45 | + SharedPreferences pref = getSharedPreferences("gateway", MODE_PRIVATE); |
42 | - textInputLayout = findViewById(R.id.til_super_key); | 46 | + String accessToken = pref.getString("accessToken", ""); |
43 | - btnEnter = findViewById(R.id.cl_enter); | 47 | + if(!"".equals(accessToken)) { |
44 | - edtSuperKey = findViewById(R.id.edt_super_key); | 48 | + Api.setAccessToken(accessToken); |
45 | - | 49 | + startActivity(new Intent(SplashActivity.this, MainActivity.class)); |
46 | - logoAnimation = AnimationUtils.loadAnimation(this, R.anim.anim_bottom_up); | 50 | + } else { |
47 | - | 51 | + logoContainer = findViewById(R.id.ll_logo); |
48 | - test = findViewById(R.id.img_test); | 52 | + textInputLayout = findViewById(R.id.til_super_key); |
49 | - | 53 | + btnEnter = findViewById(R.id.cl_enter); |
50 | - splashLoading(); | 54 | + edtSuperKey = findViewById(R.id.edt_super_key); |
51 | - init(); | 55 | + imgEnter = findViewById((R.id.img_enter)); |
56 | + | ||
57 | + logoAnimation = AnimationUtils.loadAnimation(this, R.anim.anim_bottom_up); | ||
58 | + | ||
59 | + splashLoading(); | ||
60 | + init(); | ||
61 | + } | ||
52 | } | 62 | } |
53 | 63 | ||
54 | private void splashLoading() { | 64 | private void splashLoading() { |
... | @@ -60,49 +70,41 @@ public class SplashActivity extends AppCompatActivity { | ... | @@ -60,49 +70,41 @@ public class SplashActivity extends AppCompatActivity { |
60 | 70 | ||
61 | textInputLayout.setVisibility(View.VISIBLE); | 71 | textInputLayout.setVisibility(View.VISIBLE); |
62 | btnEnter.setVisibility(View.VISIBLE); | 72 | btnEnter.setVisibility(View.VISIBLE); |
63 | - btnEnter.bringToFront(); | ||
64 | - | ||
65 | - test.setVisibility(View.VISIBLE); | ||
66 | - | ||
67 | - | ||
68 | - test.setOnClickListener(new View.OnClickListener() { | ||
69 | - @Override | ||
70 | - public void onClick(View v) { | ||
71 | - Log.d("스플래시", "테스트 버튼"); | ||
72 | - } | ||
73 | - }); | ||
74 | - | ||
75 | - btnEnter.setOnClickListener(new View.OnClickListener(){ | ||
76 | - @Override | ||
77 | - public void onClick(View v) { | ||
78 | - Log.d("스플래시", "버튼"); | ||
79 | - } | ||
80 | - }); | ||
81 | - | ||
82 | } | 73 | } |
83 | - }, 2000); | 74 | + }, 3000); |
84 | } | 75 | } |
85 | 76 | ||
86 | private void init() { | 77 | private void init() { |
87 | - btnEnter.setOnClickListener(new View.OnClickListener() { | 78 | + imgEnter.setOnClickListener(new View.OnClickListener() { |
88 | @Override | 79 | @Override |
89 | public void onClick(View v) { | 80 | public void onClick(View v) { |
90 | - Log.d("스플래시", "edtSuperKey.toString()"); | 81 | + String text = edtSuperKey.getText().toString(); |
91 | - if(edtSuperKey.toString().isEmpty()){ | 82 | + if("".equals(text)){ |
92 | - Log.d("스플래시", "true"); | 83 | + Toast.makeText(getApplicationContext(),"고유번호를 입력해주세요.",Toast.LENGTH_SHORT).show(); |
93 | } else { | 84 | } else { |
94 | - Intent intent = new Intent(SplashActivity.this, MainActivity.class); | 85 | + Api.auth(text, new Api.Callback() { |
95 | - startActivity(intent); | 86 | + @Override |
96 | - finish(); | 87 | + public void callbackMethod(Object obj) { |
88 | + Auth auth = (Auth) obj; | ||
89 | + if(auth == null) { | ||
90 | + Toast.makeText(getApplicationContext(),"연결 상태가 불안정합니다.",Toast.LENGTH_SHORT).show(); | ||
91 | + return; | ||
92 | + } | ||
93 | + | ||
94 | + if(auth.getIsAvailable()) { | ||
95 | + SharedPreferences pref = getSharedPreferences("gateway", MODE_PRIVATE); | ||
96 | + SharedPreferences.Editor editor = pref.edit(); | ||
97 | + editor.putString("accessToken", auth.getAccessToken()); | ||
98 | + Api.setAccessToken(auth.getAccessToken()); | ||
99 | + editor.commit(); | ||
100 | + startActivity(new Intent(SplashActivity.this, MainActivity.class)); | ||
101 | + } else { | ||
102 | + Toast.makeText(getApplicationContext(),"고유번호를 확인해주세요.",Toast.LENGTH_SHORT).show(); | ||
103 | + } | ||
104 | + } | ||
105 | + }); | ||
97 | } | 106 | } |
98 | } | 107 | } |
99 | }); | 108 | }); |
100 | - | ||
101 | - logoContainer.setOnClickListener(new View.OnClickListener() { | ||
102 | - @Override | ||
103 | - public void onClick(View v) { | ||
104 | - Log.d("스플래시", "edtSuperKey.toString()"); | ||
105 | - } | ||
106 | - }); | ||
107 | } | 109 | } |
108 | } | 110 | } | ... | ... |
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | -<vector xmlns:android="http://schemas.android.com/apk/res/android" | 2 | +<vector |
3 | - android:width="108dp" | ||
4 | android:height="108dp" | 3 | android:height="108dp" |
4 | + android:width="108dp" | ||
5 | + android:viewportHeight="108" | ||
5 | android:viewportWidth="108" | 6 | android:viewportWidth="108" |
6 | - android:viewportHeight="108"> | 7 | + xmlns:android="http://schemas.android.com/apk/res/android"> |
7 | - <path | 8 | + <path android:fillColor="#3DDC84" |
8 | - android:fillColor="#3DDC84" | 9 | + android:pathData="M0,0h108v108h-108z"/> |
9 | - android:pathData="M0,0h108v108h-108z" /> | 10 | + <path android:fillColor="#00000000" android:pathData="M9,0L9,108" |
10 | - <path | 11 | + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
11 | - android:fillColor="#00000000" | 12 | + <path android:fillColor="#00000000" android:pathData="M19,0L19,108" |
12 | - android:pathData="M9,0L9,108" | 13 | + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
13 | - android:strokeWidth="0.8" | 14 | + <path android:fillColor="#00000000" android:pathData="M29,0L29,108" |
14 | - android:strokeColor="#33FFFFFF" /> | 15 | + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
15 | - <path | 16 | + <path android:fillColor="#00000000" android:pathData="M39,0L39,108" |
16 | - android:fillColor="#00000000" | 17 | + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
17 | - android:pathData="M19,0L19,108" | 18 | + <path android:fillColor="#00000000" android:pathData="M49,0L49,108" |
18 | - android:strokeWidth="0.8" | 19 | + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
19 | - android:strokeColor="#33FFFFFF" /> | 20 | + <path android:fillColor="#00000000" android:pathData="M59,0L59,108" |
20 | - <path | 21 | + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
21 | - android:fillColor="#00000000" | 22 | + <path android:fillColor="#00000000" android:pathData="M69,0L69,108" |
22 | - android:pathData="M29,0L29,108" | 23 | + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
23 | - android:strokeWidth="0.8" | 24 | + <path android:fillColor="#00000000" android:pathData="M79,0L79,108" |
24 | - android:strokeColor="#33FFFFFF" /> | 25 | + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
25 | - <path | 26 | + <path android:fillColor="#00000000" android:pathData="M89,0L89,108" |
26 | - android:fillColor="#00000000" | 27 | + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
27 | - android:pathData="M39,0L39,108" | 28 | + <path android:fillColor="#00000000" android:pathData="M99,0L99,108" |
28 | - android:strokeWidth="0.8" | 29 | + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
29 | - android:strokeColor="#33FFFFFF" /> | 30 | + <path android:fillColor="#00000000" android:pathData="M0,9L108,9" |
30 | - <path | 31 | + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
31 | - android:fillColor="#00000000" | 32 | + <path android:fillColor="#00000000" android:pathData="M0,19L108,19" |
32 | - android:pathData="M49,0L49,108" | 33 | + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
33 | - android:strokeWidth="0.8" | 34 | + <path android:fillColor="#00000000" android:pathData="M0,29L108,29" |
34 | - android:strokeColor="#33FFFFFF" /> | 35 | + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
35 | - <path | 36 | + <path android:fillColor="#00000000" android:pathData="M0,39L108,39" |
36 | - android:fillColor="#00000000" | 37 | + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
37 | - android:pathData="M59,0L59,108" | 38 | + <path android:fillColor="#00000000" android:pathData="M0,49L108,49" |
38 | - android:strokeWidth="0.8" | 39 | + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
39 | - android:strokeColor="#33FFFFFF" /> | 40 | + <path android:fillColor="#00000000" android:pathData="M0,59L108,59" |
40 | - <path | 41 | + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
41 | - android:fillColor="#00000000" | 42 | + <path android:fillColor="#00000000" android:pathData="M0,69L108,69" |
42 | - android:pathData="M69,0L69,108" | 43 | + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
43 | - android:strokeWidth="0.8" | 44 | + <path android:fillColor="#00000000" android:pathData="M0,79L108,79" |
44 | - android:strokeColor="#33FFFFFF" /> | 45 | + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
45 | - <path | 46 | + <path android:fillColor="#00000000" android:pathData="M0,89L108,89" |
46 | - android:fillColor="#00000000" | 47 | + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
47 | - android:pathData="M79,0L79,108" | 48 | + <path android:fillColor="#00000000" android:pathData="M0,99L108,99" |
48 | - android:strokeWidth="0.8" | 49 | + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
49 | - android:strokeColor="#33FFFFFF" /> | 50 | + <path android:fillColor="#00000000" android:pathData="M19,29L89,29" |
50 | - <path | 51 | + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
51 | - android:fillColor="#00000000" | 52 | + <path android:fillColor="#00000000" android:pathData="M19,39L89,39" |
52 | - android:pathData="M89,0L89,108" | 53 | + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
53 | - android:strokeWidth="0.8" | 54 | + <path android:fillColor="#00000000" android:pathData="M19,49L89,49" |
54 | - android:strokeColor="#33FFFFFF" /> | 55 | + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
55 | - <path | 56 | + <path android:fillColor="#00000000" android:pathData="M19,59L89,59" |
56 | - android:fillColor="#00000000" | 57 | + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
57 | - android:pathData="M99,0L99,108" | 58 | + <path android:fillColor="#00000000" android:pathData="M19,69L89,69" |
58 | - android:strokeWidth="0.8" | 59 | + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
59 | - android:strokeColor="#33FFFFFF" /> | 60 | + <path android:fillColor="#00000000" android:pathData="M19,79L89,79" |
60 | - <path | 61 | + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
61 | - android:fillColor="#00000000" | 62 | + <path android:fillColor="#00000000" android:pathData="M29,19L29,89" |
62 | - android:pathData="M0,9L108,9" | 63 | + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
63 | - android:strokeWidth="0.8" | 64 | + <path android:fillColor="#00000000" android:pathData="M39,19L39,89" |
64 | - android:strokeColor="#33FFFFFF" /> | 65 | + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
65 | - <path | 66 | + <path android:fillColor="#00000000" android:pathData="M49,19L49,89" |
66 | - android:fillColor="#00000000" | 67 | + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
67 | - android:pathData="M0,19L108,19" | 68 | + <path android:fillColor="#00000000" android:pathData="M59,19L59,89" |
68 | - android:strokeWidth="0.8" | 69 | + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
69 | - android:strokeColor="#33FFFFFF" /> | 70 | + <path android:fillColor="#00000000" android:pathData="M69,19L69,89" |
70 | - <path | 71 | + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
71 | - android:fillColor="#00000000" | 72 | + <path android:fillColor="#00000000" android:pathData="M79,19L79,89" |
72 | - android:pathData="M0,29L108,29" | 73 | + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
73 | - android:strokeWidth="0.8" | ||
74 | - android:strokeColor="#33FFFFFF" /> | ||
75 | - <path | ||
76 | - android:fillColor="#00000000" | ||
77 | - android:pathData="M0,39L108,39" | ||
78 | - android:strokeWidth="0.8" | ||
79 | - android:strokeColor="#33FFFFFF" /> | ||
80 | - <path | ||
81 | - android:fillColor="#00000000" | ||
82 | - android:pathData="M0,49L108,49" | ||
83 | - android:strokeWidth="0.8" | ||
84 | - android:strokeColor="#33FFFFFF" /> | ||
85 | - <path | ||
86 | - android:fillColor="#00000000" | ||
87 | - android:pathData="M0,59L108,59" | ||
88 | - android:strokeWidth="0.8" | ||
89 | - android:strokeColor="#33FFFFFF" /> | ||
90 | - <path | ||
91 | - android:fillColor="#00000000" | ||
92 | - android:pathData="M0,69L108,69" | ||
93 | - android:strokeWidth="0.8" | ||
94 | - android:strokeColor="#33FFFFFF" /> | ||
95 | - <path | ||
96 | - android:fillColor="#00000000" | ||
97 | - android:pathData="M0,79L108,79" | ||
98 | - android:strokeWidth="0.8" | ||
99 | - android:strokeColor="#33FFFFFF" /> | ||
100 | - <path | ||
101 | - android:fillColor="#00000000" | ||
102 | - android:pathData="M0,89L108,89" | ||
103 | - android:strokeWidth="0.8" | ||
104 | - android:strokeColor="#33FFFFFF" /> | ||
105 | - <path | ||
106 | - android:fillColor="#00000000" | ||
107 | - android:pathData="M0,99L108,99" | ||
108 | - android:strokeWidth="0.8" | ||
109 | - android:strokeColor="#33FFFFFF" /> | ||
110 | - <path | ||
111 | - android:fillColor="#00000000" | ||
112 | - android:pathData="M19,29L89,29" | ||
113 | - android:strokeWidth="0.8" | ||
114 | - android:strokeColor="#33FFFFFF" /> | ||
115 | - <path | ||
116 | - android:fillColor="#00000000" | ||
117 | - android:pathData="M19,39L89,39" | ||
118 | - android:strokeWidth="0.8" | ||
119 | - android:strokeColor="#33FFFFFF" /> | ||
120 | - <path | ||
121 | - android:fillColor="#00000000" | ||
122 | - android:pathData="M19,49L89,49" | ||
123 | - android:strokeWidth="0.8" | ||
124 | - android:strokeColor="#33FFFFFF" /> | ||
125 | - <path | ||
126 | - android:fillColor="#00000000" | ||
127 | - android:pathData="M19,59L89,59" | ||
128 | - android:strokeWidth="0.8" | ||
129 | - android:strokeColor="#33FFFFFF" /> | ||
130 | - <path | ||
131 | - android:fillColor="#00000000" | ||
132 | - android:pathData="M19,69L89,69" | ||
133 | - android:strokeWidth="0.8" | ||
134 | - android:strokeColor="#33FFFFFF" /> | ||
135 | - <path | ||
136 | - android:fillColor="#00000000" | ||
137 | - android:pathData="M19,79L89,79" | ||
138 | - android:strokeWidth="0.8" | ||
139 | - android:strokeColor="#33FFFFFF" /> | ||
140 | - <path | ||
141 | - android:fillColor="#00000000" | ||
142 | - android:pathData="M29,19L29,89" | ||
143 | - android:strokeWidth="0.8" | ||
144 | - android:strokeColor="#33FFFFFF" /> | ||
145 | - <path | ||
146 | - android:fillColor="#00000000" | ||
147 | - android:pathData="M39,19L39,89" | ||
148 | - android:strokeWidth="0.8" | ||
149 | - android:strokeColor="#33FFFFFF" /> | ||
150 | - <path | ||
151 | - android:fillColor="#00000000" | ||
152 | - android:pathData="M49,19L49,89" | ||
153 | - android:strokeWidth="0.8" | ||
154 | - android:strokeColor="#33FFFFFF" /> | ||
155 | - <path | ||
156 | - android:fillColor="#00000000" | ||
157 | - android:pathData="M59,19L59,89" | ||
158 | - android:strokeWidth="0.8" | ||
159 | - android:strokeColor="#33FFFFFF" /> | ||
160 | - <path | ||
161 | - android:fillColor="#00000000" | ||
162 | - android:pathData="M69,19L69,89" | ||
163 | - android:strokeWidth="0.8" | ||
164 | - android:strokeColor="#33FFFFFF" /> | ||
165 | - <path | ||
166 | - android:fillColor="#00000000" | ||
167 | - android:pathData="M79,19L79,89" | ||
168 | - android:strokeWidth="0.8" | ||
169 | - android:strokeColor="#33FFFFFF" /> | ||
170 | </vector> | 74 | </vector> | ... | ... |
... | @@ -313,4 +313,12 @@ | ... | @@ -313,4 +313,12 @@ |
313 | 313 | ||
314 | </androidx.constraintlayout.widget.ConstraintLayout> | 314 | </androidx.constraintlayout.widget.ConstraintLayout> |
315 | 315 | ||
316 | + <Button | ||
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 | + | ||
316 | </androidx.constraintlayout.widget.ConstraintLayout> | 324 | </androidx.constraintlayout.widget.ConstraintLayout> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
app/src/main/res/layout/activity_setting.xml
0 → 100644
1 | +<?xml version="1.0" encoding="utf-8"?> | ||
2 | +<androidx.constraintlayout.widget.ConstraintLayout 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" | ||
6 | + android:layout_height="match_parent"> | ||
7 | + | ||
8 | + <Button | ||
9 | + android:id="@+id/btn_logout" | ||
10 | + android:layout_width="wrap_content" | ||
11 | + android:layout_height="wrap_content" | ||
12 | + android:layout_marginStart="22dp" | ||
13 | + android:layout_marginTop="9dp" | ||
14 | + android:text="btn_logout" | ||
15 | + app:layout_constraintStart_toStartOf="@+id/swc_recording" | ||
16 | + app:layout_constraintTop_toBottomOf="@+id/swc_recording" /> | ||
17 | + | ||
18 | + <Switch | ||
19 | + android:id="@+id/swc_recording" | ||
20 | + android:layout_width="wrap_content" | ||
21 | + android:layout_height="wrap_content" | ||
22 | + android:layout_marginEnd="117dp" | ||
23 | + android:layout_marginTop="151dp" | ||
24 | + android:text="swc_recording" | ||
25 | + app:layout_constraintEnd_toEndOf="parent" | ||
26 | + app:layout_constraintTop_toTopOf="parent" /> | ||
27 | +</androidx.constraintlayout.widget.ConstraintLayout> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
... | @@ -94,6 +94,7 @@ | ... | @@ -94,6 +94,7 @@ |
94 | app:layout_constraintTop_toTopOf="parent" /> | 94 | app:layout_constraintTop_toTopOf="parent" /> |
95 | 95 | ||
96 | <ImageView | 96 | <ImageView |
97 | + android:id="@+id/img_enter" | ||
97 | android:layout_width="wrap_content" | 98 | android:layout_width="wrap_content" |
98 | android:layout_height="wrap_content" | 99 | android:layout_height="wrap_content" |
99 | android:src="@drawable/baseline_send_white_24" | 100 | android:src="@drawable/baseline_send_white_24" | ... | ... |
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> | 2 | <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> |
3 | - <background android:drawable="@drawable/ic_launcher_background" /> | 3 | + <background android:drawable="@drawable/ic_launcher_background"/> |
4 | - <foreground android:drawable="@drawable/ic_launcher_foreground" /> | 4 | + <foreground android:drawable="@mipmap/ic_launcher_foreground"/> |
5 | </adaptive-icon> | 5 | </adaptive-icon> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> | 2 | <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> |
3 | - <background android:drawable="@drawable/ic_launcher_background" /> | 3 | + <background android:drawable="@drawable/ic_launcher_background"/> |
4 | - <foreground android:drawable="@drawable/ic_launcher_foreground" /> | 4 | + <foreground android:drawable="@mipmap/ic_launcher_foreground"/> |
5 | </adaptive-icon> | 5 | </adaptive-icon> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
2.77 KB
1.77 KB
3.96 KB
6.35 KB
9.14 KB
... | @@ -8,7 +8,7 @@ buildscript { | ... | @@ -8,7 +8,7 @@ buildscript { |
8 | 8 | ||
9 | } | 9 | } |
10 | dependencies { | 10 | dependencies { |
11 | - classpath 'com.android.tools.build:gradle:3.6.1' | 11 | + classpath 'com.android.tools.build:gradle:3.6.3' |
12 | 12 | ||
13 | 13 | ||
14 | // NOTE: Do not place your application dependencies here; they belong | 14 | // NOTE: Do not place your application dependencies here; they belong | ... | ... |
-
Please register or login to post a comment