package Ġcom . rm n iv nv . crypt omo on . ui . news Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . support . v 4 . app . Dialog Fragment Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . View Ċ import Ġandroid . view . ViewGroup Ċ import Ġcom . rm n iv nv . crypt omo on . R Ċ import Ġcom . rm n iv nv . crypt omo on . model . r xb us . Rx Bus Ċ import Ġcom . rm n iv nv . crypt omo on . model . r xb us . Search Hash Tag Updated Ċ import Ġkotlinx . android . synt hetic . main . search _ dialog .* Ċ Ċ /** Ċ Ġ* ĠCreated Ġby Ġr mn iv nv Ġon Ġ 0 9 / 1 2 / 2 0 1 7 . Ċ Ġ*/ Ċ class ĠSearch Dialog Ġ: ĠDialog Fragment () Ġ{ ĊĊĠĠĠ Ġprivate Ġvar Ġhash Tag : ĠString ? Ġ= Ġnull ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠĠĠĠĠ Ġhash Tag Ġ= Ġarguments ?. getString (" query ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate View ( in flater : ĠLayoutInflater , Ġcontainer : ĠViewGroup ?, ĠsavedInstanceState : ĠBundle ?) Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ Ġinflater . inflate ( R . layout . search _ dialog , Ġcontainer , Ġfalse ) !! ĊĊĠĠĠ Ġoverride Ġfun Ġon View Created ( view : ĠView , ĠsavedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on View Created ( view , ĠsavedInstanceState ) ĊĠĠĠĠĠĠĠ Ġsearch _ cancel . setOnClickListener Ġ{ Ġdismiss () Ġ} ĊĠĠĠĠĠĠĠ Ġsearch _ ok . setOnClickListener Ġ{ Ġon Ok Clicked () Ġ} ĊĠĠĠĠĠĠĠ Ġsearch _ text . setText ( hash Tag ) ĊĠĠĠĠĠĠĠ Ġsearch _ text . setSelection ( search _ text . text . length ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġon Ok Clicked () Ġ{ ĊĠĠĠĠĠĠĠ ĠRx Bus . publish ( Search Hash Tag Updated ( search _ text . text . toString ())) ĊĠĠĠĠĠĠĠ Ġdismiss () ĊĠĠĠ Ġ} Ċ }