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
| autoload -Uz compinit && compinit | |
| autoload -Uz add-zsh-hook | |
| autoload -Uz vcs_info | |
| add-zsh-hook precmd vcs_info | |
| zstyle ':vcs_info:*' enable git | |
| zstyle ':vcs_info:*' formats " %F{cyan}%c%u(%b)%f" | |
| zstyle ':vcs_info:*' actionformats " %F{cyan}%c%u(%b)%f %a" | |
| zstyle ':vcs_info:*' stagedstr "%F{green}" |
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.gradle (app) | |
| android { | |
| ... | |
| buildFeatures { | |
| compose = true | |
| } | |
| composeOptions { | |
| kotlinCompilerExtensionVersion = "1.3.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
| <?xml version="1.0" encoding="utf-8"?> | |
| <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| xmlns:app="http://schemas.android.com/apk/res-auto" | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent" | |
| android:background="#ffffff"> | |
| <com.google.android.material.button.MaterialButton | |
| android:id="@+id/button1" | |
| android:layout_width="0dp" |
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
| override fun onCreate(savedInstance: bundle?) { | |
| super.onCreate(savedInstance) | |
| with(search_edittext) { | |
| viewModel.processSearchTextChanges(this.textChanges()) | |
| } | |
| } | |
| // observing the auto suggestion search results | |
| viewModel.searchAutoSuggestionLiveData.observe(this, Observer { | |
| autoSuggestionResponse -> |
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
| var searchResponseLiveData : MutableLiveData<SearchResponse> = MutableLiveData() | |
| var searchProgressBarLiveData : MutableLiveData<Boolean> = MutableLiveData() | |
| /** | |
| * Method to observe the text changes and filter out the appropriate stream to make the api call. | |
| */ | |
| fun processSearchTextChanges(changedText: InitialValueObservable<CharSequence>) { | |
| compositeDisposable.add( | |
| changedText | |
| .skipInitialValue() |
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
| android.support.v7.widget.CardView -> androidx.cardview.widget.CardView | |
| android.support.constraint.Group -> androidx.constraintlayout.widget.Group | |
| androidx.appcompat.widget.GridLayout -> androidx.gridlayout.widget.GridLayout |
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
| android.useAndroidX=true | |
| android.enableJetifier=true |