Skip to content

Commit

Permalink
Fix text field color in ad block
Browse files Browse the repository at this point in the history
  • Loading branch information
hazuki0x0 committed Feb 18, 2021
1 parent 8049584 commit efaf626
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ class AddAbpDialog : DialogFragment() {
private var listener: OnAddItemListener? = null

override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
val activity = activity ?: throw IllegalStateException()
val arguments = arguments ?: throw IllegalArgumentException()
val activity = requireActivity()
val arguments = requireArguments()

val view = View.inflate(activity, R.layout.add_abp_dialog, null)
val editText = view.findViewById<EditText>(R.id.urlEditText)
editText.setSingleLine(true)
editText.isSingleLine = true
editText.inputType = EditorInfo.TYPE_TEXT_VARIATION_URI

val entity = arguments.getParcelable<AbpEntity?>(ARG_ENTITY)
Expand Down
7 changes: 4 additions & 3 deletions module/adblock/src/main/res/layout/add_abp_dialog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
app:layout_constraintTop_toTopOf="parent"
app:boxBackgroundColor="@android:color/transparent">

<EditText
android:id="@+id/urlEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="URL"/>
android:hint="URL" />
</com.google.android.material.textfield.TextInputLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

0 comments on commit efaf626

Please sign in to comment.