feat: test ms response
This commit is contained in:
parent
10df1986e8
commit
fe1a7af7ac
5 changed files with 139 additions and 39 deletions
|
@ -1,5 +1,6 @@
|
||||||
package ani.dantotsu.parsers
|
package ani.dantotsu.parsers
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.core.view.isVisible
|
import androidx.core.view.isVisible
|
||||||
|
@ -17,16 +18,16 @@ class ExtensionTestItem(
|
||||||
private var extensionType: String,
|
private var extensionType: String,
|
||||||
private var testType: String,
|
private var testType: String,
|
||||||
private var extension: BaseParser,
|
private var extension: BaseParser,
|
||||||
private var searchString: String = "Chainsaw Man"
|
private var searchString: String
|
||||||
) : BindableItem<ItemExtensionTestBinding>() {
|
) : BindableItem<ItemExtensionTestBinding>() {
|
||||||
private lateinit var binding: ItemExtensionTestBinding
|
private lateinit var binding: ItemExtensionTestBinding
|
||||||
private lateinit var context: Context
|
private lateinit var context: Context
|
||||||
private var job: Job? = null
|
private var job: Job? = null
|
||||||
private var isRunning = false
|
private var isRunning = false
|
||||||
private var pingResult: Triple<Int, Int?, String>? = null
|
private var pingResult: Triple<Int, Int?, String>? = null
|
||||||
private var searchResultSize: Int? = null
|
private var searchResultData: TestResult = TestResult()
|
||||||
private var episodeResultSize: Int? = null
|
private var episodeResultData: TestResult = TestResult()
|
||||||
private var serverResultSize: Int? = null
|
private var serverResultData: TestResult = TestResult()
|
||||||
|
|
||||||
override fun bind(viewBinding: ItemExtensionTestBinding, position: Int) {
|
override fun bind(viewBinding: ItemExtensionTestBinding, position: Int) {
|
||||||
binding = viewBinding
|
binding = viewBinding
|
||||||
|
@ -36,6 +37,7 @@ class ExtensionTestItem(
|
||||||
binding.extensionLoading.isVisible = isRunning
|
binding.extensionLoading.isVisible = isRunning
|
||||||
hideAllResults()
|
hideAllResults()
|
||||||
|
|
||||||
|
println(searchString)
|
||||||
pingResult()
|
pingResult()
|
||||||
searchResult()
|
searchResult()
|
||||||
episodeResult()
|
episodeResult()
|
||||||
|
@ -65,9 +67,9 @@ class ExtensionTestItem(
|
||||||
|
|
||||||
fun startTest() {
|
fun startTest() {
|
||||||
pingResult = null
|
pingResult = null
|
||||||
searchResultSize = null
|
searchResultData = TestResult()
|
||||||
episodeResultSize = null
|
episodeResultData = TestResult()
|
||||||
serverResultSize = null
|
serverResultData = TestResult()
|
||||||
isRunning = true
|
isRunning = true
|
||||||
hideAllResults()
|
hideAllResults()
|
||||||
job?.cancel()
|
job?.cancel()
|
||||||
|
@ -101,26 +103,32 @@ class ExtensionTestItem(
|
||||||
done()
|
done()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
val searchStart = System.currentTimeMillis()
|
||||||
val searchResult = extension.search(searchString)
|
val searchResult = extension.search(searchString)
|
||||||
searchResultSize = searchResult.size
|
searchResultData.time = (System.currentTimeMillis() - searchStart).toInt()
|
||||||
|
searchResultData.size = searchResult.size
|
||||||
withContext(Dispatchers.Main) {
|
withContext(Dispatchers.Main) {
|
||||||
searchResult()
|
searchResult()
|
||||||
}
|
}
|
||||||
if (searchResultSize == 0 || testType == "basic") {
|
if (searchResultData.size == 0 || testType == "basic") {
|
||||||
done()
|
done()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
val episodeResultTime = System.currentTimeMillis()
|
||||||
val episodeResult = extension.loadEpisodes("", null, searchResult.first().sAnime!!)
|
val episodeResult = extension.loadEpisodes("", null, searchResult.first().sAnime!!)
|
||||||
episodeResultSize = episodeResult.size
|
episodeResultData.time = (System.currentTimeMillis() - episodeResultTime).toInt()
|
||||||
|
episodeResultData.size = episodeResult.size
|
||||||
withContext(Dispatchers.Main) {
|
withContext(Dispatchers.Main) {
|
||||||
episodeResult()
|
episodeResult()
|
||||||
}
|
}
|
||||||
if (episodeResultSize == 0) {
|
if (episodeResultData.size == 0) {
|
||||||
done()
|
done()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
val serverResultTime = System.currentTimeMillis()
|
||||||
val serverResult = extension.loadVideoServers("", null, episodeResult.first().sEpisode!!)
|
val serverResult = extension.loadVideoServers("", null, episodeResult.first().sEpisode!!)
|
||||||
serverResultSize = serverResult.size
|
serverResultData.time = (System.currentTimeMillis() - serverResultTime).toInt()
|
||||||
|
serverResultData.size = serverResult.size
|
||||||
withContext(Dispatchers.Main) {
|
withContext(Dispatchers.Main) {
|
||||||
serverResult()
|
serverResult()
|
||||||
}
|
}
|
||||||
|
@ -137,26 +145,32 @@ class ExtensionTestItem(
|
||||||
done()
|
done()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
val searchStart = System.currentTimeMillis()
|
||||||
val searchResult = extension.search(searchString)
|
val searchResult = extension.search(searchString)
|
||||||
searchResultSize = searchResult.size
|
searchResultData.time = (System.currentTimeMillis() - searchStart).toInt()
|
||||||
|
searchResultData.size = searchResult.size
|
||||||
withContext(Dispatchers.Main) {
|
withContext(Dispatchers.Main) {
|
||||||
searchResult()
|
searchResult()
|
||||||
}
|
}
|
||||||
if (searchResultSize == 0 || testType == "basic") {
|
if (searchResultData.size == 0 || testType == "basic") {
|
||||||
done()
|
done()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
val episodeResultStart = System.currentTimeMillis()
|
||||||
val chapterResult = extension.loadChapters("", null, searchResult.first().sManga!!)
|
val chapterResult = extension.loadChapters("", null, searchResult.first().sManga!!)
|
||||||
episodeResultSize = chapterResult.size
|
episodeResultData.time = (System.currentTimeMillis() - episodeResultStart).toInt()
|
||||||
|
episodeResultData.size = chapterResult.size
|
||||||
withContext(Dispatchers.Main) {
|
withContext(Dispatchers.Main) {
|
||||||
episodeResult()
|
episodeResult()
|
||||||
}
|
}
|
||||||
if (episodeResultSize == 0) {
|
if (episodeResultData.size == 0) {
|
||||||
done()
|
done()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
val serverResultStart = System.currentTimeMillis()
|
||||||
val serverResult = extension.loadImages("", chapterResult.first().sChapter)
|
val serverResult = extension.loadImages("", chapterResult.first().sChapter)
|
||||||
serverResultSize = serverResult.size
|
serverResultData.time = (System.currentTimeMillis() - serverResultStart).toInt()
|
||||||
|
serverResultData.size = serverResult.size
|
||||||
withContext(Dispatchers.Main) {
|
withContext(Dispatchers.Main) {
|
||||||
serverResult()
|
serverResult()
|
||||||
}
|
}
|
||||||
|
@ -172,17 +186,21 @@ class ExtensionTestItem(
|
||||||
done()
|
done()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
val searchStart = System.currentTimeMillis()
|
||||||
val searchResult = extension.search(searchString)
|
val searchResult = extension.search(searchString)
|
||||||
searchResultSize = searchResult.size
|
searchResultData.time = (System.currentTimeMillis() - searchStart).toInt()
|
||||||
|
searchResultData.size = searchResult.size
|
||||||
withContext(Dispatchers.Main) {
|
withContext(Dispatchers.Main) {
|
||||||
searchResult()
|
searchResult()
|
||||||
}
|
}
|
||||||
if (searchResultSize == 0 || testType == "basic") {
|
if (searchResultData.size == 0 || testType == "basic") {
|
||||||
done()
|
done()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
val chapterResultTime = System.currentTimeMillis()
|
||||||
val chapterResult = extension.loadBook(searchResult.first().link, null)
|
val chapterResult = extension.loadBook(searchResult.first().link, null)
|
||||||
episodeResultSize = chapterResult.links.size
|
episodeResultData.time = (System.currentTimeMillis() - chapterResultTime).toInt()
|
||||||
|
episodeResultData.size = chapterResult.links.size
|
||||||
withContext(Dispatchers.Main) {
|
withContext(Dispatchers.Main) {
|
||||||
episodeResult()
|
episodeResult()
|
||||||
serverResult()
|
serverResult()
|
||||||
|
@ -236,9 +254,10 @@ class ExtensionTestItem(
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressLint("SetTextI18n")
|
||||||
private fun searchResult() {
|
private fun searchResult() {
|
||||||
if (::binding.isInitialized.not()) return
|
if (::binding.isInitialized.not()) return
|
||||||
if (searchResultSize == null) {
|
if (searchResultData.time == 0) {
|
||||||
binding.searchResultText.isVisible = false
|
binding.searchResultText.isVisible = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -246,7 +265,7 @@ class ExtensionTestItem(
|
||||||
context.getThemeColor(com.google.android.material.R.attr.colorPrimary)
|
context.getThemeColor(com.google.android.material.R.attr.colorPrimary)
|
||||||
)
|
)
|
||||||
binding.searchResultText.isVisible = true
|
binding.searchResultText.isVisible = true
|
||||||
if (searchResultSize == 0) {
|
if (searchResultData.size == 0) {
|
||||||
val text = context.getString(R.string.title_search_test,
|
val text = context.getString(R.string.title_search_test,
|
||||||
context.getString(R.string.no_results_found))
|
context.getString(R.string.no_results_found))
|
||||||
binding.searchResultText.text = text
|
binding.searchResultText.text = text
|
||||||
|
@ -259,16 +278,17 @@ class ExtensionTestItem(
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
val text = context.getString(R.string.title_search_test,
|
val text = context.getString(R.string.title_search_test,
|
||||||
context.getString(R.string.results_found, searchResultSize.toString()))
|
context.getString(R.string.results_found, searchResultData.size.toString()))
|
||||||
binding.searchResultText.text = text
|
binding.searchResultText.text = text + "\n${searchResultData.time}ms"
|
||||||
binding.searchResultText.setCompoundDrawablesWithIntrinsicBounds(
|
binding.searchResultText.setCompoundDrawablesWithIntrinsicBounds(
|
||||||
R.drawable.ic_circle_check, 0, 0, 0
|
R.drawable.ic_circle_check, 0, 0, 0
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressLint("SetTextI18n")
|
||||||
private fun episodeResult() {
|
private fun episodeResult() {
|
||||||
if (::binding.isInitialized.not()) return
|
if (::binding.isInitialized.not()) return
|
||||||
if (episodeResultSize == null) {
|
if (episodeResultData.time == 0) {
|
||||||
binding.episodeResultText.isVisible = false
|
binding.episodeResultText.isVisible = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -276,7 +296,7 @@ class ExtensionTestItem(
|
||||||
context.getThemeColor(com.google.android.material.R.attr.colorPrimary)
|
context.getThemeColor(com.google.android.material.R.attr.colorPrimary)
|
||||||
)
|
)
|
||||||
binding.episodeResultText.isVisible = true
|
binding.episodeResultText.isVisible = true
|
||||||
if (episodeResultSize == 0) {
|
if (episodeResultData.size == 0) {
|
||||||
val text = when(extensionType) {
|
val text = when(extensionType) {
|
||||||
"anime" -> context.getString(R.string.episode_search_test,
|
"anime" -> context.getString(R.string.episode_search_test,
|
||||||
context.getString(R.string.no_results_found))
|
context.getString(R.string.no_results_found))
|
||||||
|
@ -296,18 +316,19 @@ class ExtensionTestItem(
|
||||||
}
|
}
|
||||||
val text = when(extensionType) {
|
val text = when(extensionType) {
|
||||||
"anime" -> context.getString(R.string.episode_search_test,
|
"anime" -> context.getString(R.string.episode_search_test,
|
||||||
context.getString(R.string.results_found, episodeResultSize.toString()))
|
context.getString(R.string.results_found, episodeResultData.size.toString()))
|
||||||
"manga" -> context.getString(R.string.chapter_search_test,
|
"manga" -> context.getString(R.string.chapter_search_test,
|
||||||
context.getString(R.string.results_found, episodeResultSize.toString()))
|
context.getString(R.string.results_found, episodeResultData.size.toString()))
|
||||||
else -> context.getString(R.string.book_search_test,
|
else -> context.getString(R.string.book_search_test,
|
||||||
context.getString(R.string.results_found, episodeResultSize.toString()))
|
context.getString(R.string.results_found, episodeResultData.size.toString()))
|
||||||
}
|
}
|
||||||
binding.episodeResultText.text = text
|
binding.episodeResultText.text = text + "\n${episodeResultData.time}ms"
|
||||||
binding.episodeResultText.setCompoundDrawablesWithIntrinsicBounds(
|
binding.episodeResultText.setCompoundDrawablesWithIntrinsicBounds(
|
||||||
R.drawable.ic_circle_check, 0, 0, 0
|
R.drawable.ic_circle_check, 0, 0, 0
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressLint("SetTextI18n")
|
||||||
private fun serverResult() {
|
private fun serverResult() {
|
||||||
if (::binding.isInitialized.not()) return
|
if (::binding.isInitialized.not()) return
|
||||||
if (extensionType == "novel") {
|
if (extensionType == "novel") {
|
||||||
|
@ -318,7 +339,7 @@ class ExtensionTestItem(
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (serverResultSize == null) {
|
if (serverResultData.time == 0) {
|
||||||
binding.serverResultText.isVisible = false
|
binding.serverResultText.isVisible = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -326,7 +347,7 @@ class ExtensionTestItem(
|
||||||
context.getThemeColor(com.google.android.material.R.attr.colorPrimary)
|
context.getThemeColor(com.google.android.material.R.attr.colorPrimary)
|
||||||
)
|
)
|
||||||
binding.serverResultText.isVisible = true
|
binding.serverResultText.isVisible = true
|
||||||
if (serverResultSize == 0) {
|
if (serverResultData.size == 0) {
|
||||||
val text = when(extensionType) {
|
val text = when(extensionType) {
|
||||||
"anime" -> context.getString(R.string.video_search_test,
|
"anime" -> context.getString(R.string.video_search_test,
|
||||||
context.getString(R.string.no_results_found))
|
context.getString(R.string.no_results_found))
|
||||||
|
@ -335,7 +356,7 @@ class ExtensionTestItem(
|
||||||
else -> context.getString(R.string.book_search_test,
|
else -> context.getString(R.string.book_search_test,
|
||||||
context.getString(R.string.no_results_found))
|
context.getString(R.string.no_results_found))
|
||||||
}
|
}
|
||||||
binding.serverResultText.text = text
|
binding.serverResultText.text = text + "\n${serverResultData.time}ms"
|
||||||
binding.serverResultText.setCompoundDrawablesWithIntrinsicBounds(
|
binding.serverResultText.setCompoundDrawablesWithIntrinsicBounds(
|
||||||
R.drawable.ic_circle_cancel, 0, 0, 0
|
R.drawable.ic_circle_cancel, 0, 0, 0
|
||||||
)
|
)
|
||||||
|
@ -346,11 +367,11 @@ class ExtensionTestItem(
|
||||||
}
|
}
|
||||||
val text = when(extensionType) {
|
val text = when(extensionType) {
|
||||||
"anime" -> context.getString(R.string.video_search_test,
|
"anime" -> context.getString(R.string.video_search_test,
|
||||||
context.getString(R.string.results_found, serverResultSize.toString()))
|
context.getString(R.string.results_found, serverResultData.size.toString()))
|
||||||
"manga" -> context.getString(R.string.image_search_test,
|
"manga" -> context.getString(R.string.image_search_test,
|
||||||
context.getString(R.string.results_found, serverResultSize.toString()))
|
context.getString(R.string.results_found, serverResultData.size.toString()))
|
||||||
else -> context.getString(R.string.book_search_test,
|
else -> context.getString(R.string.book_search_test,
|
||||||
context.getString(R.string.results_found, serverResultSize.toString()))
|
context.getString(R.string.results_found, serverResultData.size.toString()))
|
||||||
}
|
}
|
||||||
binding.serverResultText.text = text
|
binding.serverResultText.text = text
|
||||||
binding.serverResultText.setCompoundDrawablesWithIntrinsicBounds(
|
binding.serverResultText.setCompoundDrawablesWithIntrinsicBounds(
|
||||||
|
@ -358,4 +379,8 @@ class ExtensionTestItem(
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
data class TestResult(
|
||||||
|
var size: Int = 0,
|
||||||
|
var time: Int = 0,
|
||||||
|
)
|
||||||
}
|
}
|
|
@ -5,6 +5,7 @@ import android.os.Bundle
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
|
import androidx.core.widget.addTextChangedListener
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import ani.dantotsu.BottomSheetDialogFragment
|
import ani.dantotsu.BottomSheetDialogFragment
|
||||||
import ani.dantotsu.databinding.BottomSheetExtensionTestSettingsBinding
|
import ani.dantotsu.databinding.BottomSheetExtensionTestSettingsBinding
|
||||||
|
@ -39,6 +40,26 @@ class ExtensionTestSettingsBottomDialog : BottomSheetDialogFragment() {
|
||||||
LinearLayoutManager.VERTICAL,
|
LinearLayoutManager.VERTICAL,
|
||||||
false
|
false
|
||||||
)
|
)
|
||||||
|
binding.searchViewText.setText(searchQuery)
|
||||||
|
binding.searchViewText.addTextChangedListener {
|
||||||
|
searchQuery = it.toString()
|
||||||
|
}
|
||||||
|
binding.extensionTypeRadioGroup.check(
|
||||||
|
when (extensionType) {
|
||||||
|
"anime" -> binding.animeRadioButton.id
|
||||||
|
"manga" -> binding.mangaRadioButton.id
|
||||||
|
"novel" -> binding.novelsRadioButton.id
|
||||||
|
else -> binding.animeRadioButton.id
|
||||||
|
}
|
||||||
|
)
|
||||||
|
binding.testTypeRadioGroup.check(
|
||||||
|
when (testType) {
|
||||||
|
"ping" -> binding.pingRadioButton.id
|
||||||
|
"basic" -> binding.basicRadioButton.id
|
||||||
|
"full" -> binding.fullRadioButton.id
|
||||||
|
else -> binding.pingRadioButton.id
|
||||||
|
}
|
||||||
|
)
|
||||||
binding.animeRadioButton.setOnCheckedChangeListener { _, b ->
|
binding.animeRadioButton.setOnCheckedChangeListener { _, b ->
|
||||||
if (b) {
|
if (b) {
|
||||||
extensionType = "anime"
|
extensionType = "anime"
|
||||||
|
@ -112,6 +133,7 @@ class ExtensionTestSettingsBottomDialog : BottomSheetDialogFragment() {
|
||||||
|
|
||||||
var extensionType = "anime"
|
var extensionType = "anime"
|
||||||
var testType = "ping"
|
var testType = "ping"
|
||||||
|
var searchQuery = "Chainsaw Man"
|
||||||
var extensionsToTest: MutableList<String> = mutableListOf()
|
var extensionsToTest: MutableList<String> = mutableListOf()
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -66,7 +66,8 @@ class ParserTestActivity : AppCompatActivity() {
|
||||||
ExtensionTestItem(
|
ExtensionTestItem(
|
||||||
"anime",
|
"anime",
|
||||||
ExtensionTestSettingsBottomDialog.testType,
|
ExtensionTestSettingsBottomDialog.testType,
|
||||||
it
|
it,
|
||||||
|
ExtensionTestSettingsBottomDialog.searchQuery
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -81,7 +82,8 @@ class ParserTestActivity : AppCompatActivity() {
|
||||||
ExtensionTestItem(
|
ExtensionTestItem(
|
||||||
"manga",
|
"manga",
|
||||||
ExtensionTestSettingsBottomDialog.testType,
|
ExtensionTestSettingsBottomDialog.testType,
|
||||||
it
|
it,
|
||||||
|
ExtensionTestSettingsBottomDialog.searchQuery
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -96,7 +98,8 @@ class ParserTestActivity : AppCompatActivity() {
|
||||||
ExtensionTestItem(
|
ExtensionTestItem(
|
||||||
"novel",
|
"novel",
|
||||||
ExtensionTestSettingsBottomDialog.testType,
|
ExtensionTestSettingsBottomDialog.testType,
|
||||||
it
|
it,
|
||||||
|
ExtensionTestSettingsBottomDialog.searchQuery
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_marginVertical="16dp"
|
android:layout_marginVertical="16dp"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
@ -16,6 +17,7 @@
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<RadioGroup
|
<RadioGroup
|
||||||
|
android:id="@+id/extensionTypeRadioGroup"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
@ -57,6 +59,7 @@
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<RadioGroup
|
<RadioGroup
|
||||||
|
android:id="@+id/testTypeRadioGroup"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
@ -87,6 +90,52 @@
|
||||||
|
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical|center_horizontal"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:text="@string/test_search"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/searchView"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="56dp"
|
||||||
|
android:layout_gravity="bottom"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:transitionName="@string/search"
|
||||||
|
app:boxBackgroundColor="@color/bg"
|
||||||
|
app:boxBackgroundMode="outline"
|
||||||
|
app:boxCornerRadiusBottomEnd="28dp"
|
||||||
|
app:boxCornerRadiusBottomStart="28dp"
|
||||||
|
app:boxCornerRadiusTopEnd="28dp"
|
||||||
|
app:boxCornerRadiusTopStart="28dp"
|
||||||
|
app:endIconDrawable="@drawable/ic_round_search_24"
|
||||||
|
app:hintAnimationEnabled="true">
|
||||||
|
|
||||||
|
<AutoCompleteTextView
|
||||||
|
android:id="@+id/searchViewText"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="bottom"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:hint="@string/search"
|
||||||
|
android:imeOptions="actionSearch"
|
||||||
|
android:inputType="textPersonName"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:paddingBottom="4dp"
|
||||||
|
android:selectAllOnFocus="true"
|
||||||
|
android:textSize="14sp"
|
||||||
|
tools:ignore="LabelFor,TextContrastCheck" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/extensionSelectionRecyclerView"
|
android:id="@+id/extensionSelectionRecyclerView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -1019,4 +1019,5 @@ Non quae tempore quo provident laudantium qui illo dolor vel quia dolor et exerc
|
||||||
<string name="book_search_test">Book Search Test: %1$s</string>
|
<string name="book_search_test">Book Search Test: %1$s</string>
|
||||||
<string name="failed_to_fix">Failed to fix</string>
|
<string name="failed_to_fix">Failed to fix</string>
|
||||||
<string name="running_fixes">Running Fixes…</string>
|
<string name="running_fixes">Running Fixes…</string>
|
||||||
|
<string name="test_search">Test Search</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue