theme2 전체화면에서 Dialog 띄우면 전체화면이 이상해지는 현상 전체화면일 때 Swipe하면 아래의 Navigation bar가 나타나게 변화하는데 Dialog가 나오면 Navigation bar가 노출되면서 전체적인 비율이 깨지게 된다.. 이 코드를 넣으면 Navigation bar가 노출되지 않아 일그러지는 현상이 발생하지 않는다. val builder = AlertDialog.Builder(context, ADAPTED_THEME) .setIcon(context.applicationInfo.icon) .setTitle(context.getString(R.string.app_name)) .setMessage(contents) .setCancelable(false) .setPositiveButton(context.getString(R.string.text_ok), .. 2022. 9. 30. 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 다음