이수민

최종보고서 수정

Showing 86 changed files with 1273 additions and 1273 deletions
No preview for this file type
*.iml
.gradle
/local.properties
/.idea/caches/build_file_checksums.ser
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
.DS_Store
/build
/captures
.externalNativeBuild
*.iml
.gradle
/local.properties
/.idea/caches/build_file_checksums.ser
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
.DS_Store
/build
/captures
.externalNativeBuild
......
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<Objective-C-extensions>
<file>
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Import" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Macro" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Typedef" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Enum" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Constant" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Global" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Struct" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="FunctionPredecl" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Function" />
</file>
<class>
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Property" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Synthesize" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InitMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="StaticMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InstanceMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="DeallocMethod" />
</class>
<extensions>
<pair source="cpp" header="h" fileNamingConvention="NONE" />
<pair source="c" header="h" fileNamingConvention="NONE" />
</extensions>
</Objective-C-extensions>
</code_scheme>
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<Objective-C-extensions>
<file>
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Import" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Macro" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Typedef" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Enum" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Constant" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Global" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Struct" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="FunctionPredecl" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Function" />
</file>
<class>
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Property" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Synthesize" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InitMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="StaticMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InstanceMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="DeallocMethod" />
</class>
<extensions>
<pair source="cpp" header="h" fileNamingConvention="NONE" />
<pair source="c" header="h" fileNamingConvention="NONE" />
</extensions>
</Objective-C-extensions>
</code_scheme>
</component>
\ No newline at end of file
......
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.example.suemin.smartwindow"
minSdkVersion 24
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.+'
implementation 'com.android.support:design:26.+'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:support-v4:26.1.0'
implementation 'com.android.support:recyclerview-v7:26.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.example.suemin.smartwindow"
minSdkVersion 24
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.+'
implementation 'com.android.support:design:26.+'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:support-v4:26.1.0'
implementation 'com.android.support:recyclerview-v7:26.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
......
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
......
package com.example.suemin.smartwindow;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.example.suemin.smartwindow", appContext.getPackageName());
}
}
package com.example.suemin.smartwindow;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.example.suemin.smartwindow", appContext.getPackageName());
}
}
......
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.suemin.smartwindow">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-feature
android:name="android.hardware.bluetooth_le"
android:required="true" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name="com.example.suemin.smartwindow.view.MainActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name="com.example.suemin.smartwindow.view.bluetooth.BluetoothLeService"/>
</application>
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.suemin.smartwindow">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-feature
android:name="android.hardware.bluetooth_le"
android:required="true" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name="com.example.suemin.smartwindow.view.MainActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name="com.example.suemin.smartwindow.view.bluetooth.BluetoothLeService"/>
</application>
</manifest>
\ No newline at end of file
......
# Created by .ignore support plugin (hsz.mobi)
### Android template
# Built application files
*.apk
*.ap_
*.aab
# Files for the ART/Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
out/
release/
# Gradle files
.gradle/
build/
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Log Files
*.log
# Android Studio Navigation editor temp files
.navigation/
# Android Studio captures folder
captures/
# IntelliJ
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
# Android Studio 3 in .gitignore file.
.idea/caches
.idea/modules.xml
# Comment next line if keeping position of elements in Navigation Editor is relevant for you
.idea/navEditor.xml
# Keystore files
# Uncomment the following lines if you do not want to check your keystore files in.
#*.jks
#*.keystore
# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
# Google Services (e.g. APIs or Firebase)
# google-services.json
# Freeline
freeline.py
freeline/
freeline_project_description.json
# fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md
# Version control
vcs.xml
# lint
lint/intermediates/
lint/generated/
lint/outputs/
lint/tmp/
# lint/reports/
# Created by .ignore support plugin (hsz.mobi)
### Android template
# Built application files
*.apk
*.ap_
*.aab
# Files for the ART/Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
out/
release/
# Gradle files
.gradle/
build/
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Log Files
*.log
# Android Studio Navigation editor temp files
.navigation/
# Android Studio captures folder
captures/
# IntelliJ
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
# Android Studio 3 in .gitignore file.
.idea/caches
.idea/modules.xml
# Comment next line if keeping position of elements in Navigation Editor is relevant for you
.idea/navEditor.xml
# Keystore files
# Uncomment the following lines if you do not want to check your keystore files in.
#*.jks
#*.keystore
# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
# Google Services (e.g. APIs or Firebase)
# google-services.json
# Freeline
freeline.py
freeline/
freeline_project_description.json
# fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md
# Version control
vcs.xml
# lint
lint/intermediates/
lint/generated/
lint/outputs/
lint/tmp/
# lint/reports/
......
package com.example.suemin.smartwindow.view.bluetooth;
import java.util.HashMap;
/**
* This class includes a small subset of standard GATT attributes for demonstration purposes.
*/
public class SampleAttributes {
private static HashMap<String, String> attributes = new HashMap();
public static String HM_10 = "0000ffe1-0000-1000-8000-00805f9b34fb";
public static String CLIENT_CHARACTERISTIC_CONFIG = "00002902-0000-1000-8000-00805f9b34fb";
static {
// Sample Services.
attributes.put("0000ffe0-0000-1000-8000-00805f9b34fb", "HM-10 Service");
attributes.put("0000180a-0000-1000-8000-00805f9b34fb", "Device Information Service");
// Sample Characteristics.
attributes.put(HM_10, "HM-10 Module");
attributes.put("00002a29-0000-1000-8000-00805f9b34fb", "Manufacturer Name String");
}
public static String lookup(String uuid, String defaultName) {
String name = attributes.get(uuid);
return name == null ? defaultName : name;
}
package com.example.suemin.smartwindow.view.bluetooth;
import java.util.HashMap;
/**
* This class includes a small subset of standard GATT attributes for demonstration purposes.
*/
public class SampleAttributes {
private static HashMap<String, String> attributes = new HashMap();
public static String HM_10 = "0000ffe1-0000-1000-8000-00805f9b34fb";
public static String CLIENT_CHARACTERISTIC_CONFIG = "00002902-0000-1000-8000-00805f9b34fb";
static {
// Sample Services.
attributes.put("0000ffe0-0000-1000-8000-00805f9b34fb", "HM-10 Service");
attributes.put("0000180a-0000-1000-8000-00805f9b34fb", "Device Information Service");
// Sample Characteristics.
attributes.put(HM_10, "HM-10 Module");
attributes.put("00002a29-0000-1000-8000-00805f9b34fb", "Manufacturer Name String");
}
public static String lookup(String uuid, String defaultName) {
String name = attributes.get(uuid);
return name == null ? defaultName : name;
}
}
\ No newline at end of file
......
package com.example.suemin.smartwindow.view.environment.listview;
import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.view.View;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.TextView;
import com.example.suemin.smartwindow.R;
import com.example.suemin.smartwindow.view.bluetooth.SensorResult;
public class CustomDialog extends Dialog {
private Button mPositiveButton;
private View.OnClickListener mPositiveListener;
private TextView AlertTitle, AlertNum, AlertState;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
WindowManager.LayoutParams layoutParams = new WindowManager.LayoutParams();
layoutParams.flags = WindowManager.LayoutParams.FLAG_DIM_BEHIND;
layoutParams.dimAmount = 0.8f;
getWindow().setAttributes(layoutParams);
setContentView(R.layout.custom_dialog);
mPositiveButton=(Button)findViewById(R.id.pbutton);
mPositiveButton.setOnClickListener(mPositiveListener);
AlertTitle = (TextView) findViewById(R.id.dialog_title);
AlertNum = (TextView) findViewById(R.id.dialog_num);
AlertState= (TextView) findViewById(R.id.dialog_state);
}
public CustomDialog(@NonNull Context context, View.OnClickListener positiveListener) {
super(context);
this.mPositiveListener = positiveListener;
}
public boolean setText(int position)
{
switch (position) {
case 0:
AlertTitle.setText("현재 비");
AlertNum.setText(SensorResult.getRainResult());
break;
case 1:
AlertTitle.setText("현재 실외 미세먼지");
AlertNum.setText(Finedust.getFineDustResult()+"");
AlertState.setText("상태 : "+ SensorResult.getOuterFineDustState());
break;
case 2:
AlertTitle.setText("현재 실내 미세먼지");
AlertNum.setText("51");
AlertState.setText("상태 : " + SensorResult.getInnerFineDustState());
break;
case 3:
AlertTitle.setText("현재 실내 온도");
AlertNum.setText(SensorResult.getTemperatureResult() + "℃");
AlertState.setText("상태 : " + SensorResult.getTemperatureState());
break;
case 4:
AlertTitle.setText("현재 실내 습도");
AlertNum.setText(SensorResult.getHumidResult()+ "%");
AlertState.setText("상태 : " + SensorResult.getHumidState());
break;
case 5:
AlertTitle.setText("현재 침입자");
AlertNum.setText(SensorResult.getIntruderResult());
break;
}
return true;
}
}
package com.example.suemin.smartwindow.view.environment.listview;
import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.view.View;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.TextView;
import com.example.suemin.smartwindow.R;
import com.example.suemin.smartwindow.view.bluetooth.SensorResult;
public class CustomDialog extends Dialog {
private Button mPositiveButton;
private View.OnClickListener mPositiveListener;
private TextView AlertTitle, AlertNum, AlertState;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
WindowManager.LayoutParams layoutParams = new WindowManager.LayoutParams();
layoutParams.flags = WindowManager.LayoutParams.FLAG_DIM_BEHIND;
layoutParams.dimAmount = 0.8f;
getWindow().setAttributes(layoutParams);
setContentView(R.layout.custom_dialog);
mPositiveButton=(Button)findViewById(R.id.pbutton);
mPositiveButton.setOnClickListener(mPositiveListener);
AlertTitle = (TextView) findViewById(R.id.dialog_title);
AlertNum = (TextView) findViewById(R.id.dialog_num);
AlertState= (TextView) findViewById(R.id.dialog_state);
}
public CustomDialog(@NonNull Context context, View.OnClickListener positiveListener) {
super(context);
this.mPositiveListener = positiveListener;
}
public boolean setText(int position)
{
switch (position) {
case 0:
AlertTitle.setText("현재 비");
AlertNum.setText(SensorResult.getRainResult());
break;
case 1:
AlertTitle.setText("현재 실외 미세먼지");
AlertNum.setText(Finedust.getFineDustResult()+"");
AlertState.setText("상태 : "+ SensorResult.getOuterFineDustState());
break;
case 2:
AlertTitle.setText("현재 실내 미세먼지");
AlertNum.setText("51");
AlertState.setText("상태 : " + SensorResult.getInnerFineDustState());
break;
case 3:
AlertTitle.setText("현재 실내 온도");
AlertNum.setText(SensorResult.getTemperatureResult() + "℃");
AlertState.setText("상태 : " + SensorResult.getTemperatureState());
break;
case 4:
AlertTitle.setText("현재 실내 습도");
AlertNum.setText(SensorResult.getHumidResult()+ "%");
AlertState.setText("상태 : " + SensorResult.getHumidState());
break;
case 5:
AlertTitle.setText("현재 침입자");
AlertNum.setText(SensorResult.getIntruderResult());
break;
}
return true;
}
}
......
package com.example.suemin.smartwindow.view.environment.listview;
import android.os.StrictMode;
import com.example.suemin.smartwindow.view.environment.Env;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlPullParserFactory;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
public class Finedust {
public static String getFineDustResult(){
String Key = "rqkQD0pLMXekuhOonOeI0xpbtEMtgBjTtMD5DZRWhDwQCezQGQsJ8bhg76N8YuihCKhY76QEWgsaZifSyupTDQ%3D%3D";
StrictMode.enableDefaults();
String currentLocation = Env.subaddr2;
boolean inPm10Value = false;
String pm10Value = null;
try{
URL url = new URL("http://openapi.airkorea.or.kr/openapi/services/rest/ArpltnInforInqireSvc/getMsrstnAcctoRltmMesureDnsty?numOfRows=1&pageNo=1&stationName="
+ currentLocation +"&dataTerm=DAILY&ver=1.3&ServiceKey="+Key);
XmlPullParserFactory parserCreator = XmlPullParserFactory.newInstance();
XmlPullParser parser = parserCreator.newPullParser();
parser.setInput(url.openStream(),null);
int parserEvent = parser.getEventType();
while(parserEvent != XmlPullParser.END_DOCUMENT){
switch(parserEvent){
case XmlPullParser.START_TAG:
if(parser.getName().equals("pm10Value")){
inPm10Value= true;
}
break;
case XmlPullParser.TEXT:
if(inPm10Value){
pm10Value = parser.getText();
inPm10Value = false;
}
break;
case XmlPullParser.END_TAG:
if(parser.getName().equals("item")){
}
break;
}
parserEvent= parser.next();
}
} catch (XmlPullParserException e) {
e.printStackTrace();
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return pm10Value;
}
}
package com.example.suemin.smartwindow.view.environment.listview;
import android.os.StrictMode;
import com.example.suemin.smartwindow.view.environment.Env;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlPullParserFactory;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
public class Finedust {
public static String getFineDustResult(){
String Key = "rqkQD0pLMXekuhOonOeI0xpbtEMtgBjTtMD5DZRWhDwQCezQGQsJ8bhg76N8YuihCKhY76QEWgsaZifSyupTDQ%3D%3D";
StrictMode.enableDefaults();
String currentLocation = Env.subaddr2;
boolean inPm10Value = false;
String pm10Value = null;
try{
URL url = new URL("http://openapi.airkorea.or.kr/openapi/services/rest/ArpltnInforInqireSvc/getMsrstnAcctoRltmMesureDnsty?numOfRows=1&pageNo=1&stationName="
+ currentLocation +"&dataTerm=DAILY&ver=1.3&ServiceKey="+Key);
XmlPullParserFactory parserCreator = XmlPullParserFactory.newInstance();
XmlPullParser parser = parserCreator.newPullParser();
parser.setInput(url.openStream(),null);
int parserEvent = parser.getEventType();
while(parserEvent != XmlPullParser.END_DOCUMENT){
switch(parserEvent){
case XmlPullParser.START_TAG:
if(parser.getName().equals("pm10Value")){
inPm10Value= true;
}
break;
case XmlPullParser.TEXT:
if(inPm10Value){
pm10Value = parser.getText();
inPm10Value = false;
}
break;
case XmlPullParser.END_TAG:
if(parser.getName().equals("item")){
}
break;
}
parserEvent= parser.next();
}
} catch (XmlPullParserException e) {
e.printStackTrace();
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return pm10Value;
}
}
......
package com.example.suemin.smartwindow.view.environment.listview;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import com.example.suemin.smartwindow.R;
import java.util.ArrayList;
public class ListViewAdapter extends BaseAdapter {
private ArrayList<ListViewItem> listViewItemList= new ArrayList<ListViewItem>();
public ListViewAdapter(){}
@Override
public int getCount() {
return listViewItemList.size();
}
@Override
public Object getItem(int position) {
return listViewItemList.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
final int pos = position;
final Context context = parent.getContext();
if(convertView == null){
LayoutInflater inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
convertView = inflater.inflate(R.layout.listview_item, parent, false);
}
TextView titleTextView = (TextView) convertView.findViewById(R.id.textView1);
ImageView iconImageView = (ImageView) convertView.findViewById(R.id.imageView1);
ListViewItem listViewItem = listViewItemList.get(position);
titleTextView.setText(listViewItem.getTitle());
iconImageView.setImageDrawable(listViewItem.getIcon());
return convertView;
}
public void addItem(String title, Drawable icon){
ListViewItem item = new ListViewItem();
item.setTitle(title);
item.setIcon(icon);
listViewItemList.add(item);
}
}
package com.example.suemin.smartwindow.view.environment.listview;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import com.example.suemin.smartwindow.R;
import java.util.ArrayList;
public class ListViewAdapter extends BaseAdapter {
private ArrayList<ListViewItem> listViewItemList= new ArrayList<ListViewItem>();
public ListViewAdapter(){}
@Override
public int getCount() {
return listViewItemList.size();
}
@Override
public Object getItem(int position) {
return listViewItemList.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
final int pos = position;
final Context context = parent.getContext();
if(convertView == null){
LayoutInflater inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
convertView = inflater.inflate(R.layout.listview_item, parent, false);
}
TextView titleTextView = (TextView) convertView.findViewById(R.id.textView1);
ImageView iconImageView = (ImageView) convertView.findViewById(R.id.imageView1);
ListViewItem listViewItem = listViewItemList.get(position);
titleTextView.setText(listViewItem.getTitle());
iconImageView.setImageDrawable(listViewItem.getIcon());
return convertView;
}
public void addItem(String title, Drawable icon){
ListViewItem item = new ListViewItem();
item.setTitle(title);
item.setIcon(icon);
listViewItemList.add(item);
}
}
......
package com.example.suemin.smartwindow.view.environment.listview;
import android.graphics.drawable.Drawable;
public class ListViewItem {
private String titleStr ;
private Drawable iconDrawable ;
public void setIcon(Drawable icon) {
iconDrawable = icon ;
}
public void setTitle(String title) {
titleStr = title ;
}
public Drawable getIcon() {
return this.iconDrawable ;
}
public String getTitle() {
return this.titleStr ;
}
}
package com.example.suemin.smartwindow.view.environment.listview;
import android.graphics.drawable.Drawable;
public class ListViewItem {
private String titleStr ;
private Drawable iconDrawable ;
public void setIcon(Drawable icon) {
iconDrawable = icon ;
}
public void setTitle(String title) {
titleStr = title ;
}
public Drawable getIcon() {
return this.iconDrawable ;
}
public String getTitle() {
return this.titleStr ;
}
}
......
package com.example.suemin.smartwindow.view.home;
import android.content.Context;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CompoundButton;
import android.widget.ImageView;
import android.widget.Switch;
import android.widget.TextView;
import com.example.suemin.smartwindow.R;
import static com.example.suemin.smartwindow.view.bluetooth.Bluetooth.WindowState;
import static com.example.suemin.smartwindow.view.bluetooth.Bluetooth.setWindowState;
public class Home extends Fragment {
int num = 0;
public Home() {
// Required empty public constructor
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_home, container, false);
final TextView optionState= (TextView) view.findViewById(R.id.textView_switch);
final ImageView imgState = (ImageView) view.findViewById(R.id.imageView2);
Switch sw = (Switch) view.findViewById(R.id.switch1);
sw.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
if(isChecked) {
optionState.setText("“ 열림 ”");
imgState.setImageResource(R.drawable.window_open);
if (!WindowState) {
setWindowState("n", getString(R.string.addr_m));
}
}
else{
num = num+1;
optionState.setText("“ 닫힘 ”");
imgState.setImageResource(R.drawable.window_closed);
if(WindowState) {setWindowState("y", getString(R.string.addr_m));
}
}
}
});
return view;
}
@Override
public void onAttach(Context context) {
super.onAttach(context);
}
@Override
public void onDetach() {
super.onDetach();
}
}
package com.example.suemin.smartwindow.view.home;
import android.content.Context;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CompoundButton;
import android.widget.ImageView;
import android.widget.Switch;
import android.widget.TextView;
import com.example.suemin.smartwindow.R;
import static com.example.suemin.smartwindow.view.bluetooth.Bluetooth.WindowState;
import static com.example.suemin.smartwindow.view.bluetooth.Bluetooth.setWindowState;
public class Home extends Fragment {
int num = 0;
public Home() {
// Required empty public constructor
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_home, container, false);
final TextView optionState= (TextView) view.findViewById(R.id.textView_switch);
final ImageView imgState = (ImageView) view.findViewById(R.id.imageView2);
Switch sw = (Switch) view.findViewById(R.id.switch1);
sw.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
if(isChecked) {
optionState.setText("“ 열림 ”");
imgState.setImageResource(R.drawable.window_open);
if (!WindowState) {
setWindowState("n", getString(R.string.addr_m));
}
}
else{
num = num+1;
optionState.setText("“ 닫힘 ”");
imgState.setImageResource(R.drawable.window_closed);
if(WindowState) {setWindowState("y", getString(R.string.addr_m));
}
}
}
});
return view;
}
@Override
public void onAttach(Context context) {
super.onAttach(context);
}
@Override
public void onDetach() {
super.onDetach();
}
}
......
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillType="evenOdd"
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
android:strokeWidth="1"
android:strokeColor="#00000000">
<aapt:attr name="android:fillColor">
<gradient
android:endX="78.5885"
android:endY="90.9159"
android:startX="48.7653"
android:startY="61.0927"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillType="evenOdd"
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
android:strokeWidth="1"
android:strokeColor="#00000000">
<aapt:attr name="android:fillColor">
<gradient
android:endX="78.5885"
android:endY="90.9159"
android:startX="48.7653"
android:startY="61.0927"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:padding="10dp"
android:shape="rectangle" >
<solid android:color="@color/colorPrimary" />
<gradient
android:startColor="@color/colorPrimary"
android:endColor="#FFFFFF"
android:angle= "270">
</gradient>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:padding="10dp"
android:shape="rectangle" >
<solid android:color="@color/colorPrimary" />
<gradient
android:startColor="@color/colorPrimary"
android:endColor="#FFFFFF"
android:angle= "270">
</gradient>
</shape>
\ No newline at end of file
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:padding="10dp"
android:shape="rectangle"
>
<solid android:color="#FFFFFF"></solid>
<corners
android:bottomLeftRadius="30dp"
android:bottomRightRadius="30dp"
android:topLeftRadius="30dp"
android:topRightRadius="30dp" />
<stroke
android:width="2dp"
android:color="@color/colorPrimaryDark" />
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:padding="10dp"
android:shape="rectangle"
>
<solid android:color="#FFFFFF"></solid>
<corners
android:bottomLeftRadius="30dp"
android:bottomRightRadius="30dp"
android:topLeftRadius="30dp"
android:topRightRadius="30dp" />
<stroke
android:width="2dp"
android:color="@color/colorPrimaryDark" />
</shape>
\ No newline at end of file
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:padding="10dp"
android:shape="rectangle" >
<solid android:color="@color/colorPrimaryDark" />
<corners
android:bottomLeftRadius="20dp"
android:bottomRightRadius="20dp"
android:topLeftRadius="20dp"
android:topRightRadius="20dp" />
<stroke
android:width="1dp"
android:color="@color/colorPrimaryDark" />
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:padding="10dp"
android:shape="rectangle" >
<solid android:color="@color/colorPrimaryDark" />
<corners
android:bottomLeftRadius="20dp"
android:bottomRightRadius="20dp"
android:topLeftRadius="20dp"
android:topRightRadius="20dp" />
<stroke
android:width="1dp"
android:color="@color/colorPrimaryDark" />
</shape>
\ No newline at end of file
......
<?xml version="1.0" encoding="utf-8"?>
<font-family xmlns:android="http://schemas.android.com/apk/res/android">
<font
android:fontStyle = "normal"
android:fontWeight="400"
android:font = "@font/noto"/>
<font
android:fontStyle = "normal"
android:fontWeight = "400"
android:font = "@font/beba"/>
<?xml version="1.0" encoding="utf-8"?>
<font-family xmlns:android="http://schemas.android.com/apk/res/android">
<font
android:fontStyle = "normal"
android:fontWeight="400"
android:font = "@font/noto"/>
<font
android:fontStyle = "normal"
android:fontWeight = "400"
android:font = "@font/beba"/>
</font-family>
\ No newline at end of file
......
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.suemin.smartwindow.view.MainActivity"
>
<android.support.v7.widget.Toolbar
android:id="@+id/tb"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorPrimaryDark">
<ImageView
android:layout_width="32dp"
android:layout_height="30dp"
android:src="@drawable/icon"
android:paddingTop="8dp"
android:layout_marginRight="5dp"/>
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="left"
android:text="@string/app_name"
android:fontFamily="@font/beba"
android:textColor="@color/colorAccent"
android:textSize="21dp"
android:textStyle="bold"
/>
</android.support.v7.widget.Toolbar>
<FrameLayout
android:id="@+id/frameLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="?attr/actionBarSize"
android:layout_marginBottom="?attr/actionBarSize"
/>
<android.support.design.widget.BottomNavigationView
android:id="@+id/navigation"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="0dp"
android:layout_marginEnd="0dp"
android:background="@color/colorPrimaryDark"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:menu="@menu/navigation" />
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.suemin.smartwindow.view.MainActivity"
>
<android.support.v7.widget.Toolbar
android:id="@+id/tb"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorPrimaryDark">
<ImageView
android:layout_width="32dp"
android:layout_height="30dp"
android:src="@drawable/icon"
android:paddingTop="8dp"
android:layout_marginRight="5dp"/>
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="left"
android:text="@string/app_name"
android:fontFamily="@font/beba"
android:textColor="@color/colorAccent"
android:textSize="21dp"
android:textStyle="bold"
/>
</android.support.v7.widget.Toolbar>
<FrameLayout
android:id="@+id/frameLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="?attr/actionBarSize"
android:layout_marginBottom="?attr/actionBarSize"
/>
<android.support.design.widget.BottomNavigationView
android:id="@+id/navigation"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="0dp"
android:layout_marginEnd="0dp"
android:background="@color/colorPrimaryDark"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:menu="@menu/navigation" />
</android.support.constraint.ConstraintLayout>
\ No newline at end of file
......
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<TextView
android:id="@+id/bt_textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:gravity="left"
android:text="name"
android:textColor="@color/colorAccent"
android:fontFamily="@font/noto"
android:textSize="21dp"
/>
<TextView
android:id="@+id/bt_textView_addr"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:gravity="left"
android:text="addr"
android:textColor="@color/colorAccent"
android:textSize="14dp"
android:layout_below="@+id/bt_textView"
/>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<TextView
android:id="@+id/bt_textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:gravity="left"
android:text="name"
android:textColor="@color/colorAccent"
android:fontFamily="@font/noto"
android:textSize="21dp"
/>
<TextView
android:id="@+id/bt_textView_addr"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:gravity="left"
android:text="addr"
android:textColor="@color/colorAccent"
android:textSize="14dp"
android:layout_below="@+id/bt_textView"
/>
</RelativeLayout>
\ No newline at end of file
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
>
<LinearLayout
android:layout_width="250dp"
android:layout_height="wrap_content"
android:paddingBottom="15dp"
android:paddingTop="15dp"
android:gravity="center"
android:orientation="vertical"
android:background="@drawable/dialog_background">
<TextView
android:id="@+id/dialog_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:textSize="20dp" />
<TextView
android:id="@+id/dialog_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:textSize="60dp" />
<TextView
android:id="@+id/dialog_state"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="15dp"
android:textSize="15dp" />
<Button
android:id="@+id/pbutton"
android:layout_width="50dp"
android:layout_height="25dp"
android:layout_marginBottom="10dp"
android:background="@drawable/dialog_button_background"
android:text="OK"
android:textColor="@color/colorAccent"/>
</LinearLayout>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
>
<LinearLayout
android:layout_width="250dp"
android:layout_height="wrap_content"
android:paddingBottom="15dp"
android:paddingTop="15dp"
android:gravity="center"
android:orientation="vertical"
android:background="@drawable/dialog_background">
<TextView
android:id="@+id/dialog_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:textSize="20dp" />
<TextView
android:id="@+id/dialog_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:textSize="60dp" />
<TextView
android:id="@+id/dialog_state"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="15dp"
android:textSize="15dp" />
<Button
android:id="@+id/pbutton"
android:layout_width="50dp"
android:layout_height="25dp"
android:layout_marginBottom="10dp"
android:background="@drawable/dialog_button_background"
android:text="OK"
android:textColor="@color/colorAccent"/>
</LinearLayout>
</LinearLayout>
......
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.suemin.smartwindow.view.bluetooth.Bluetooth"
android:background="@color/colorPrimaryDark">
<TextView
android:layout_width="wrap_content"
android:layout_height="22dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="5dp"
android:text="검색된 기기"
android:textSize="12dp"
android:textStyle="bold"
android:textColor="#a04e4e4e"/>
<ListView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp">
</ListView>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="60dp"
android:layout_gravity="bottom"
android:paddingBottom="15dp">
<Button
android:id="@+id/bt_find_btn"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_marginRight="20dp"
android:background="@drawable/sync"
/>
</RelativeLayout>
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.suemin.smartwindow.view.bluetooth.Bluetooth"
android:background="@color/colorPrimaryDark">
<TextView
android:layout_width="wrap_content"
android:layout_height="22dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="5dp"
android:text="검색된 기기"
android:textSize="12dp"
android:textStyle="bold"
android:textColor="#a04e4e4e"/>
<ListView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp">
</ListView>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="60dp"
android:layout_gravity="bottom"
android:paddingBottom="15dp">
<Button
android:id="@+id/bt_find_btn"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_marginRight="20dp"
android:background="@drawable/sync"
/>
</RelativeLayout>
</FrameLayout>
\ No newline at end of file
......
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context="com.example.suemin.smartwindow.view.environment.Env"
android:background="@color/colorPrimaryDark">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<!-- TODO: Update blank fragment layout -->
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="20dp"
android:layout_marginTop="10dp"
>
<ImageView
android:layout_width="10dp"
android:layout_height="10dp"
android:layout_marginStart="7dp"
android:id="@+id/imageView1"
android:layout_centerVertical="true"
android:src="@drawable/icon_loca"
/>
<TextView
android:id="@+id/location_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="1dp"
android:layout_marginStart="2dp"
android:layout_toRightOf="@+id/imageView1"
android:text="위치 확인중..."
android:textColor="@color/colorAccent"
android:textSize="12dp"/>
</RelativeLayout>
<ListView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context="com.example.suemin.smartwindow.view.environment.Env"
android:background="@color/colorPrimaryDark">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<!-- TODO: Update blank fragment layout -->
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="20dp"
android:layout_marginTop="10dp"
>
<ImageView
android:layout_width="10dp"
android:layout_height="10dp"
android:layout_marginStart="7dp"
android:id="@+id/imageView1"
android:layout_centerVertical="true"
android:src="@drawable/icon_loca"
/>
<TextView
android:id="@+id/location_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="1dp"
android:layout_marginStart="2dp"
android:layout_toRightOf="@+id/imageView1"
android:text="위치 확인중..."
android:textColor="@color/colorAccent"
android:textSize="12dp"/>
</RelativeLayout>
<ListView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>
</FrameLayout>
\ No newline at end of file
......
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context="com.example.suemin.smartwindow.view.home.Home"
android:background="@color/colorPrimaryDark">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:id="@+id/imageView2"
android:layout_width="197dp"
android:layout_height="200dp"
android:layout_marginTop="80dp"
android:layout_marginBottom="50dp"
android:adjustViewBounds="true"
android:src="@drawable/window_closed"
android:layout_centerHorizontal="true"
/>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="100dp"
android:layout_below="@id/imageView2"
android:layout_centerHorizontal="true"
>
<Switch
android:id="@+id/switch1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
/>
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/switch1"
android:layout_centerHorizontal="true"
android:textColor="@color/colorAccent"
android:text="현재 창문 상태는"
android:textSize="17dp" />
<TextView
android:id="@+id/textView_switch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/noto"
android:text="“ 닫힘 ”"
android:textSize="25dp"
android:textStyle="bold"
android:textColor="@color/colorAccent"
android:layout_below="@id/textView2"
android:layout_centerHorizontal="true"
/>
</RelativeLayout>
</RelativeLayout>
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context="com.example.suemin.smartwindow.view.home.Home"
android:background="@color/colorPrimaryDark">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:id="@+id/imageView2"
android:layout_width="197dp"
android:layout_height="200dp"
android:layout_marginTop="80dp"
android:layout_marginBottom="50dp"
android:adjustViewBounds="true"
android:src="@drawable/window_closed"
android:layout_centerHorizontal="true"
/>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="100dp"
android:layout_below="@id/imageView2"
android:layout_centerHorizontal="true"
>
<Switch
android:id="@+id/switch1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
/>
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/switch1"
android:layout_centerHorizontal="true"
android:textColor="@color/colorAccent"
android:text="현재 창문 상태는"
android:textSize="17dp" />
<TextView
android:id="@+id/textView_switch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/noto"
android:text="“ 닫힘 ”"
android:textSize="25dp"
android:textStyle="bold"
android:textColor="@color/colorAccent"
android:layout_below="@id/textView2"
android:layout_centerHorizontal="true"
/>
</RelativeLayout>
</RelativeLayout>
</FrameLayout>
\ No newline at end of file
......
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp">
<LinearLayout android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp">
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="State : "
android:textSize="18sp"/>
<Space android:layout_width="5dp"
android:layout_height="wrap_content"/>
<TextView android:id="@+id/connection_state"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="no_data"
android:textSize="18sp"/>
</LinearLayout>
<LinearLayout android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp">
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Data : "
android:id="@+id/device_name"
android:textSize="18sp"/>
<Space android:layout_width="5dp"
android:layout_height="wrap_content"/>
<TextView android:id="@+id/data_value"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="no_data"
android:textSize="18sp"/>
</LinearLayout>
<ExpandableListView android:id="@+id/gatt_services_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp">
<LinearLayout android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp">
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="State : "
android:textSize="18sp"/>
<Space android:layout_width="5dp"
android:layout_height="wrap_content"/>
<TextView android:id="@+id/connection_state"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="no_data"
android:textSize="18sp"/>
</LinearLayout>
<LinearLayout android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp">
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Data : "
android:id="@+id/device_name"
android:textSize="18sp"/>
<Space android:layout_width="5dp"
android:layout_height="wrap_content"/>
<TextView android:id="@+id/data_value"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="no_data"
android:textSize="18sp"/>
</LinearLayout>
<ExpandableListView android:id="@+id/gatt_services_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
......
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="start">
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="15dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:gravity="fill_horizontal"
android:fontFamily="@font/noto"
android:text="New Text"
android:layout_toRightOf="@id/imageView1"
android:textColor="@color/colorAccent"
android:textSize="21dp" />
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:id="@+id/imageView1"
android:layout_marginLeft="5dp"
android:layout_centerVertical="true"
android:src="@drawable/ic_cloud_queue_black_24dp"
/>
</RelativeLayout>
</RelativeLayout>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="start">
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="15dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:gravity="fill_horizontal"
android:fontFamily="@font/noto"
android:text="New Text"
android:layout_toRightOf="@id/imageView1"
android:textColor="@color/colorAccent"
android:textSize="21dp" />
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:id="@+id/imageView1"
android:layout_marginLeft="5dp"
android:layout_centerVertical="true"
android:src="@drawable/ic_cloud_queue_black_24dp"
/>
</RelativeLayout>
</RelativeLayout>
......
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<TextView
android:id="@+id/sv_textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:gravity="left"
android:text="name"
android:textColor="@color/colorAccent"
android:fontFamily="@font/noto"
android:textSize="21dp"
/>
<TextView
android:id="@+id/sv_uuid"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:gravity="left"
android:text="addr"
android:textColor="@color/colorAccent"
android:textSize="14dp"
android:layout_below="@+id/sv_textView"
/>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<TextView
android:id="@+id/sv_textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:gravity="left"
android:text="name"
android:textColor="@color/colorAccent"
android:fontFamily="@font/noto"
android:textSize="21dp"
/>
<TextView
android:id="@+id/sv_uuid"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:gravity="left"
android:text="addr"
android:textColor="@color/colorAccent"
android:textSize="14dp"
android:layout_below="@+id/sv_textView"
/>
</RelativeLayout>
\ No newline at end of file
......
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/navigation_bt"
android:title="BT"
android:icon="@drawable/ic_bluetooth_black_24dp"
app:showAsAction="always"
/>
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/navigation_bt"
android:title="BT"
android:icon="@drawable/ic_bluetooth_black_24dp"
app:showAsAction="always"
/>
</menu>
\ No newline at end of file
......
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/navigation_home"
android:icon="@drawable/ic_home_black_24dp"
android:title="@string/title_home"
/>
<item
android:id="@+id/navigation_env"
android:icon="@drawable/ic_cloud_queue_black_24dp"
android:title="@string/title_activity_main2" />
<item
android:id="@+id/navigation_bt"
android:icon="@drawable/ic_bluetooth_black_24dp"
android:title="@string/title_activity_main33" />
</menu>
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/navigation_home"
android:icon="@drawable/ic_home_black_24dp"
android:title="@string/title_home"
/>
<item
android:id="@+id/navigation_env"
android:icon="@drawable/ic_cloud_queue_black_24dp"
android:title="@string/title_activity_main2" />
<item
android:id="@+id/navigation_bt"
android:icon="@drawable/ic_bluetooth_black_24dp"
android:title="@string/title_activity_main33" />
</menu>
......
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
\ No newline at end of file
......
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
\ No newline at end of file
......
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#000000</color>
<color name="colorPrimaryDark">#7899ddff</color>
<color name="colorAccent">#f0646a71</color>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#000000</color>
<color name="colorPrimaryDark">#7899ddff</color>
<color name="colorAccent">#f0646a71</color>
</resources>
......
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
<dimen name="text_margin">16dp</dimen>
</resources>
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
<dimen name="text_margin">16dp</dimen>
</resources>
......
<resources>
<string name="app_name">SMART WINDOW</string>
<string name="title_home">Home</string>
<string name="title_activity_main2">Environment</string>
<string name="title_activity_main33">Bluetooth</string>
<string name="connected">Connected</string>
<string name="disconnected">Disconnected</string>
<string name="addr_m">90:E2:02:8F:36:70</string>
<string name="addr_d">90:E2:02:8E:1F:21</string>
<string name="addr_r">90:E2:02:92:A9:0E</string>
</resources>
<resources>
<string name="app_name">SMART WINDOW</string>
<string name="title_home">Home</string>
<string name="title_activity_main2">Environment</string>
<string name="title_activity_main33">Bluetooth</string>
<string name="connected">Connected</string>
<string name="disconnected">Disconnected</string>
<string name="addr_m">90:E2:02:8F:36:70</string>
<string name="addr_d">90:E2:02:8E:1F:21</string>
<string name="addr_r">90:E2:02:92:A9:0E</string>
</resources>
......
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
</resources>
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
</resources>
......
package com.example.suemin.smartwindow;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
package com.example.suemin.smartwindow;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}
\ No newline at end of file
......
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
......
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
......
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
......