mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-01-07 18:10:31 +05:30
Merge pull request #115 from suraj0208/bugfix/fix-full-screen-button
Fix fullscreen button and keyboard search button
This commit is contained in:
commit
aa6762b1d1
@ -192,7 +192,6 @@ class PlayerFragment : Fragment() {
|
|||||||
view.findViewById<LinearLayout>(R.id.linLayout).visibility=View.GONE
|
view.findViewById<LinearLayout>(R.id.linLayout).visibility=View.GONE
|
||||||
val mainActivity = activity as MainActivity
|
val mainActivity = activity as MainActivity
|
||||||
mainActivity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_USER_LANDSCAPE
|
mainActivity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_USER_LANDSCAPE
|
||||||
mainActivity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED
|
|
||||||
isFullScreen=true
|
isFullScreen=true
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
|
@ -9,9 +9,11 @@ import android.view.LayoutInflater
|
|||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import android.view.WindowManager
|
import android.view.WindowManager
|
||||||
|
import android.view.inputmethod.EditorInfo
|
||||||
import android.view.inputmethod.InputMethodManager
|
import android.view.inputmethod.InputMethodManager
|
||||||
import android.widget.ArrayAdapter
|
import android.widget.ArrayAdapter
|
||||||
import android.widget.AutoCompleteTextView
|
import android.widget.AutoCompleteTextView
|
||||||
|
import android.widget.TextView.OnEditorActionListener
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.lifecycle.lifecycleScope
|
import androidx.lifecycle.lifecycleScope
|
||||||
import androidx.recyclerview.widget.GridLayoutManager
|
import androidx.recyclerview.widget.GridLayoutManager
|
||||||
@ -75,6 +77,17 @@ class SearchFragment : Fragment() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
autoTextView.setOnEditorActionListener(OnEditorActionListener { _, actionId, _ ->
|
||||||
|
if (actionId == EditorInfo.IME_ACTION_SEARCH) {
|
||||||
|
hideKeyboard();
|
||||||
|
autoTextView.dismissDropDown();
|
||||||
|
return@OnEditorActionListener true
|
||||||
|
}
|
||||||
|
false
|
||||||
|
})
|
||||||
|
autoTextView.setOnDismissListener {
|
||||||
|
hideKeyboard();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun fetchSuggestions(query: String, autoTextView: AutoCompleteTextView){
|
private fun fetchSuggestions(query: String, autoTextView: AutoCompleteTextView){
|
||||||
|
Loading…
Reference in New Issue
Block a user