Last active
October 13, 2019 10:46
-
-
Save BoxResin/c3fd99a5d822ecd246d2096aec4ac9a1 to your computer and use it in GitHub Desktop.
Android Startup Non-Stable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- 메인 액티비티 레이아웃 --> | |
<androidx.constraintlayout.widget.ConstraintLayout | |
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 = ".MainActivity"> | |
</androidx.constraintlayout.widget.ConstraintLayout> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- 안드로이드 매니페스트 --> | |
<manifest | |
package = "boxresin.app.barcodescanner" | |
xmlns:android = "http://schemas.android.com/apk/res/android" | |
xmlns:tools = "http://schemas.android.com/tools"> | |
<application | |
android:allowBackup = "false" | |
android:icon = "@mipmap/ic_launcher" | |
android:label = "@string/app_name" | |
android:roundIcon = "@mipmap/ic_launcher_round" | |
android:supportsRtl = "false" | |
android:theme = "@style/AppTheme" | |
tools:ignore = "GoogleAppIndexingWarning"> | |
<!-- 메인 액티비티 --> | |
<activity android:name = ".MainActivity"> | |
<intent-filter> | |
<action android:name = "android.intent.action.MAIN"/> | |
<category android:name = "android.intent.category.LAUNCHER"/> | |
</intent-filter> | |
</activity> | |
</application> | |
</manifest> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'com.android.application' | |
apply plugin: 'kotlin-android' | |
apply plugin: 'kotlin-android-extensions' | |
// 안드로이드 설정 | |
android { | |
compileSdkVersion 28 | |
defaultConfig { | |
applicationId 'boxresin.app.barcodescanner' | |
minSdkVersion 14 | |
targetSdkVersion 28 | |
versionCode 1 | |
versionName '1.0.0' | |
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' | |
vectorDrawables.useSupportLibrary = true | |
} | |
buildTypes { | |
// 디버그 APK 옵션 | |
debug { | |
applicationIdSuffix '.debug' | |
} | |
// 릴리즈 APK 옵션 | |
release { | |
minifyEnabled true | |
shrinkResources true | |
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | |
} | |
} | |
} | |
// 의존성 | |
dependencies { | |
// 로컬 JAR | |
implementation fileTree(dir: 'libs', include: ['*.jar']) | |
// 코틀린 | |
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" | |
// AndroidX | |
implementation 'androidx.appcompat:appcompat:1.0.0' | |
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha2' | |
// Android KTX | |
implementation 'androidx.core:core-ktx:1.0.0' | |
// 테스트 | |
testImplementation 'junit:junit:4.12' | |
// 안드로이드 테스트 | |
androidTestImplementation 'androidx.test:runner:1.1.0-beta02' | |
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-beta02' | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 빌드 파일 | |
build/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
ext.kotlin_version = '1.3.11' | |
repositories { | |
google() | |
jcenter() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:3.3.0-alpha13' | |
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" | |
} | |
} | |
allprojects { | |
repositories { | |
google() | |
jcenter() | |
} | |
} | |
task clean(type: Delete) { | |
delete rootProject.buildDir | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- 색상 리소스 --> | |
<resources> | |
<!-- 앱 색상 --> | |
<color name = "colorPrimary">#008577</color> | |
<color name = "colorPrimaryDark">#00574B</color> | |
<color name = "colorAccent">#D81B60</color> | |
</resources> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
org.gradle.jvmargs=-Xmx1536m | |
android.useAndroidX=true | |
android.enableJetifier=true | |
kotlin.code.style=official |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package boxresin.app.barcodescanner | |
import android.os.Bundle | |
import androidx.appcompat.app.AppCompatActivity | |
/** 메인 액티비티 */ | |
class MainActivity : AppCompatActivity() | |
{ | |
/** 메인 액티비티가 생성될 때 호출된다. */ | |
override fun onCreate(savedInstanceState: Bundle?) | |
{ | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_main) | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 빌드 파일 | |
build/ | |
# 프로젝트 설정 파일 | |
.idea/ | |
*.iml | |
local.properties | |
# Gradle 바이너리 파일 | |
.gradle/ | |
# OS 관련 파일 | |
.DS_Store | |
Thumbs.db |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- 문자열 리소스 --> | |
<resources> | |
<!-- 앱 이름 --> | |
<string name = "app_name">바코드 스캐너</string> | |
</resources> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- 스타일 리소스 --> | |
<resources> | |
<!-- 앱 테마 --> | |
<style name = "AppTheme" parent = "Theme.AppCompat.Light.NoActionBar"> | |
<item name = "colorPrimary">@color/colorPrimary</item> | |
<item name = "colorPrimaryDark">@color/colorPrimaryDark</item> | |
<item name = "colorAccent">@color/colorAccent</item> | |
</style> | |
</resources> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment