박지환

Design android app

1 <?xml version="1.0" encoding="UTF-8"?> 1 <?xml version="1.0" encoding="UTF-8"?>
2 <project version="4"> 2 <project version="4">
3 + <component name="GradleMigrationSettings" migrationVersion="1" />
3 <component name="GradleSettings"> 4 <component name="GradleSettings">
4 <option name="linkedExternalProjectsSettings"> 5 <option name="linkedExternalProjectsSettings">
5 <GradleProjectSettings> 6 <GradleProjectSettings>
......
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
3 <component name="DesignSurface"> 3 <component name="DesignSurface">
4 <option name="filePathToZoomLevelMap"> 4 <option name="filePathToZoomLevelMap">
5 <map> 5 <map>
6 - <entry key="..\:/Workspaces/teamPARK/holiday-counter-recommend-activity/android/app/src/main/res/layout/activity_main.xml" value="0.38697916666666665" /> 6 + <entry key="..\:/Workspaces/teamPARK/holiday-counter-recommend-activity/android/app/src/main/res/drawable/circle.xml" value="0.2925" />
7 + <entry key="..\:/Workspaces/teamPARK/holiday-counter-recommend-activity/android/app/src/main/res/layout/activity_main.xml" value="3.0" />
8 + <entry key="..\:/Workspaces/teamPARK/holiday-counter-recommend-activity/android/app/src/main/res/layout/circle.xml" value="0.34782608695652173" />
7 </map> 9 </map>
8 </option> 10 </option>
9 </component> 11 </component>
......
1 package com.example.holidaycounter; 1 package com.example.holidaycounter;
2 2
3 +import androidx.appcompat.app.ActionBar;
3 import androidx.appcompat.app.AppCompatActivity; 4 import androidx.appcompat.app.AppCompatActivity;
4 5
6 +import android.app.Activity;
7 +import android.graphics.Point;
5 import android.os.Bundle; 8 import android.os.Bundle;
6 import android.os.Handler; 9 import android.os.Handler;
7 import android.os.Message; 10 import android.os.Message;
11 +import android.view.Display;
8 import android.widget.TextView; 12 import android.widget.TextView;
9 13
10 import org.jsoup.Jsoup; 14 import org.jsoup.Jsoup;
...@@ -18,10 +22,31 @@ public class MainActivity extends AppCompatActivity { ...@@ -18,10 +22,31 @@ public class MainActivity extends AppCompatActivity {
18 TextView dateName; 22 TextView dateName;
19 TextView locDate; 23 TextView locDate;
20 TextView leftDate; 24 TextView leftDate;
21 - String url = "http://52.200.90.192:8080/app"; 25 + TextView title;
26 + String url = "http://www.holiday-counter.tk:8080/app";
22 String msg; 27 String msg;
23 final Bundle bundle = new Bundle(); 28 final Bundle bundle = new Bundle();
24 29
30 + int standardSize_X, standardSize_Y;
31 + float density;
32 +
33 + public void getStandardSize() {
34 + Point ScreenSize = getScreenSize(this);
35 + density = getResources().getDisplayMetrics().density;
36 +
37 + standardSize_X = (int) (ScreenSize.x / density);
38 + standardSize_Y = (int) (ScreenSize.y / density);
39 + }
40 +
41 + public Point getScreenSize(Activity activity) {
42 + Display display = activity.getWindowManager().getDefaultDisplay();
43 + Point size = new Point();
44 + display.getSize(size);
45 +
46 + return size;
47 + }
48 +
49 +
25 50
26 Handler handler = new Handler() { 51 Handler handler = new Handler() {
27 @Override 52 @Override
...@@ -30,7 +55,7 @@ public class MainActivity extends AppCompatActivity { ...@@ -30,7 +55,7 @@ public class MainActivity extends AppCompatActivity {
30 String[] data = bundle.getString("message").split(","); 55 String[] data = bundle.getString("message").split(",");
31 todayDate.setText(data[0]); 56 todayDate.setText(data[0]);
32 dateName.setText(data[1]); 57 dateName.setText(data[1]);
33 - locDate.setText(Integer.parseInt(data[2].substring(4, 6)) + "월 " + Integer.parseInt(data[2].substring(6)) + "일"); 58 + locDate.setText(data[2].substring(0, 4) + "년 " + data[2].substring(4, 6) + "월 " + data[2].substring(6) + "일");
34 leftDate.setText("D-" + data[3]); 59 leftDate.setText("D-" + data[3]);
35 } 60 }
36 }; 61 };
...@@ -40,11 +65,14 @@ public class MainActivity extends AppCompatActivity { ...@@ -40,11 +65,14 @@ public class MainActivity extends AppCompatActivity {
40 65
41 super.onCreate(savedInstanceState); 66 super.onCreate(savedInstanceState);
42 setContentView(R.layout.activity_main); 67 setContentView(R.layout.activity_main);
43 - 68 + ActionBar actionBar = getSupportActionBar();
69 + actionBar.hide();
44 todayDate = findViewById(R.id.todayDate); 70 todayDate = findViewById(R.id.todayDate);
45 dateName = findViewById(R.id.dateName); 71 dateName = findViewById(R.id.dateName);
46 locDate = findViewById(R.id.locDate); 72 locDate = findViewById(R.id.locDate);
47 leftDate = findViewById(R.id.leftDate); 73 leftDate = findViewById(R.id.leftDate);
74 + title = findViewById(R.id.title);
75 +
48 new Thread() { 76 new Thread() {
49 public void run() { 77 public void run() {
50 Document doc = null; 78 Document doc = null;
......
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<shape xmlns:android="http://schemas.android.com/apk/res/android"
3 + android:shape="ring"
4 + android:innerRadius="200dp"
5 + android:thickness="10dp"
6 + android:useLevel="false">
7 +
8 + <size android:width="430dp"
9 + android:height="430dp" />
10 +
11 + <solid android:color="@color/circle" />
12 +
13 +</shape>
...\ No newline at end of file ...\ No newline at end of file
No preview for this file type
...@@ -4,45 +4,66 @@ ...@@ -4,45 +4,66 @@
4 xmlns:tools="http://schemas.android.com/tools" 4 xmlns:tools="http://schemas.android.com/tools"
5 android:layout_width="match_parent" 5 android:layout_width="match_parent"
6 android:layout_height="match_parent" 6 android:layout_height="match_parent"
7 + android:background="@color/background"
7 tools:context=".MainActivity"> 8 tools:context=".MainActivity">
8 9
10 + <ImageView
11 + android:id="@+id/imageView2"
12 + android:layout_width="534dp"
13 + android:layout_height="536dp"
14 + app:layout_constraintBottom_toBottomOf="parent"
15 + app:layout_constraintEnd_toEndOf="parent"
16 + app:layout_constraintStart_toStartOf="parent"
17 + app:layout_constraintTop_toTopOf="parent"
18 + app:srcCompat="@drawable/circle" />
19 +
9 <TextView 20 <TextView
10 android:id="@+id/leftDate" 21 android:id="@+id/leftDate"
11 - android:layout_width="380dp" 22 + android:layout_width="417dp"
12 - android:layout_height="217dp" 23 + android:layout_height="104dp"
24 + android:layout_marginTop="8dp"
25 + android:fontFamily="@font/gowundodum"
26 + android:letterSpacing="0.2"
13 android:text="D-0" 27 android:text="D-0"
14 android:textAlignment="center" 28 android:textAlignment="center"
15 - android:textSize="200sp" 29 + android:textColor="@color/tomato"
16 - app:layout_constraintBottom_toBottomOf="parent" 30 + android:textSize="90sp"
17 - app:layout_constraintHorizontal_bias="0.466" 31 + android:textStyle="bold"
18 - app:layout_constraintLeft_toLeftOf="parent" 32 + app:layout_constraintEnd_toEndOf="parent"
19 - app:layout_constraintRight_toRightOf="parent" 33 + app:layout_constraintStart_toStartOf="parent"
20 - app:layout_constraintTop_toTopOf="parent" 34 + app:layout_constraintTop_toBottomOf="@+id/dateName" />
21 - app:layout_constraintVertical_bias="0.278" />
22 35
23 <TextView 36 <TextView
24 android:id="@+id/dateName" 37 android:id="@+id/dateName"
25 - android:layout_width="364dp" 38 + android:layout_width="380dp"
26 - android:layout_height="42dp" 39 + android:layout_height="66dp"
27 - android:layout_marginTop="4dp" 40 + android:fontFamily="@font/gowundodum"
28 android:text="NONE" 41 android:text="NONE"
29 android:textAlignment="center" 42 android:textAlignment="center"
30 - android:textSize="32sp" 43 + android:textColor="@color/tomato"
44 + android:textSize="50sp"
45 + android:textStyle="bold"
46 + app:layout_constraintBottom_toBottomOf="parent"
31 app:layout_constraintEnd_toEndOf="parent" 47 app:layout_constraintEnd_toEndOf="parent"
32 - app:layout_constraintHorizontal_bias="0.498"
33 app:layout_constraintStart_toStartOf="parent" 48 app:layout_constraintStart_toStartOf="parent"
34 - app:layout_constraintTop_toBottomOf="@+id/leftDate" /> 49 + app:layout_constraintTop_toTopOf="parent"
50 + app:layout_constraintVertical_bias="0.464" />
35 51
36 <TextView 52 <TextView
37 android:id="@+id/locDate" 53 android:id="@+id/locDate"
38 - android:layout_width="210dp" 54 + android:layout_width="370dp"
39 - android:layout_height="28dp" 55 + android:layout_height="42dp"
40 - android:text="0월 0일" 56 + android:layout_marginTop="20dp"
57 + android:fontFamily="@font/gowundodum"
58 + android:letterSpacing="0.2"
59 + android:text="0000년 00월 00일"
41 android:textAlignment="center" 60 android:textAlignment="center"
42 - android:textSize="18sp" 61 + android:textColor="@color/white"
62 + android:textSize="22sp"
43 app:layout_constraintEnd_toEndOf="parent" 63 app:layout_constraintEnd_toEndOf="parent"
64 + app:layout_constraintHorizontal_bias="0.487"
44 app:layout_constraintStart_toStartOf="parent" 65 app:layout_constraintStart_toStartOf="parent"
45 - app:layout_constraintTop_toBottomOf="@+id/dateName" /> 66 + app:layout_constraintTop_toBottomOf="@+id/leftDate" />
46 67
47 <TextView 68 <TextView
48 android:id="@+id/todayDate" 69 android:id="@+id/todayDate"
...@@ -51,7 +72,44 @@ ...@@ -51,7 +72,44 @@
51 android:layout_marginEnd="2dp" 72 android:layout_marginEnd="2dp"
52 android:text="0000-00-00" 73 android:text="0000-00-00"
53 android:textAlignment="viewEnd" 74 android:textAlignment="viewEnd"
75 + android:textColor="@color/white"
54 app:layout_constraintBottom_toBottomOf="parent" 76 app:layout_constraintBottom_toBottomOf="parent"
55 app:layout_constraintEnd_toEndOf="parent" /> 77 app:layout_constraintEnd_toEndOf="parent" />
56 78
79 + <TextView
80 + android:id="@+id/title"
81 + android:layout_width="515dp"
82 + android:layout_height="115dp"
83 + android:layout_marginTop="48dp"
84 + android:fontFamily="@font/tirodevanagarimarathi"
85 + android:shadowColor="#8B5D8B"
86 + android:shadowDx="4.0"
87 + android:shadowDy="4.0"
88 + android:shadowRadius="2.0"
89 + android:text="When is Next Holiday?"
90 + android:textAlignment="center"
91 + android:textColor="@color/title"
92 + android:textSize="50sp"
93 + android:textStyle="bold"
94 + app:layout_constraintEnd_toEndOf="parent"
95 + app:layout_constraintHorizontal_bias="0.509"
96 + app:layout_constraintStart_toStartOf="parent"
97 + app:layout_constraintTop_toTopOf="parent" />
98 +
99 + <TextView
100 + android:id="@+id/textView"
101 + android:layout_width="424dp"
102 + android:layout_height="47dp"
103 + android:layout_marginBottom="36dp"
104 + android:fontFamily="@font/gowundodum"
105 + android:letterSpacing="0.1"
106 + android:text="오늘로부터 가장 가까운 휴일은"
107 + android:textAlignment="center"
108 + android:textColor="@color/white"
109 + android:textSize="22sp"
110 + app:layout_constraintBottom_toTopOf="@+id/dateName"
111 + app:layout_constraintEnd_toEndOf="parent"
112 + app:layout_constraintHorizontal_bias="0.538"
113 + app:layout_constraintStart_toStartOf="parent" />
114 +
57 </androidx.constraintlayout.widget.ConstraintLayout> 115 </androidx.constraintlayout.widget.ConstraintLayout>
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -6,5 +6,9 @@ ...@@ -6,5 +6,9 @@
6 <color name="teal_200">#FF03DAC5</color> 6 <color name="teal_200">#FF03DAC5</color>
7 <color name="teal_700">#FF018786</color> 7 <color name="teal_700">#FF018786</color>
8 <color name="black">#FF000000</color> 8 <color name="black">#FF000000</color>
9 - <color name="white">#FFFFFFFF</color> 9 + <color name="white">#FFFFFFFF</color>>
10 + <color name="tomato">#FF6347</color>
11 + <color name="background">#4e4c4c</color>
12 + <color name="title">#bfb9d3</color>
13 + <color name="circle">#a397c6</color>
10 </resources> 14 </resources>
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -36,7 +36,7 @@ function getTodayDate() { ...@@ -36,7 +36,7 @@ function getTodayDate() {
36 var month = ("0" + (today.getMonth() + 1)).slice(-2); 36 var month = ("0" + (today.getMonth() + 1)).slice(-2);
37 var day = ("0" + today.getDate()).slice(-2); 37 var day = ("0" + today.getDate()).slice(-2);
38 var dateString = year + "-" + month + "-" + day; 38 var dateString = year + "-" + month + "-" + day;
39 - //return "2022-06-02"; // 테스트용 날짜를 입력하세요. *** 테스트가 끝나면 주석처리하고 커밋해주세요. *** ex) 2022-09-12, 2022-09-15, 2022-10-04 39 + // return "2022-06-02"; // 테스트용 날짜를 입력하세요. *** 테스트가 끝나면 주석처리하고 커밋해주세요. *** ex) 2022-09-12, 2022-09-15, 2022-10-04
40 return dateString; 40 return dateString;
41 } 41 }
42 42
......