Commit 6f404f00 authored by wanglei's avatar wanglei

...

parent 7feeaebf
package com.base.datarecovery.view
import android.app.AlertDialog
import android.content.Context
import android.view.LayoutInflater
import com.base.datarecovery.R
import com.base.datarecovery.databinding.DialogFileScanBinding
object FileScanDialog {
fun Context.showFileScanDialog() {
val binding = DialogFileScanBinding.inflate(LayoutInflater.from(this))
val dialog = AlertDialog.Builder(this).create()
dialog.setView(binding.root)
dialog.setCanceledOnTouchOutside(false)
dialog.show()
dialog.window?.setBackgroundDrawableResource(android.R.color.transparent)
val params = dialog.window?.attributes
params?.width = resources.getDimensionPixelOffset(R.dimen.dp_345)
dialog.window?.attributes = params
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="13dp">
<ImageView
android:id="@+id/iv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:src="@mipmap/jiazai_scan"
tools:ignore="ContentDescription" />
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="5dp"
android:text="Scan"
tools:ignore="HardcodedText" />
</LinearLayout>
<FrameLayout
android:id="@+id/fl_ad"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="25dp" />
</LinearLayout>
</androidx.cardview.widget.CardView>
\ No newline at end of file
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