박지환

Design android app

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