2017103976

android code

Showing 110 changed files with 1217 additions and 0 deletions
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3 + package="com.example.test">
4 +
5 + <uses-permission android:name="android.permission.INTERNET" />
6 + <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
7 + <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
8 + <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
9 +
10 + <application
11 + android:allowBackup="true"
12 + android:icon="@mipmap/ic_clothes"
13 + android:label="@string/app_name"
14 + android:roundIcon="@mipmap/ic_clothes_round"
15 + android:supportsRtl="true"
16 + android:theme="@style/Theme.Test"
17 + android:usesCleartextTraffic="true">
18 + <activity android:name=".ClothesActivity"></activity>
19 + <activity android:name=".WeatherActivity" />
20 + <activity android:name=".MainActivity"/>
21 + <activity android:name=".SplashActivity">
22 + <intent-filter>
23 + <action android:name="android.intent.action.MAIN" />
24 + <category android:name="android.intent.category.LAUNCHER" />
25 + </intent-filter>
26 + </activity>
27 + </application>
28 +
29 +</manifest>
...\ No newline at end of file ...\ No newline at end of file
1 +package com.example.test;
2 +
3 +import android.content.Context;
4 +import android.graphics.drawable.Drawable;
5 +import android.view.LayoutInflater;
6 +import android.view.View;
7 +import android.view.ViewGroup;
8 +import android.widget.BaseAdapter;
9 +import android.widget.ImageView;
10 +import android.widget.TextView;
11 +
12 +import java.util.ArrayList;
13 +
14 +public class CheckListAdapter extends BaseAdapter {
15 + // Adapter에 추가된 데이터를 저장하기 위한 ArrayList
16 + private ArrayList<CheckListItem> CheckListItemList = new ArrayList<CheckListItem>();
17 +
18 + // ListViewAdapter의 생성자
19 + public CheckListAdapter() {
20 +
21 + }
22 +
23 + // Adapter에 사용되는 데이터의 개수를 리턴.
24 + @Override
25 + public int getCount() {
26 + return CheckListItemList.size();
27 + }
28 +
29 + // position에 위치한 데이터를 화면에 출력하는데 사용될 View를 리턴.
30 + @Override
31 + public View getView(int position, View convertView, ViewGroup parent) {
32 + final int pos = position;
33 + final Context context = parent.getContext();
34 +
35 + // "listview_check" Layout을 inflate하여 convertView 참조 획득.
36 + if (convertView == null) {
37 + LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
38 + convertView = inflater.inflate(R.layout.listview_check, parent, false);
39 + }
40 +
41 + // 화면에 표시될 View(Layout이 inflate된)으로부터 위젯에 대한 참조 획득
42 + ImageView icon = (ImageView) convertView.findViewById(R.id.check_icon);
43 + TextView checklist = (TextView) convertView.findViewById(R.id.input_checklist);
44 +
45 + // Data Set(listViewItemList)에서 position에 위치한 데이터 참조 획득
46 + CheckListItem checklistItem = CheckListItemList.get(position);
47 +
48 + // 아이템 내 각 위젯에 데이터 반영
49 + icon.setImageDrawable(checklistItem.getIcon());
50 + checklist.setText(checklistItem.getCheckList());
51 +
52 + return convertView;
53 + }
54 +
55 + // 지정한 위치(position)에 있는 데이터와 관계된 아이템(row)의 ID를 리턴.
56 + @Override
57 + public long getItemId(int position) {
58 + return position;
59 + }
60 +
61 + // 지정한 위치(position)에 있는 데이터 리턴
62 + @Override
63 + public Object getItem(int position) {
64 + return CheckListItemList.get(position) ;
65 + }
66 +
67 + // 아이템 데이터 추가를 위한 함수
68 + public void addItem(Drawable icon, String temp) {
69 + CheckListItem item = new CheckListItem();
70 +
71 + item.setIcon(icon);
72 + item.setCheckList(temp);
73 +
74 + CheckListItemList.add(item);
75 + }
76 +}
...\ No newline at end of file ...\ No newline at end of file
1 +package com.example.test;
2 +
3 +import android.graphics.drawable.Drawable;
4 +
5 +public class CheckListItem {
6 + private Drawable check;
7 + private String list;
8 +
9 + public void setIcon(Drawable icon) {
10 + check = icon ;
11 + }
12 +
13 + public void setCheckList(String checklist) {
14 + list = checklist ;
15 + }
16 +
17 + public Drawable getIcon() {
18 + return this.check ;
19 + }
20 +
21 + public String getCheckList() {
22 + return this.list ;
23 + }
24 +
25 +}
1 +package com.example.test;
2 +
3 +import android.os.StrictMode;
4 +
5 +import java.util.ArrayList;
6 +
7 +public class ClothesRecommend extends Thread {
8 +
9 + ClothesActivity cContext;
10 + WeatherActivity wContext;
11 + WeatherForCast mWeather;
12 +
13 + public ClothesRecommend(ClothesActivity mContext) {
14 + this.cContext = cContext;
15 + }
16 +
17 + public int Cal_Perceived(String Temper, String Velo) {
18 +
19 + int perceived;
20 + double temper = Double.parseDouble(Temper);
21 + double velo = Double.parseDouble(Velo);
22 + perceived = (int) (13.12 + 0.6215 * temper - 11.37 * Math.pow(velo, 0.16) + 0.3965 * Math.pow(velo, 0.16) * temper);
23 +
24 + return perceived;
25 + }
26 +
27 + // 체감온도에 따른 옷추천 (Recommend는 [체감온도, 성별]으로 이루어진 배열)
28 + public ArrayList<ArrayList<String>> Recommend(ArrayList<Integer> Recommend){
29 + int perceived = Recommend.get(0);
30 + int gender = Recommend.get(1);
31 +
32 + ArrayList<String> code = new ArrayList<String>();
33 + ArrayList<String> top = new ArrayList<String>();
34 + ArrayList<String> bottom = new ArrayList<String>();
35 + ArrayList<ArrayList<String>> clothes = new ArrayList<ArrayList<String>>();
36 +
37 + if (perceived >= 28){
38 + top.add("민소매");
39 + top.add("반팔");
40 + bottom.add("반바지");
41 + if (gender == 1){
42 + bottom.add("치마");
43 + top.add("원피스");
44 + code.add("11");
45 + } else { code.add("10"); }
46 + } else if (perceived >= 23) {
47 + top.add("반팔");
48 + top.add("얇은 셔츠");
49 + top.add("긴팔");
50 + bottom.add("반바지");
51 + bottom.add("면바지");
52 + if (gender == 1){
53 + bottom.add("치마");
54 + code.add("21");
55 + } else { code.add("20"); }
56 + } else if (perceived >= 20) {
57 + top.add("긴팔");
58 + top.add("가디건");
59 + bottom.add("면바지");
60 + bottom.add("슬랙스");
61 + bottom.add("스키니");
62 + code.add("30");
63 + } else if (perceived >= 17) {
64 + top.add("가디건");
65 + top.add("후드티");
66 + top.add("맨투맨");
67 + bottom.add("청바지");
68 + bottom.add("면바지");
69 + code.add("40");
70 + } else if (perceived >= 12) {
71 + top.add("후드티");
72 + top.add("셔츠");
73 + top.add("가디건");
74 + bottom.add("긴바지");
75 + bottom.add("청바지");
76 + if (gender == 1){
77 + bottom.add("살색스타킹");
78 + code.add("51");
79 + } else { code.add("50"); }
80 + } else if (perceived >= 10) {
81 + top.add("자켓");
82 + top.add("니트");
83 + top.add("트렌치코트");
84 + bottom.add("긴바지");
85 + if (gender == 1){
86 + bottom.add("검정스타킹");
87 + code.add("61");
88 + } else { code.add("60"); }
89 + } else if (perceived >= 4) {
90 + top.add("코트");
91 + top.add("자켓");
92 + top.add("히트텍");
93 + bottom.add("긴바지");
94 + if (gender == 1){
95 + bottom.add("레깅스");
96 + code.add("71");
97 + } else { code.add("70"); }
98 + } else {
99 + top.add("패딩");
100 + top.add("두꺼운 코트");
101 + bottom.add("긴바지");
102 + if (gender == 1) {
103 + bottom.add("레깅스");
104 + code.add("81");
105 + } else { code.add("80"); }
106 + }
107 +
108 + clothes.add(code);
109 + clothes.add(top);
110 + clothes.add(bottom);
111 +
112 + // Return [[이미지 코드], [상의], [하의]]
113 + return clothes;
114 + }
115 +
116 + public ArrayList<ArrayList<String>> AccessWeather(String code){
117 + ArrayList<ArrayList<String>> gData = new ArrayList<ArrayList<String>>();
118 + mWeather = new WeatherForCast(code, (WeatherActivity) wContext);
119 + gData = mWeather.GetOpenWeather(code);
120 +
121 + return gData;
122 + }
123 +
124 + @Override
125 + public void run() {
126 + super.run();
127 + if (android.os.Build.VERSION.SDK_INT > 9) {
128 + StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
129 + StrictMode.setThreadPolicy(policy);
130 + }
131 + }
132 +}
This diff is collapsed. Click to expand it.
1 +package com.example.test;
2 +
3 +import android.content.Context;
4 +import android.graphics.drawable.Drawable;
5 +import android.view.LayoutInflater;
6 +import android.view.View;
7 +import android.view.ViewGroup;
8 +import android.widget.BaseAdapter;
9 +import android.widget.ImageView;
10 +import android.widget.TextView;
11 +
12 +import java.util.ArrayList;
13 +
14 +public class ListViewAdapter extends BaseAdapter {
15 + // Adapter에 추가된 데이터를 저장하기 위한 ArrayList
16 + private ArrayList<ListViewItem> listViewItemList = new ArrayList<ListViewItem>();
17 +
18 + // ListViewAdapter의 생성자
19 + public ListViewAdapter() {
20 +
21 + }
22 +
23 + // Adapter에 사용되는 데이터의 개수를 리턴.
24 + @Override
25 + public int getCount() {
26 + return listViewItemList.size();
27 + }
28 +
29 + // position에 위치한 데이터를 화면에 출력하는데 사용될 View를 리턴.
30 + @Override
31 + public View getView(int position, View convertView, ViewGroup parent) {
32 + final int pos = position;
33 + final Context context = parent.getContext();
34 +
35 + // "listview_item" Layout을 inflate하여 convertView 참조 획득.
36 + if (convertView == null) {
37 + LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
38 + convertView = inflater.inflate(R.layout.listview_item, parent, false);
39 + }
40 +
41 + // 화면에 표시될 View(Layout이 inflate된)으로부터 위젯에 대한 참조 획득
42 + TextView time = (TextView) convertView.findViewById(R.id.input_time);
43 + ImageView weather = (ImageView) convertView.findViewById(R.id.input_weather);
44 + TextView temperature = (TextView) convertView.findViewById(R.id.input_temperature);
45 + TextView wind = (TextView) convertView.findViewById(R.id.input_wind);
46 + TextView pop = (TextView) convertView.findViewById(R.id.input_precipitation);
47 +
48 + // Data Set(listViewItemList)에서 position에 위치한 데이터 참조 획득
49 + ListViewItem listViewItem = listViewItemList.get(position);
50 +
51 + // 아이템 내 각 위젯에 데이터 반영
52 + time.setText(listViewItem.getTime());
53 + weather.setImageDrawable(listViewItem.getWeather());
54 + temperature.setText(listViewItem.getTemperature());
55 + wind.setText(listViewItem.getWind());
56 + pop.setText(listViewItem.getPrecipitation());
57 +
58 + return convertView;
59 + }
60 +
61 + // 지정한 위치(position)에 있는 데이터와 관계된 아이템(row)의 ID를 리턴.
62 + @Override
63 + public long getItemId(int position) {
64 + return position;
65 + }
66 +
67 + // 지정한 위치(position)에 있는 데이터 리턴
68 + @Override
69 + public Object getItem(int position) {
70 + return listViewItemList.get(position) ;
71 + }
72 +
73 + // 아이템 데이터 추가를 위한 함수
74 + public void addItem(String time, Drawable weather, String temp, String wind, String pop) {
75 + ListViewItem item = new ListViewItem();
76 +
77 + item.setTime(time);
78 + item.setWeather(weather);
79 + item.setTemperature(temp);
80 + item.setWind(wind);
81 + item.setPrecipitation(pop);
82 +
83 + listViewItemList.add(item);
84 + }
85 +}
...\ No newline at end of file ...\ No newline at end of file
1 +package com.example.test;
2 +
3 +import android.graphics.drawable.Drawable;
4 +
5 +public class ListViewItem {
6 + private Drawable weather;
7 + private String time;
8 + private String temperature;
9 + private String wind;
10 + private String precipitation;
11 +
12 + public void setWeather(Drawable icon) {
13 + weather = icon ;
14 + }
15 +
16 + public void setTime(String mtime) {
17 + time = mtime ;
18 + }
19 +
20 + public void setTemperature(String temp) {
21 + temperature = temp ;
22 + }
23 +
24 + public void setWind(String mwind) {
25 + wind = mwind ;
26 + }
27 +
28 + public void setPrecipitation(String prec) {
29 + precipitation = prec ;
30 + }
31 +
32 + public Drawable getWeather() {
33 + return this.weather ;
34 + }
35 +
36 + public String getTime() {
37 + return this.time ;
38 + }
39 +
40 + public String getTemperature() {
41 + return this.temperature ;
42 + }
43 +
44 + public String getWind() {
45 + return this.wind;
46 + }
47 +
48 + public String getPrecipitation() {
49 + return this.precipitation;
50 + }
51 +
52 +
53 +
54 +
55 +
56 +}
This diff is collapsed. Click to expand it.
1 +package com.example.test;
2 +
3 +import android.app.Activity;
4 +import android.content.Intent;
5 +import android.content.res.AssetManager;
6 +import android.graphics.Bitmap;
7 +import android.graphics.BitmapFactory;
8 +import android.os.Bundle;
9 +import android.os.Handler;
10 +import android.widget.ImageView;
11 +
12 +import java.io.InputStream;
13 +
14 +public class SplashActivity extends Activity {
15 +
16 + @Override
17 + protected void onCreate(Bundle savedInstanceState) {
18 + super.onCreate(savedInstanceState);
19 + setContentView(R.layout.activity_splash);
20 +
21 + try {
22 + Thread.sleep(3000); //대기 초 설정
23 + startActivity(new Intent(SplashActivity.this, MainActivity.class));
24 + finish();
25 + } catch (Exception e) {
26 + e.printStackTrace();
27 + }
28 + }
29 +}
1 +package com.example.test;
2 +
3 +import android.os.StrictMode;
4 +
5 +import org.w3c.dom.Document;
6 +import org.w3c.dom.Element;
7 +import org.w3c.dom.Node;
8 +import org.w3c.dom.NodeList;
9 +import org.xml.sax.SAXException;
10 +
11 +import java.io.IOException;
12 +import java.net.MalformedURLException;
13 +import java.util.ArrayList;
14 +import java.util.Calendar;
15 +
16 +import javax.xml.parsers.DocumentBuilder;
17 +import javax.xml.parsers.DocumentBuilderFactory;
18 +import javax.xml.parsers.ParserConfigurationException;
19 +
20 +public class WeatherForCast extends Thread {
21 +
22 + String code;
23 + //MainActivity mContext;
24 + WeatherActivity wContext;
25 + String mWeather;
26 + ArrayList<ArrayList<String>> gWeather;
27 +
28 + public String getWeather()
29 + {
30 + return mWeather;
31 + }
32 +
33 + public WeatherForCast(String code, WeatherActivity wContext)
34 + {
35 + this.code = code;
36 + this.wContext = wContext;
37 + }
38 +
39 + // tag값의 정보를 가져오는 메소드
40 + private static String getTagValue(String tag, Element eElement) {
41 + NodeList nlList = eElement.getElementsByTagName(tag).item(0).getChildNodes();
42 + Node nValue = (Node) nlList.item(0);
43 + if(nValue == null)
44 + return null;
45 + return nValue.getNodeValue();
46 + }
47 +
48 + public ArrayList<ArrayList<String>> GetOpenWeather(String code)
49 + {
50 +
51 + ArrayList<ArrayList<String>> wData = new ArrayList<ArrayList<String>>();
52 +
53 + try{
54 + String url = "http://www.kma.go.kr/wid/queryDFSRSS.jsp?zone="+ code;
55 +
56 + DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
57 + DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
58 + Document doc = dBuilder.parse(url);
59 +
60 + // root tag
61 + doc.getDocumentElement().normalize();
62 +
63 + NodeList nlDate = doc.getElementsByTagName("header");
64 + Node ndate = nlDate.item(0);
65 + Element eDate = (Element) ndate;
66 + String date = getTagValue("tm", eDate);
67 +
68 + int thour = Integer.parseInt(date.substring(8,10));
69 + date = date.substring(4,8);
70 +
71 + if (thour >= 21) {
72 + date = String.format("%4s",String.valueOf(Integer.parseInt(date) + 1)).replace(" ", "0");
73 + }
74 +
75 + // 파싱할 tag
76 + NodeList nList = doc.getElementsByTagName("data");
77 + for(int temp = 0; temp < nList.getLength(); temp++){
78 + Node nNode = nList.item(temp);
79 + ArrayList<String> tData = new ArrayList<String>();
80 + if(nNode.getNodeType() == Node.ELEMENT_NODE){
81 +
82 + Element eElement = (Element) nNode;
83 + String hour = getTagValue("hour",eElement);
84 + hour = String.format("%2s",hour).replace(" ","0");
85 + tData.add(date + hour); // 0.시간
86 + if (getTagValue("hour",eElement).equals("24")){
87 + int tmp;
88 + tmp = Integer.parseInt(date);
89 + tmp += 1;
90 + date = String.format("%4s",String.valueOf(tmp)).replace(" ", "0");
91 + }
92 + tData.add(IntCast(getTagValue("temp", eElement))); // 1.온도
93 + tData.add(GetTemperature(IntCast(getTagValue("tmx", eElement)))); // 2.최고 온도
94 + tData.add(GetTemperature(IntCast(getTagValue("tmn", eElement)))); // 3.최저 온도
95 + tData.add(IntCast(getTagValue("ws", eElement))); // 4.풍속
96 + tData.add(getTagValue("wfEn", eElement)); // 5.하늘상태
97 + tData.add(getTagValue("pop", eElement)); // 6.강수확률
98 + } // for end
99 + wData.add(tData);
100 + } // if end
101 + } catch (MalformedURLException e) {
102 + e.printStackTrace();
103 + } catch (IOException e) {
104 + e.printStackTrace();
105 + } catch (ParserConfigurationException e) {
106 + e.printStackTrace();
107 + } catch (SAXException e) {
108 + e.printStackTrace();
109 + }
110 +
111 + return wData;
112 + }
113 +
114 + public String IntCast(String tmp){
115 + double temp = Double.parseDouble(tmp);
116 + int result = (int) temp;
117 +
118 + return String.valueOf(result);
119 + }
120 +
121 + // 체감온도에 필요한 값만 Return
122 + public ArrayList<ArrayList<String>> GetPerceived(String code)
123 + {
124 + ArrayList<ArrayList<String>> gData = new ArrayList<ArrayList<String>>();
125 +
126 + try{
127 + String url = "http://www.kma.go.kr/wid/queryDFSRSS.jsp?zone="+ code;
128 +
129 + DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
130 + DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
131 + Document doc = dBuilder.parse(url);
132 +
133 + // root tag
134 + doc.getDocumentElement().normalize();
135 +
136 + NodeList nlDate = doc.getElementsByTagName("header");
137 + Node ndate = nlDate.item(0);
138 + Element eDate = (Element) ndate;
139 + String date = getTagValue("tm", eDate);
140 + date = date.substring(4,8);
141 +
142 + // 파싱할 tag
143 + NodeList nList = doc.getElementsByTagName("data");
144 +
145 + for(int temp = 0; temp < nList.getLength(); temp++){
146 + Node nNode = nList.item(temp);
147 + ArrayList<String> data = new ArrayList<String>();
148 + if(nNode.getNodeType() == Node.ELEMENT_NODE){
149 + Element eElement = (Element) nNode;
150 + String hour = getTagValue("hour",eElement);
151 + hour = String.format("%2s",hour).replace(" ","0");
152 + data.add(date + hour);
153 +
154 + if (getTagValue("hour",eElement).equals("24")){
155 + int tmp;
156 + tmp = Integer.parseInt(date);
157 + tmp += 1;
158 + date = String.format("%4s",String.valueOf(tmp)).replace(" ", "0");
159 + }
160 + data.add(getTagValue("temp",eElement));
161 + data.add(getTagValue("ws",eElement));
162 + } // for end
163 + gData.add(data);
164 + } // if end
165 + } catch (MalformedURLException e) {
166 + e.printStackTrace();
167 + } catch (IOException e) {
168 + e.printStackTrace();
169 + } catch (ParserConfigurationException e) {
170 + e.printStackTrace();
171 + } catch (SAXException e) {
172 + e.printStackTrace();
173 + }
174 +
175 + return gData;
176 + }
177 +
178 + public String GetTemperature(String temp)
179 + {
180 + if (temp.equals("999"))
181 + return "정보 없음";
182 + else if (temp.equals("-999"))
183 + return "정보 없음";
184 +
185 + return temp;
186 + }
187 +
188 + public String GetPerceived(String temp, String velo){
189 + int perceived;
190 + double temper = Double.parseDouble(temp);
191 + double veloc = Double.parseDouble(velo);
192 + perceived = (int) (13.12 + 0.6215 * temper - 11.37 * Math.pow(veloc, 0.16) + 0.3965 * Math.pow(veloc, 0.16) * temper);
193 +
194 + return String.valueOf(perceived);
195 + }
196 +
197 + @Override
198 + public void run() {
199 + super.run();
200 + if (android.os.Build.VERSION.SDK_INT > 9) {
201 + StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
202 + StrictMode.setThreadPolicy(policy);
203 + }
204 + }
205 +}
1 +<vector xmlns:android="http://schemas.android.com/apk/res/android"
2 + xmlns:aapt="http://schemas.android.com/aapt"
3 + android:width="108dp"
4 + android:height="108dp"
5 + android:viewportWidth="108"
6 + android:viewportHeight="108">
7 + <path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
8 + <aapt:attr name="android:fillColor">
9 + <gradient
10 + android:endX="85.84757"
11 + android:endY="92.4963"
12 + android:startX="42.9492"
13 + android:startY="49.59793"
14 + android:type="linear">
15 + <item
16 + android:color="#44000000"
17 + android:offset="0.0" />
18 + <item
19 + android:color="#00000000"
20 + android:offset="1.0" />
21 + </gradient>
22 + </aapt:attr>
23 + </path>
24 + <path
25 + android:fillColor="#FFFFFF"
26 + android:fillType="nonZero"
27 + android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
28 + android:strokeWidth="1"
29 + android:strokeColor="#00000000" />
30 +</vector>
...\ No newline at end of file ...\ No newline at end of file
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<vector xmlns:android="http://schemas.android.com/apk/res/android"
3 + android:width="108dp"
4 + android:height="108dp"
5 + android:viewportWidth="108"
6 + android:viewportHeight="108">
7 + <path
8 + android:fillColor="#3DDC84"
9 + android:pathData="M0,0h108v108h-108z" />
10 + <path
11 + android:fillColor="#00000000"
12 + android:pathData="M9,0L9,108"
13 + android:strokeWidth="0.8"
14 + android:strokeColor="#33FFFFFF" />
15 + <path
16 + android:fillColor="#00000000"
17 + android:pathData="M19,0L19,108"
18 + android:strokeWidth="0.8"
19 + android:strokeColor="#33FFFFFF" />
20 + <path
21 + android:fillColor="#00000000"
22 + android:pathData="M29,0L29,108"
23 + android:strokeWidth="0.8"
24 + android:strokeColor="#33FFFFFF" />
25 + <path
26 + android:fillColor="#00000000"
27 + android:pathData="M39,0L39,108"
28 + android:strokeWidth="0.8"
29 + android:strokeColor="#33FFFFFF" />
30 + <path
31 + android:fillColor="#00000000"
32 + android:pathData="M49,0L49,108"
33 + android:strokeWidth="0.8"
34 + android:strokeColor="#33FFFFFF" />
35 + <path
36 + android:fillColor="#00000000"
37 + android:pathData="M59,0L59,108"
38 + android:strokeWidth="0.8"
39 + android:strokeColor="#33FFFFFF" />
40 + <path
41 + android:fillColor="#00000000"
42 + android:pathData="M69,0L69,108"
43 + android:strokeWidth="0.8"
44 + android:strokeColor="#33FFFFFF" />
45 + <path
46 + android:fillColor="#00000000"
47 + android:pathData="M79,0L79,108"
48 + android:strokeWidth="0.8"
49 + android:strokeColor="#33FFFFFF" />
50 + <path
51 + android:fillColor="#00000000"
52 + android:pathData="M89,0L89,108"
53 + android:strokeWidth="0.8"
54 + android:strokeColor="#33FFFFFF" />
55 + <path
56 + android:fillColor="#00000000"
57 + android:pathData="M99,0L99,108"
58 + android:strokeWidth="0.8"
59 + android:strokeColor="#33FFFFFF" />
60 + <path
61 + android:fillColor="#00000000"
62 + android:pathData="M0,9L108,9"
63 + android:strokeWidth="0.8"
64 + android:strokeColor="#33FFFFFF" />
65 + <path
66 + android:fillColor="#00000000"
67 + android:pathData="M0,19L108,19"
68 + android:strokeWidth="0.8"
69 + android:strokeColor="#33FFFFFF" />
70 + <path
71 + android:fillColor="#00000000"
72 + android:pathData="M0,29L108,29"
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>
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
3 +
4 + <item
5 + android:bottom="1dp"
6 + android:left="1dp"
7 + android:right="1dp"
8 + android:top="1dp">
9 + <shape android:shape="rectangle" >
10 + <stroke
11 + android:width="2dp"
12 + android:color="#000000" />
13 +
14 + <solid android:color="#FFF" />
15 + </shape>
16 + </item>
17 +
18 +</layer-list>
...\ No newline at end of file ...\ No newline at end of file
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
This diff is collapsed. Click to expand it.
1 +<?xml version="1.0" encoding="utf-8"?>
2 +
3 +
4 +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
5 + xmlns:app="http://schemas.android.com/apk/res-auto"
6 + xmlns:tools="http://schemas.android.com/tools"
7 + android:layout_width="match_parent"
8 + android:layout_height="match_parent"
9 + tools:context=".MainActivity">
10 +
11 + <ScrollView
12 + android:layout_width="match_parent"
13 + android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
14 + android:paddingRight="@dimen/activity_horizontal_margin"
15 + android:paddingTop="@dimen/activity_vertical_margin"
16 + android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".MainActivity">
17 +
18 + <LinearLayout
19 + android:layout_width="match_parent"
20 + android:layout_height="wrap_content"
21 + android:orientation="vertical"
22 + android:weightSum="1">
23 +
24 + <ImageView
25 + android:layout_width="match_parent"
26 + android:layout_height="wrap_content"
27 + android:id="@+id/angel"
28 + android:layout_centerHorizontal="true" />
29 +
30 + <FrameLayout
31 + android:layout_width="match_parent"
32 + android:layout_height="wrap_content"
33 + android:layout_gravity="center_vertical"></FrameLayout>
34 +
35 + <TextView
36 + android:id="@+id/select_city"
37 + android:layout_width="wrap_content"
38 + android:layout_height="wrap_content"
39 + android:textSize="7pt"
40 + android:text="1. 도시를 입력해주세요."
41 + android:layout_margin = "10dp"
42 + android:fontFamily="@font/scdream5"
43 + android:textColor="#000000"/>
44 +
45 + <LinearLayout
46 + android:orientation="horizontal"
47 + android:layout_width="match_parent"
48 + android:layout_height="wrap_content"
49 + android:layout_gravity="center_horizontal"
50 + android:weightSum="3"
51 + android:layout_margin = "10dp">
52 + <Spinner
53 + android:id="@+id/TopList"
54 + android:layout_width="match_parent"
55 + android:layout_height="wrap_content"
56 + android:layout_weight="1" />
57 +
58 + <Spinner
59 + android:id="@+id/MdlList"
60 + android:layout_width="match_parent"
61 + android:layout_height="wrap_content"
62 + android:layout_weight="1" />
63 +
64 + <Spinner
65 + android:id="@+id/LeafList"
66 + android:layout_width="match_parent"
67 + android:layout_height="wrap_content"
68 + android:layout_weight="1" />
69 +
70 +
71 + </LinearLayout>
72 +
73 + <TextView
74 + android:id="@+id/select_date"
75 + android:layout_width="wrap_content"
76 + android:layout_height="wrap_content"
77 + android:fontFamily="@font/scdream5"
78 + android:text="2. 날짜 및 시간을 입력해주세요."
79 + android:textSize="7pt"
80 + android:layout_margin = "10dp"
81 + android:textColor="#000000"/>
82 +
83 + <LinearLayout
84 + android:orientation="horizontal"
85 + android:layout_width="match_parent"
86 + android:layout_height="wrap_content"
87 + android:layout_gravity="center_horizontal"
88 + android:weightSum="1"
89 + android:layout_marginTop="10dp"
90 + android:layout_marginLeft="10dp"
91 + android:layout_marginRight="10dp">
92 + <Spinner
93 + android:layout_width="100dp"
94 + android:layout_height="wrap_content"
95 + android:id="@+id/start_month"
96 + android:layout_weight="0.33"
97 + android:fontFamily="@font/scdream3"
98 + android:textSize="6pt" />
99 + <Spinner
100 + android:layout_width="100dp"
101 + android:layout_height="wrap_content"
102 + android:id="@+id/start_day"
103 + android:layout_weight="0.33"
104 + android:fontFamily="@font/scdream3"
105 + android:textSize="6pt" />
106 + <Spinner
107 + android:layout_width="100dp"
108 + android:layout_height="wrap_content"
109 + android:id="@+id/start_hour"
110 + android:layout_weight="0.33"
111 + android:fontFamily="@font/scdream3"
112 + android:textSize="6pt" />
113 + </LinearLayout>
114 +
115 + <LinearLayout
116 + android:orientation="horizontal"
117 + android:layout_width="match_parent"
118 + android:layout_height="wrap_content"
119 + android:layout_gravity="center_horizontal"
120 + android:weightSum="1"
121 + android:layout_marginBottom="10dp"
122 + android:layout_marginLeft="10dp"
123 + android:layout_marginRight="10dp">
124 + <Spinner
125 + android:layout_width="100dp"
126 + android:layout_height="wrap_content"
127 + android:id="@+id/from_month"
128 + android:layout_weight="0.33"
129 + android:fontFamily="@font/scdream3"
130 + />
131 + <Spinner
132 + android:layout_width="100dp"
133 + android:layout_height="wrap_content"
134 + android:id="@+id/from_day"
135 + android:layout_weight="0.33"
136 + android:fontFamily="@font/scdream3"
137 + />
138 + <Spinner
139 + android:layout_width="100dp"
140 + android:layout_height="wrap_content"
141 + android:id="@+id/from_hour"
142 + android:layout_weight="0.33"
143 + android:fontFamily="@font/scdream3"
144 + />
145 + </LinearLayout>
146 +
147 + <TextView
148 + android:id="@+id/select_gender"
149 + android:layout_width="wrap_content"
150 + android:layout_height="wrap_content"
151 + android:textSize="7pt"
152 + android:text="3. 성별을 입력해주세요."
153 + android:fontFamily="@font/scdream5"
154 + android:textColor="#000000"
155 + android:layout_margin = "10dp"/>
156 +
157 + <RadioGroup
158 + android:id="@+id/radioGender"
159 + android:layout_width="match_parent"
160 + android:layout_height="wrap_content"
161 + android:orientation="horizontal"
162 + android:layout_margin = "10dp">
163 +
164 + <RadioButton
165 + android:id="@+id/select_woman"
166 + android:layout_width="wrap_content"
167 + android:layout_height="wrap_content"
168 + android:checked="true"
169 + android:layout_weight="1"
170 + android:text="여자"
171 + android:fontFamily="@font/scdream3"
172 + android:textSize="6pt"/>
173 +
174 + <RadioButton
175 + android:id="@+id/select_man"
176 + android:layout_width="wrap_content"
177 + android:layout_height="wrap_content"
178 + android:layout_weight="1"
179 + android:text="남자"
180 + android:fontFamily="@font/scdream3"
181 + android:textSize="6pt" />
182 +
183 + </RadioGroup>
184 +
185 + <LinearLayout
186 + android:orientation="horizontal"
187 + android:layout_width="match_parent"
188 + android:layout_height="wrap_content"
189 + android:layout_gravity="center_horizontal"
190 + android:weightSum="2">
191 +
192 + <Button
193 + android:id="@+id/btn_weather"
194 + android:layout_width="150dp"
195 + android:layout_height="wrap_content"
196 + android:layout_weight="1"
197 + android:fontFamily="@font/scdream5"
198 + android:layout_margin = "10dp"
199 + android:text="날씨 알아보기" />
200 +
201 + <Button
202 + android:id="@+id/btn_clothes"
203 + android:layout_width="150dp"
204 + android:layout_height="wrap_content"
205 + android:layout_weight="1"
206 + android:fontFamily="@font/scdream5"
207 + android:layout_margin = "10dp"
208 + android:text="옷 추천받기" />
209 + </LinearLayout>
210 + </LinearLayout>
211 + </ScrollView>
212 +
213 +</androidx.constraintlayout.widget.ConstraintLayout>
...\ No newline at end of file ...\ No newline at end of file
1 +<?xml version="1.0" encoding="utf-8"?>
2 +
3 +
4 +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
5 + xmlns:app="http://schemas.android.com/apk/res-auto"
6 + xmlns:tools="http://schemas.android.com/tools"
7 + android:layout_width="match_parent"
8 + android:layout_height="match_parent"
9 + android:background="@color/splash"
10 + tools:context=".SplashActivity">
11 +
12 + <ImageView
13 + android:id="@+id/splash"
14 + android:layout_width="match_parent"
15 + android:layout_height="match_parent"
16 + android:src="@drawable/main"
17 + app:layout_constraintBottom_toBottomOf="parent"
18 + app:layout_constraintEnd_toEndOf="parent"
19 + app:layout_constraintHorizontal_bias="0.495"
20 + app:layout_constraintStart_toStartOf="parent"
21 + app:layout_constraintTop_toTopOf="parent"
22 + app:layout_constraintVertical_bias="0.532" />
23 +
24 +
25 +
26 +</androidx.constraintlayout.widget.ConstraintLayout>
...\ No newline at end of file ...\ No newline at end of file
This diff is collapsed. Click to expand it.
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 + android:layout_width="match_parent"
4 + android:layout_height="match_parent">
5 + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
6 + android:orientation="horizontal"
7 + android:layout_width="match_parent"
8 + android:layout_height="match_parent">
9 + <LinearLayout
10 + android:orientation="horizontal"
11 + android:layout_width="match_parent"
12 + android:layout_height="wrap_content"
13 + android:layout_weight="5"
14 + android:layout_marginRight="25dp"
15 + android:layout_marginLeft="25dp">
16 +
17 + <ImageView
18 + android:layout_width="80px"
19 + android:layout_height="80px"
20 + android:id="@+id/check_icon"
21 + android:gravity="center_horizontal"/>
22 +
23 + <TextView
24 + android:layout_width="match_parent"
25 + android:layout_height="match_parent"
26 + android:text="체크리스트"
27 + android:id="@+id/input_checklist"
28 + android:textColor="#000000"
29 + android:gravity="center_vertical"
30 + android:layout_marginLeft="5dp"
31 + android:fontFamily="@font/scdream4"
32 + android:layout_weight="1" />
33 +
34 +
35 + </LinearLayout>
36 + </LinearLayout>
37 +
38 +</androidx.constraintlayout.widget.ConstraintLayout>
...\ No newline at end of file ...\ No newline at end of file
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 + android:layout_width="match_parent"
4 + android:layout_height="match_parent">
5 + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
6 + android:orientation="horizontal"
7 + android:layout_width="match_parent"
8 + android:layout_height="match_parent">
9 + <LinearLayout
10 + android:orientation="horizontal"
11 + android:layout_width="match_parent"
12 + android:layout_height="wrap_content"
13 + android:layout_weight="5">
14 +
15 + <TextView
16 + android:layout_width="100px"
17 + android:layout_height="match_parent"
18 + android:text="시간"
19 + android:id="@+id/input_time"
20 + android:textColor="#000000"
21 + android:gravity="center"
22 + android:fontFamily="@font/scdream3"
23 + android:layout_weight="1" />
24 +
25 + <ImageView
26 + android:layout_width="100px"
27 + android:layout_height="110px"
28 + android:id="@+id/input_weather"
29 + android:layout_weight="0.8"
30 + android:gravity="center_horizontal"/>
31 +
32 + <TextView
33 + android:layout_width="100px"
34 + android:layout_height="match_parent"
35 + android:text="기온"
36 + android:id="@+id/input_temperature"
37 + android:textColor="#000000"
38 + android:gravity="center"
39 + android:fontFamily="@font/scdream3"
40 + android:layout_weight="1" />
41 +
42 + <TextView
43 + android:layout_width="100px"
44 + android:layout_height="match_parent"
45 + android:text="풍속"
46 + android:id="@+id/input_wind"
47 + android:textColor="#000000"
48 + android:gravity="center"
49 + android:fontFamily="@font/scdream3"
50 + android:layout_weight="1" />
51 +
52 + <TextView
53 + android:layout_width="wrap_content"
54 + android:layout_height="match_parent"
55 + android:text="강수확률"
56 + android:id="@+id/input_precipitation"
57 + android:textColor="#000000"
58 + android:gravity="center"
59 + android:fontFamily="@font/scdream3"
60 + android:layout_weight="1" />
61 +
62 + </LinearLayout>
63 + </LinearLayout>
64 +
65 +</androidx.constraintlayout.widget.ConstraintLayout>
...\ No newline at end of file ...\ No newline at end of file
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3 + <background android:drawable="@color/ic_clothes_background"/>
4 + <foreground android:drawable="@mipmap/ic_clothes_foreground"/>
5 +</adaptive-icon>
...\ No newline at end of file ...\ No newline at end of file
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3 + <background android:drawable="@color/ic_clothes_background"/>
4 + <foreground android:drawable="@mipmap/ic_clothes_foreground"/>
5 +</adaptive-icon>
...\ No newline at end of file ...\ No newline at end of file
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3 + <background android:drawable="@drawable/ic_launcher_background" />
4 + <foreground android:drawable="@drawable/ic_launcher_foreground" />
5 +</adaptive-icon>
...\ No newline at end of file ...\ No newline at end of file
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3 + <background android:drawable="@drawable/ic_launcher_background" />
4 + <foreground android:drawable="@drawable/ic_launcher_foreground" />
5 +</adaptive-icon>
...\ No newline at end of file ...\ No newline at end of file
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.