Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 10 additions & 0 deletions FoodChain2/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
*.iml
.gradle
/local.properties
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
.DS_Store
/build
/captures
.externalNativeBuild
Binary file added FoodChain2/.idea/caches/build_file_checksums.ser
Binary file not shown.
29 changes: 29 additions & 0 deletions FoodChain2/.idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions FoodChain2/.idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 34 additions & 0 deletions FoodChain2/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions FoodChain2/.idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions FoodChain2/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions FoodChain2/app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
60 changes: 60 additions & 0 deletions FoodChain2/app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 27
defaultConfig {
applicationId "com.team.foodchain"
minSdkVersion 22
targetSdkVersion 27
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(include: ['*.jar'], dir: 'libs')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.android.support:gridlayout-v7:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
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'
implementation 'com.android.support:cardview-v7:27.1.1'

implementation 'com.github.bumptech.glide:glide:4.7.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.7.1'

implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {

exclude group: 'com.android.support', module: 'support-annotations'

})
implementation 'com.android.support:appcompat-v7:27.+'
testImplementation 'junit:junit:4.12'
// 카카오톡 SDK 추가

//compile group: project.KAKAO_SDK_GROUP,
// name: 'usermgmt',
// version: project.KAKAO_SDK_VERSION

implementation 'com.google.android.gms:play-services:8.4.0'
implementation 'com.google.android.gms:play-services-ads:8.4.0'
implementation 'com.google.android.gms:play-services-analytics:8.4.0'

}
21 changes: 21 additions & 0 deletions FoodChain2/app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.team.foodchain

import android.support.test.InstrumentationRegistry
import android.support.test.runner.AndroidJUnit4

import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Assert.*

/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getTargetContext()
assertEquals("com.team.foodchain", appContext.packageName)
}
}
37 changes: 37 additions & 0 deletions FoodChain2/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.team.foodchain">

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<!--<uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY"/>-->

<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">
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyBwysSNTDdHO68Vlu1k3iIYC3XJan3glJI" />
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!--<activity android:name=".MainActivity"></activity>-->
<activity android:name=".JoinActivity"></activity>
<activity android:name=".UserJoinActivity"></activity>
<activity android:name=".MasterJoinActivity"></activity>
<activity android:name=".ChoiceActivity"></activity>
<activity android:name=".HomeActivity"></activity>
<activity android:name=".AddressActivity"></activity>
</application>

</manifest>
14 changes: 14 additions & 0 deletions FoodChain2/app/src/main/java/com/team/foodchain/Address2.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.team.foodchain

import android.os.Bundle
import android.support.v4.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup

class Address2 : Fragment() {
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
val v = inflater!!.inflate(R.layout.frame_address2, container, false)
return v
}
}
52 changes: 52 additions & 0 deletions FoodChain2/app/src/main/java/com/team/foodchain/AddressActivity.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
package com.team.foodchain

import android.support.v7.app.AlertDialog
import android.support.v7.app.AppCompatActivity
import android.view.View
import kotlinx.android.synthetic.main.activity_address.*

//var isLocate = 0

class AddressActivity : AppCompatActivity(), View.OnClickListener {
override fun onClick(v: View?) {
// when(v){
// ->{
// setContentView(R.layout.frame_address2)
// }
// }
when(v){
address_location_btn -> {
val builder = AlertDialog.Builder(this@AddressActivity)

builder.setMessage("우리 동네에 입장하시겠어요?")
builder.setPositiveButton("취소") { dialog, which ->
setContentView(R.layout.frame_address2)
// root_layout.setBackgroundColor(Color.TRANSPARENT)
}

builder.setNeutralButton("입장하기") { dialog, which ->
setContentView(R.layout.frame_main)
// root_layout.setBackgroundColor(Color.TRANSPARENT)
}

val dialog: AlertDialog = builder.create()

dialog.show()
}
}
}


// if (ContextCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION)
// == PackageManager.PERMISSION_GRANTED) {
// isLocate = 1
// } else {
// isLocate = 0
// ActivityCompat.requestPermissions(this, arrayOf(android.Manifest.permission.ACCESS_FINE_LOCATION), 0)
// finish()
// }



}

14 changes: 14 additions & 0 deletions FoodChain2/app/src/main/java/com/team/foodchain/AlarmTab.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.team.foodchain

import android.os.Bundle
import android.support.v4.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup

class AlarmTab : Fragment() {
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
val v = inflater!!.inflate(R.layout.fragment_alarm, container, false)
return v
}
}
27 changes: 27 additions & 0 deletions FoodChain2/app/src/main/java/com/team/foodchain/ChoiceActivity.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package com.team.foodchain

import android.content.Intent
import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import android.view.View
import kotlinx.android.synthetic.main.activity_choice.*

var isFirst = 0

class ChoiceActivity : AppCompatActivity(), View.OnClickListener {
override fun onClick(v: View?) {
when(v){
choice_confirm_tv -> {
val intent = Intent(applicationContext, HomeActivity::class.java)
startActivity(intent)
}
}
}

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_choice)
choice_confirm_tv.setOnClickListener(this)
isFirst = 1
}
}
Loading