I am trying to make a custom dialog alert as shown in the picture; I tried and looked everywhere to make it look like the photo but nothing seems to work. Any help would be appreciated; First picture shows what I want to make and the second what it looks like currently:
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
val alert = AlertDialog.Builder(this@MainActivity)
alert.setTitle("Confirm delete")
alert.setMessage("Lorem ipsum dolor sit amet, consectetuer adipiscing elit.")
alert.setPositiveButton("DELETE"){dialog, which ->
Toast.makeText(applicationContext,"Ok, we change the app background.",Toast.LENGTH_SHORT).show()
}
alert.setNegativeButton("CANCEL"){dialog,which ->
Toast.makeText(applicationContext,"You are not agree.",Toast.LENGTH_SHORT).show()
}
val dialog: AlertDialog = alert.create()
dialog.show()
}
}