This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<android.support.v4.widget.DrawerLayout | |
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" | |
android:fitsSystemWindows="true"> | |
<android.support.design.widget.NavigationView | |
android:id="@+id/side_menu_layout" |
This file contains 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
fun testConcurrencyFunction(){ | |
Timer("thread_name_1").schedule(0) { | |
string?.let { | |
for (i in 1..10) { | |
Log.i(TRREAD1, "$i") | |
Log.i(TRREAD1, "string len: ${it.length}") | |
sleep(1000) | |
} | |
} | |
} |
This file contains 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
fun testConcurrencyFunction(){ | |
Timer("thread_name_1").schedule(0) { | |
string?.let{ | |
for (i in 1..10) { | |
Log.i(TRREAD1, "$i") | |
Log.i(TRREAD1, "string len: ${string!!.length}") | |
sleep(1000) | |
} | |
} | |
} |
This file contains 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
fun testConcurrencyFunction(){ | |
Timer("thread_name_1").schedule(0) { | |
if (string != null) { | |
for (i in 1..10) { | |
Log.i("thread_name_1", "$i") | |
Log.i("thread_name_1", "string len: ${string!!.length}") | |
sleep(1000) | |
} | |
} |
This file contains 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 from: "$project.rootDir/tools/applyCommon.gradle" | |
apply from: "$project.rootDir/tools/improveSpeed.gradle" | |
android { | |
... | |
signingConfigs { | |
release { |
This file contains 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
android { | |
flavorDimensions "minApi" | |
productFlavors { | |
production{ | |
} |
This file contains 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
ext.config = [ | |
applicationId : "com.example.thekhaeng.kotlinprojectstructure", | |
compileSdkVersion: 27, | |
minimumSdkVersion: 18, | |
targetSdkVersion : 27, | |
buildToolsVersion: "27.0.3" | |
] | |
def config = ext.config |
This file contains 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: 'kotlin-android' | |
apply plugin: 'kotlin-android-extensions' | |
apply from: "$project.rootDir/tools/config.gradle" | |
android{ | |
sourceSets { | |
main.java.srcDirs += 'src/main/kotlin' | |
debug.java.srcDirs += 'src/debug/kotlin' | |
release.java.srcDirs += 'src/release/kotlin' |
This file contains 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
/** Add module here **/ | |
includeFlat 'TabCommon' | |
List<Module> myModuleList = new ArrayList<>() | |
myModuleList.with { | |
add(new Module(name: ":AppProjectStructure", path: ":app")) | |
add(new Module(name: ":Common", path: "../TabCommon/Common")) | |
add(new Module(name: ":CommonApplication", path: "../TabCommon/CommonApplication")) | |
add(new Module(name: ":Library1", path: "../TabCommon/Library1")) |
This file contains 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
OkHttpClient.Builder builder = new OkHttpClient.Builder(); | |
// for resolve SSLHandshakeException at Android 7.0 only | |
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.N) { | |
builder.connectionSpecs(Arrays.asList( | |
ConnectionSpec.MODERN_TLS, | |
ConnectionSpec.CLEARTEXT, | |
new ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS) | |
.allEnabledTlsVersions() | |
.allEnabledCipherSuites() |