pull/2280/head
kunfei 2 years ago
parent 0776e0b982
commit 2fa7b5e17c
  1. 5
      app/src/main/java/io/legado/app/ui/widget/dialog/UrlOptionDialog.kt
  2. 27
      app/src/main/res/layout/dialog_url_option_edit.xml
  3. 4
      app/src/main/res/values/styles.xml

@ -4,6 +4,7 @@ import android.app.Dialog
import android.content.Context
import android.os.Bundle
import android.view.ViewGroup
import io.legado.app.R
import io.legado.app.constant.AppConst
import io.legado.app.databinding.DialogUrlOptionEditBinding
import io.legado.app.model.analyzeRule.AnalyzeUrl
@ -17,11 +18,15 @@ class UrlOptionDialog(context: Context, private val success: (String) -> Unit) :
override fun onStart() {
super.onStart()
setLayout(1f, ViewGroup.LayoutParams.MATCH_PARENT)
window?.setBackgroundDrawableResource(R.color.transparent)
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(binding.root)
binding.root.setOnClickListener {
dismiss()
}
binding.editMethod.setFilterValues("POST", "GET")
binding.editCharset.setFilterValues(AppConst.charsets)
binding.tvOk.setOnClickListener {

@ -1,17 +1,26 @@
<?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"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="16dp">
<LinearLayout
android:id="@+id/vw_bg"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/shape_card_view"
android:orientation="vertical"
android:layout_gravity="center"
android:padding="16dp"
tools:ignore="UselessParent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="10dp"
android:gravity="center_vertical"
android:orientation="horizontal"
android:gravity="center_vertical">
android:paddingBottom="10dp">
<TextView
android:layout_width="wrap_content"
@ -29,16 +38,15 @@
android:id="@+id/tv_ok"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:padding="12dp"
android:text="@string/ok"
android:background="?android:attr/selectableItemBackgroundBorderless" />
android:text="@string/ok" />
</LinearLayout>
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:overScrollMode="ifContentScrolls">
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
@ -169,4 +177,7 @@
</androidx.core.widget.NestedScrollView>
</LinearLayout>
</FrameLayout>

@ -1,4 +1,4 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<resources>
//**************************************************************Theme******************************************************************************//
@ -74,7 +74,7 @@
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowDisablePreview">true</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowTranslucentStatus" tools:targetApi="kitkat">true</item>
<item name="android:windowTranslucentStatus">true</item>
<item name="android:windowAnimationStyle">@null</item>
</style>

Loading…
Cancel
Save