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"?> | |
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content"> | |
<android.support.v7.widget.CardView | |
android:id="@+id/cardView" | |
xmlns:android="http://schemas.android.com/apk/res/android" |
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 a class inherited Application for setup koin | |
class MyApp: Application() { | |
override fun onCreate() { | |
super.onCreate() | |
} | |
} | |
// presentation layer | |
object GreetContract { |
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 plugin: 'kotlin-android' | |
apply plugin: 'kotlin-android-extensions' | |
android { | |
compileSdkVersion 28 | |
defaultConfig { | |
applicationId "com.example.actionbartextcolor" |
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
class InputConfirmViewModel : ViewModel() { | |
// inputs | |
val inputStream = MutableLiveData<String>() | |
val inputClickBtn = MutableLiveData<Unit?>().apply { observeForever { | |
errorEventStream.value = | |
if(inputStream.value.isIntNum()) null else "not num" | |
} } | |
// outputs | |
val btnEnableStream = MediatorLiveData<Boolean>().apply { value = false }.also { enable -> | |
enable.addSource(inputStream) { ins: String -> |
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
class ExplodeFadeOut : Explode() { | |
init { | |
propagation = null | |
} | |
override fun onAppear(sceneRoot: ViewGroup?, view: View?, startValues: TransitionValues?, | |
endValues: TransitionValues?): Animator { | |
val explodeAnimator = super.onAppear(sceneRoot, view, startValues, endValues) | |
val fadeInAnimator = ObjectAnimator.ofFloat(view, View.ALPHA, 0f, 1f) |
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
class MainActivity : AppCompatActivity() { | |
val mainViewModel: MainViewModel by lazy { | |
ViewModelProviders.of(this).get(MainViewModel::class.java) | |
} | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_main) |
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
private fun getRootWindowPackageName(): String? = | |
InstrumentationRegistry | |
.getInstrumentation() | |
.uiAutomation | |
.rootInActiveWindow | |
?.packageName | |
?.toString() |
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
adb shell getevent -lt 2>&1 | tee "$(date +"%Y_%m_%d_%I_%M_%p").log" |
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
# .config/fish/conf.d/omf.fish | |
# Path to Oh My Fish install. | |
set -q XDG_DATA_HOME | |
and set -gx OMF_PATH "$XDG_DATA_HOME/omf" | |
or set -gx OMF_PATH "$HOME/.local/share/omf" | |
# Load Oh My Fish configuration. | |
source $OMF_PATH/init.fish | |
# set up java with jenv |
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
.zshrc |
OlderNewer