mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-28 16:00:31 +05:30
fix searchview
This commit is contained in:
parent
74f2542da9
commit
32bd35aa48
@ -1,72 +0,0 @@
|
|||||||
{
|
|
||||||
"version": 3,
|
|
||||||
"artifactType": {
|
|
||||||
"type": "APK",
|
|
||||||
"kind": "Directory"
|
|
||||||
},
|
|
||||||
"applicationId": "com.github.libretube",
|
|
||||||
"variantName": "release",
|
|
||||||
"elements": [
|
|
||||||
{
|
|
||||||
"type": "UNIVERSAL",
|
|
||||||
"filters": [],
|
|
||||||
"attributes": [],
|
|
||||||
"versionCode": 21,
|
|
||||||
"versionName": "0.7.0",
|
|
||||||
"outputFile": "app-universal-release.apk"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "ONE_OF_MANY",
|
|
||||||
"filters": [
|
|
||||||
{
|
|
||||||
"filterType": "ABI",
|
|
||||||
"value": "armeabi-v7a"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"attributes": [],
|
|
||||||
"versionCode": 21,
|
|
||||||
"versionName": "0.7.0",
|
|
||||||
"outputFile": "app-armeabi-v7a-release.apk"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "ONE_OF_MANY",
|
|
||||||
"filters": [
|
|
||||||
{
|
|
||||||
"filterType": "ABI",
|
|
||||||
"value": "arm64-v8a"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"attributes": [],
|
|
||||||
"versionCode": 21,
|
|
||||||
"versionName": "0.7.0",
|
|
||||||
"outputFile": "app-arm64-v8a-release.apk"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "ONE_OF_MANY",
|
|
||||||
"filters": [
|
|
||||||
{
|
|
||||||
"filterType": "ABI",
|
|
||||||
"value": "x86_64"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"attributes": [],
|
|
||||||
"versionCode": 21,
|
|
||||||
"versionName": "0.7.0",
|
|
||||||
"outputFile": "app-x86_64-release.apk"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "ONE_OF_MANY",
|
|
||||||
"filters": [
|
|
||||||
{
|
|
||||||
"filterType": "ABI",
|
|
||||||
"value": "x86"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"attributes": [],
|
|
||||||
"versionCode": 21,
|
|
||||||
"versionName": "0.7.0",
|
|
||||||
"outputFile": "app-x86-release.apk"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"elementType": "File"
|
|
||||||
}
|
|
@ -52,6 +52,7 @@ class MainActivity : BaseActivity() {
|
|||||||
val autoRotationEnabled = PreferenceHelper.getBoolean(PreferenceKeys.AUTO_ROTATION, false)
|
val autoRotationEnabled = PreferenceHelper.getBoolean(PreferenceKeys.AUTO_ROTATION, false)
|
||||||
|
|
||||||
lateinit var searchView: SearchView
|
lateinit var searchView: SearchView
|
||||||
|
lateinit var searchItem: MenuItem
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
@ -202,6 +203,8 @@ class MainActivity : BaseActivity() {
|
|||||||
private fun removeSearchFocus() {
|
private fun removeSearchFocus() {
|
||||||
searchView.setQuery("", false)
|
searchView.setQuery("", false)
|
||||||
searchView.clearFocus()
|
searchView.clearFocus()
|
||||||
|
searchView.isIconified = true
|
||||||
|
searchItem.collapseActionView()
|
||||||
searchView.onActionViewCollapsed()
|
searchView.onActionViewCollapsed()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -211,6 +214,7 @@ class MainActivity : BaseActivity() {
|
|||||||
|
|
||||||
// stuff for the search in the topBar
|
// stuff for the search in the topBar
|
||||||
val searchItem = menu.findItem(R.id.action_search)
|
val searchItem = menu.findItem(R.id.action_search)
|
||||||
|
this.searchItem = searchItem
|
||||||
searchView = searchItem.actionView as SearchView
|
searchView = searchItem.actionView as SearchView
|
||||||
|
|
||||||
val searchViewModel = ViewModelProvider(this)[SearchViewModel::class.java]
|
val searchViewModel = ViewModelProvider(this)[SearchViewModel::class.java]
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
package com.github.libretube.util
|
|
||||||
|
|
||||||
object LayoutHelper
|
|
Loading…
x
Reference in New Issue
Block a user