Autoclose searchView

This commit is contained in:
ivan agosto 2019-02-10 00:03:21 -06:00
parent c07c15c766
commit 700559e28f
2 changed files with 2 additions and 8 deletions

View File

@ -236,6 +236,8 @@ class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelecte
override fun onQueryTextSubmit(p0: String?): Boolean { override fun onQueryTextSubmit(p0: String?): Boolean {
if(!p0.isNullOrBlank()){ if(!p0.isNullOrBlank()){
searchVal = p0 searchVal = p0
pagination = 0
searchView.onActionViewCollapsed()
searchVideos() searchVideos()
} }
return true return true

View File

@ -107,8 +107,6 @@ class Videos: Client() {
} }
} catch(err:Exception){ } catch(err:Exception){
err?.printStackTrace() err?.printStackTrace()
Log.d("TypeErr",err?.message ,err.cause)
Log.d("Error","fallo la coneccion")
} }
return videos return videos
} }
@ -137,8 +135,6 @@ class Videos: Client() {
} }
} catch(err:Exception){ } catch(err:Exception){
err?.printStackTrace() err?.printStackTrace()
Log.d("TypeErr",err?.message ,err.cause)
Log.d("Error","fallo la coneccion")
} }
return videos return videos
} }
@ -155,8 +151,6 @@ class Videos: Client() {
} }
} catch(err:Exception){ } catch(err:Exception){
err?.printStackTrace() err?.printStackTrace()
Log.d("TypeErr",err?.message ,err.cause)
Log.d("Error","fallo la coneccion")
} }
return videos return videos
} }
@ -174,8 +168,6 @@ class Videos: Client() {
} }
} catch(err:Exception){ } catch(err:Exception){
err?.printStackTrace() err?.printStackTrace()
Log.d("TypeErr",err?.message ,err.cause)
Log.d("Error","fallo la coneccion")
} }
return videos return videos
} }