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 kr.co.seoft.std_of_android_with_kt_mvvm_aac_mock.ui.sub | |
| import android.app.Activity | |
| import android.content.Intent | |
| import android.os.Bundle | |
| import android.view.View | |
| import androidx.lifecycle.Observer | |
| import androidx.lifecycle.ViewModelProviders | |
| import androidx.recyclerview.widget.DividerItemDecoration | |
| import androidx.recyclerview.widget.LinearLayoutManager |
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 kr.co.seoft.std_of_android_with_kt_mvvm_aac_mock | |
| import android.content.Context | |
| import androidx.arch.core.executor.testing.InstantTaskExecutorRule | |
| import androidx.lifecycle.LiveData | |
| import androidx.lifecycle.Observer | |
| import androidx.test.ext.junit.runners.AndroidJUnit4 | |
| import androidx.test.rule.ActivityTestRule | |
| import kr.co.seoft.std_of_android_with_kt_mvvm_aac_mock.data.BookRepo | |
| import kr.co.seoft.std_of_android_with_kt_mvvm_aac_mock.data.api.createGsonFactory |
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 kr.co.seoft.seoft_iot_server; | |
| import org.slf4j.Logger; | |
| import org.slf4j.LoggerFactory; | |
| import org.springframework.boot.SpringApplication; | |
| import org.springframework.boot.autoconfigure.SpringBootApplication; | |
| import java.util.Properties; | |
| @SpringBootApplication |
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 kr.co.seoft.std_of_android_with_kt_mvvm_aac_mock.ui.third | |
| import androidx.lifecycle.MutableLiveData | |
| import io.reactivex.Observable | |
| import io.reactivex.android.schedulers.AndroidSchedulers | |
| import io.reactivex.schedulers.Schedulers | |
| import kr.co.seoft.std_of_android_with_kt_mvvm_aac_mock.data.AppDatabase | |
| import kr.co.seoft.std_of_android_with_kt_mvvm_aac_mock.data.model.User | |
| import kr.co.seoft.std_of_android_with_kt_mvvm_aac_mock.ui.VMHelper | |
| import kr.co.seoft.std_of_android_with_kt_mvvm_aac_mock.util.e |
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: 'kotlin-kapt' | |
| // ...(중략)... | |
| dependencies { | |
| // for async logic | |
| implementation 'io.reactivex.rxjava2:rxandroid:2.1.1' | |
| // Room | |
| implementation "androidx.room:room-runtime:2.2.2" |
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
| actDadigRvCenter.addOnItemTouchListener(object : RecyclerView.OnItemTouchListener{ | |
| override fun onTouchEvent(rv: RecyclerView, e: MotionEvent) {} | |
| override fun onInterceptTouchEvent(rv: RecyclerView, event: MotionEvent): Boolean { | |
| // 처리 | |
| return false | |
| } | |
| override fun onRequestDisallowInterceptTouchEvent(disallowIntercept: Boolean) {} | |
| }) |
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
| class ClickableRecyclerViewInCl @JvmOverloads constructor( | |
| context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0 | |
| ) : ConstraintLayout(context, attrs, defStyleAttr) { | |
| val rv = RecyclerView(context) | |
| override fun onInterceptTouchEvent(ev: MotionEvent?): Boolean { | |
| return true | |
| } |
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
| val list1 = listOf<Int>(1, 2, 3) | |
| val list2 = listOf<Int>(7, 8, 9) | |
| val resultList1 = mutableListOf<Int>().apply { | |
| addAll(list1) | |
| add(4) | |
| add(5) | |
| add(6) | |
| addAll(list2) |
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
| val list1 = listOf<Int>(1, 2, 3) | |
| val list2 = listOf<Int>(7, 8, 9) | |
| val resultList1 = list1 + 4 + 5 + 6 + list2 |
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
| // 정의 | |
| fun String?.exist(completion: (String) -> Unit): String? { | |
| return if (this.isNullOrBlank()) { | |
| null | |
| } else { | |
| completion(this) | |
| this | |
| } | |
| } |
OlderNewer