*
* Privacy Browser Android is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* Privacy Browser Android is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
private lateinit var findOnPageLinearLayout: LinearLayout
private lateinit var fullScreenVideoFrameLayout: FrameLayout
private lateinit var initialGrayColorSpan: ForegroundColorSpan
private lateinit var findOnPageLinearLayout: LinearLayout
private lateinit var fullScreenVideoFrameLayout: FrameLayout
private lateinit var initialGrayColorSpan: ForegroundColorSpan
private lateinit var navigationBackMenuItem: MenuItem
private lateinit var navigationForwardMenuItem: MenuItem
private lateinit var navigationHistoryMenuItem: MenuItem
private lateinit var navigationBackMenuItem: MenuItem
private lateinit var navigationForwardMenuItem: MenuItem
private lateinit var navigationHistoryMenuItem: MenuItem
// Display the keyboard. `0` sets no input flags.
inputMethodManager.showSoftInput(findOnPageEditText, 0)
}, 200)
// Display the keyboard. `0` sets no input flags.
inputMethodManager.showSoftInput(findOnPageEditText, 0)
}, 200)
@SuppressLint("ClickableViewAccessibility")
private fun initializeApp() {
// Get a handle for the input method.
@SuppressLint("ClickableViewAccessibility")
private fun initializeApp() {
// Get a handle for the input method.
// Initialize the color spans for highlighting the URLs.
initialGrayColorSpan = ForegroundColorSpan(getColor(R.color.gray_500))
// Initialize the color spans for highlighting the URLs.
initialGrayColorSpan = ForegroundColorSpan(getColor(R.color.gray_500))
// Search for the string on the page whenever a character changes in the find on page edit text.
findOnPageEditText.addTextChangedListener(object : TextWatcher {
// Search for the string on the page whenever a character changes in the find on page edit text.
findOnPageEditText.addTextChangedListener(object : TextWatcher {
- override fun beforeTextChanged(s: CharSequence, start: Int, count: Int, after: Int) {}
+ override fun beforeTextChanged(charSequence: CharSequence, start: Int, count: Int, after: Int) {
+ // Do nothing.
+ }
- override fun onTextChanged(s: CharSequence, start: Int, before: Int, count: Int) {}
+ override fun onTextChanged(charSequence: CharSequence, start: Int, before: Int, count: Int) {
+ // Do nothing.
+ }
// Search for the text in the WebView if it is not null. Sometimes on resume after a period of non-use the WebView will be null.
currentWebView?.findAllAsync(findOnPageEditText.text.toString())
}
// Search for the text in the WebView if it is not null. Sometimes on resume after a period of non-use the WebView will be null.
currentWebView?.findAllAsync(findOnPageEditText.text.toString())
}