i'm using navigation component in my android app. i have a search edit text on that i attach a text watcher.
when that search edit text come into focus i open a seach fragment but under seach edit text. both pages are in live state .
this code is inside my home viewmodel
val searchMData: MutableEventLiveData<String> = MutableEventLiveData()
val searchLiveData: LiveData<String>
from home activity i post value inside my ( searchMData ) throughout textwatcher
and i want to observe ( searchLiveData ) Inside my Search Fragment.
i'm using navigation component in my android app. i have a search edit text on that i attach a text watcher. when that search edit text come into focus i open a seach fragment but under seach edit text. both pages are in live state .
this code is inside my home viewmodel
from home activity i post value inside my ( searchMData ) throughout textwatcher and i want to observe ( searchLiveData ) Inside my Search Fragment.
please help......