Commit 60f073df authored by wanglei's avatar wanglei

...

parent 4ae88a69
package com.base.browserwhite.ui.views
import android.app.AlertDialog
import android.content.Context
import android.view.LayoutInflater
import com.base.browserwhite.R
import com.base.browserwhite.databinding.DialogSearchEngineBinding
object DialogViews {
fun Context.showSearchEngineDialog() {
val binding = DialogSearchEngineBinding.inflate(LayoutInflater.from(this))
val dialog = AlertDialog.Builder(this).create()
dialog.setView(binding.root)
dialog.show()
val params = dialog.window?.attributes
// params?.width = resources.getDimensionPixelOffset(R.dimen.dp_300)
dialog.window?.attributes = params
dialog.window?.setBackgroundDrawableResource(android.R.color.transparent)
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#0571ED" />
<corners android:radius="25dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="25dp"/>
<solid android:color="#E1E4E9"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="10dp" />
<solid android:color="@color/white" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/bg_storke_0571ed" android:state_selected="true" />
<item android:drawable="@drawable/bg_ffffff_10" android:state_selected="false" />
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="2dp"
android:color="#0571ED" />
<solid android:color="@color/white" />
<corners android:radius="10dp" />
</shape>
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment