优化
This commit is contained in:
@@ -35,10 +35,13 @@ class HttpTtsEditDialog() : BaseDialogFragment(R.layout.dialog_http_tts_edit),
|
|||||||
|
|
||||||
override fun onStart() {
|
override fun onStart() {
|
||||||
super.onStart()
|
super.onStart()
|
||||||
setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
|
setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)
|
||||||
|
dialog?.window?.setBackgroundDrawableResource(R.color.transparent)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onFragmentCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onFragmentCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
view.setBackgroundResource(R.color.transparent)
|
||||||
|
view.setOnClickListener { dismiss() }
|
||||||
binding.toolBar.setBackgroundColor(primaryColor)
|
binding.toolBar.setBackgroundColor(primaryColor)
|
||||||
binding.tvUrl.run {
|
binding.tvUrl.run {
|
||||||
addLegadoPattern()
|
addLegadoPattern()
|
||||||
|
|||||||
@@ -1,128 +1,138 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:orientation="vertical"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:padding="16dp">
|
||||||
|
|
||||||
<androidx.appcompat.widget.Toolbar
|
<LinearLayout
|
||||||
android:id="@+id/tool_bar"
|
android:id="@+id/vw_bg"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:theme="?attr/actionBarStyle"
|
android:layout_gravity="center"
|
||||||
app:title="@string/speak_engine"
|
android:background="@drawable/shape_card_view"
|
||||||
app:popupTheme="@style/AppTheme.PopupOverlay"
|
android:orientation="vertical"
|
||||||
app:titleTextAppearance="@style/ToolbarTitle" />
|
tools:ignore="UselessParent">
|
||||||
|
|
||||||
<androidx.core.widget.NestedScrollView
|
<androidx.appcompat.widget.Toolbar
|
||||||
android:layout_width="match_parent"
|
android:id="@+id/tool_bar"
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:theme="?attr/actionBarStyle"
|
||||||
|
app:title="@string/speak_engine"
|
||||||
|
app:popupTheme="@style/AppTheme.PopupOverlay"
|
||||||
|
app:titleTextAppearance="@style/ToolbarTitle" />
|
||||||
|
|
||||||
<io.legado.app.ui.widget.text.TextInputLayout
|
<androidx.core.widget.NestedScrollView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="@string/name">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<io.legado.app.lib.theme.view.ThemeEditText
|
<io.legado.app.ui.widget.text.TextInputLayout
|
||||||
android:id="@+id/tv_name"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
|
android:hint="@string/name">
|
||||||
|
|
||||||
</io.legado.app.ui.widget.text.TextInputLayout>
|
<io.legado.app.lib.theme.view.ThemeEditText
|
||||||
|
android:id="@+id/tv_name"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
|
||||||
|
|
||||||
<io.legado.app.ui.widget.text.TextInputLayout
|
</io.legado.app.ui.widget.text.TextInputLayout>
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:hint="url"
|
|
||||||
tools:ignore="HardcodedText">
|
|
||||||
|
|
||||||
<io.legado.app.ui.widget.code.CodeView
|
<io.legado.app.ui.widget.text.TextInputLayout
|
||||||
android:id="@+id/tv_url"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
tools:ignore="TouchTargetSizeCheck,SpeakableTextPresentCheck" />
|
android:hint="url"
|
||||||
|
tools:ignore="HardcodedText">
|
||||||
|
|
||||||
</io.legado.app.ui.widget.text.TextInputLayout>
|
<io.legado.app.ui.widget.code.CodeView
|
||||||
|
android:id="@+id/tv_url"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
tools:ignore="TouchTargetSizeCheck,SpeakableTextPresentCheck" />
|
||||||
|
|
||||||
<io.legado.app.ui.widget.text.TextInputLayout
|
</io.legado.app.ui.widget.text.TextInputLayout>
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:hint="Content-Type"
|
|
||||||
tools:ignore="HardcodedText">
|
|
||||||
|
|
||||||
<io.legado.app.ui.widget.code.CodeView
|
<io.legado.app.ui.widget.text.TextInputLayout
|
||||||
android:id="@+id/tv_content_type"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
tools:ignore="TouchTargetSizeCheck,SpeakableTextPresentCheck" />
|
android:hint="Content-Type"
|
||||||
|
tools:ignore="HardcodedText">
|
||||||
|
|
||||||
</io.legado.app.ui.widget.text.TextInputLayout>
|
<io.legado.app.ui.widget.code.CodeView
|
||||||
|
android:id="@+id/tv_content_type"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
tools:ignore="TouchTargetSizeCheck,SpeakableTextPresentCheck" />
|
||||||
|
|
||||||
<io.legado.app.ui.widget.text.TextInputLayout
|
</io.legado.app.ui.widget.text.TextInputLayout>
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:hint="@string/login_url"
|
|
||||||
tools:ignore="HardcodedText">
|
|
||||||
|
|
||||||
<io.legado.app.ui.widget.code.CodeView
|
<io.legado.app.ui.widget.text.TextInputLayout
|
||||||
android:id="@+id/tv_login_url"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
|
android:hint="@string/login_url"
|
||||||
|
tools:ignore="HardcodedText">
|
||||||
|
|
||||||
</io.legado.app.ui.widget.text.TextInputLayout>
|
<io.legado.app.ui.widget.code.CodeView
|
||||||
|
android:id="@+id/tv_login_url"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
|
||||||
|
|
||||||
<io.legado.app.ui.widget.text.TextInputLayout
|
</io.legado.app.ui.widget.text.TextInputLayout>
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:hint="@string/login_ui"
|
|
||||||
tools:ignore="HardcodedText">
|
|
||||||
|
|
||||||
<io.legado.app.ui.widget.code.CodeView
|
<io.legado.app.ui.widget.text.TextInputLayout
|
||||||
android:id="@+id/tv_login_ui"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
|
android:hint="@string/login_ui"
|
||||||
|
tools:ignore="HardcodedText">
|
||||||
|
|
||||||
</io.legado.app.ui.widget.text.TextInputLayout>
|
<io.legado.app.ui.widget.code.CodeView
|
||||||
|
android:id="@+id/tv_login_ui"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
|
||||||
|
|
||||||
<io.legado.app.ui.widget.text.TextInputLayout
|
</io.legado.app.ui.widget.text.TextInputLayout>
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:hint="@string/login_check_js"
|
|
||||||
tools:ignore="HardcodedText">
|
|
||||||
|
|
||||||
<io.legado.app.ui.widget.code.CodeView
|
<io.legado.app.ui.widget.text.TextInputLayout
|
||||||
android:id="@+id/tv_login_check_js"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
tools:ignore="TouchTargetSizeCheck,SpeakableTextPresentCheck" />
|
android:hint="@string/login_check_js"
|
||||||
|
tools:ignore="HardcodedText">
|
||||||
|
|
||||||
</io.legado.app.ui.widget.text.TextInputLayout>
|
<io.legado.app.ui.widget.code.CodeView
|
||||||
|
android:id="@+id/tv_login_check_js"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
tools:ignore="TouchTargetSizeCheck,SpeakableTextPresentCheck" />
|
||||||
|
|
||||||
<io.legado.app.ui.widget.text.TextInputLayout
|
</io.legado.app.ui.widget.text.TextInputLayout>
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:hint="@string/source_http_header"
|
|
||||||
tools:ignore="HardcodedText">
|
|
||||||
|
|
||||||
<io.legado.app.ui.widget.code.CodeView
|
<io.legado.app.ui.widget.text.TextInputLayout
|
||||||
android:id="@+id/tv_headers"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
tools:ignore="TouchTargetSizeCheck,SpeakableTextPresentCheck" />
|
android:hint="@string/source_http_header"
|
||||||
|
tools:ignore="HardcodedText">
|
||||||
|
|
||||||
</io.legado.app.ui.widget.text.TextInputLayout>
|
<io.legado.app.ui.widget.code.CodeView
|
||||||
|
android:id="@+id/tv_headers"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
tools:ignore="TouchTargetSizeCheck,SpeakableTextPresentCheck" />
|
||||||
|
|
||||||
</LinearLayout>
|
</io.legado.app.ui.widget.text.TextInputLayout>
|
||||||
|
|
||||||
</androidx.core.widget.NestedScrollView>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</FrameLayout>
|
||||||
Reference in New Issue
Block a user