반응형
val alertDialog = builder.create()
val window = alertDialog.window
// 위쪽
window?.setGravity(Gravity.TOP)
alertDialog.show()
전체코드
val builder = AlertDialog.Builder(this@MainActivity)
builder.setTitle("인터넷 확인 요 ")
.setPositiveButton("네네네", DialogInterface.OnClickListener { dialog, which ->
})
.setNegativeButton("아뇨", DialogInterface.OnClickListener { dialog, which ->
})
val alertDialog = builder.create()
val window = alertDialog.window
window?.setGravity(Gravity.TOP)
alertDialog.show()
반응형
'IT > Android' 카테고리의 다른 글
Kotlin] 안드로이드 스튜디오 // 좌표로 거리구하기 (0) | 2020.08.13 |
---|---|
Kotlin] 안드로이드 스튜디오 인터넷 연결 상태 확인 (0) | 2020.08.08 |
안드로이드 앱] 그래픽 이미지 생성기 (0) | 2020.06.14 |
Kotlin] 안드로이드 스튜디오 뒤로가기 두번 눌러 앱 종료 (0) | 2020.06.14 |
Kotlin] 안드로이드 애드핏 달기 (0) | 2020.05.24 |
댓글