AlertDialog3 AlertDialog에 top padding 생길 때 갑자기 AlertDialog에 top padding이 생겨서 좀 당황스러웠는데.. 이때는 import를 다시 해주면 된다.. import android.app.AlertDialog 이렇게 해주면 다시 원래대로 깔끔하게 나온다. 2022. 10. 25. You need to use a Theme.AppCompat theme (or descendant) with this activity. 수정 You need to use a Theme.AppCompat theme (or descendant) with this activity. 라며.. AlertDialog를 띄울 때 앱이 죽는 현상이 있었다. val builder = AlertDialog.Builder(applicationContext) // 이러면 에러 발생 val builder = AlertDialog.Builder(this) // 이러면 정상 동작 위 처럼 this로 변경해주면 잘 동작한다. 2022. 8. 8. android.app.AlertDialog.THEME_DEVICE_DEFAULT_LIGHT 대체하기 AlertDialog.Builder builder = new AlertDialog.Builder(mContext, android.app.AlertDialog.THEME_DEVICE_DEFAULT_LIGHT); 이 코드는 android.app.AlertDialog.THEME_DEVICE_DEFAULT_LIGHT가 Deprecated되어서 교체해야한다. AlertDialog.Builder alertBuilder = new AlertDialog.Builder(mContext, android.R.style.Theme_DeviceDefault_Light_Dialog_Alert); 이렇게 android.R.style.Theme~ 이렇게 주면 동일하게 동작한다. 2021. 10. 20. 이전 1 다음