반응형 alertdialog2 AlertDialog AlertDialog AlertDialog.Builder builder = new AlertDialog.Builder(LoginActivity.this);//this, LoginActivity.context(x) builder.setTitle("알림"); builder.setMessage("비밀번호를 발급받으시겠습니까?"); builder.setCancelable(false);//외부 클릭시 팝업 닫히는 것 무시 builder.setNegativeButton("취소", new DialogInterface.OnClickListener(){ @Override public void onClick(DialogInterface dialog, int id) { gotoWebView("miniforget.html").. 2021. 7. 19. [ERROR] 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를 사용할 때 나타나며... 해결 방법은 2가지가 있다. 첫번째는 import 를 다음과 같이 변경하는 것이다. import android.support.v7.app.AlertDialog; -> import android.app.AlertDialog; 두번째는 AndroidManifest에 다음 코드를 추가 하는 것 첫번째를 선택했을 경우, Unable to add window -- token null is not for an application 위에 같은 메세지가 나타날 수 있다. 이 경우에는 아래와 같이 코딩이 되어 있을 것이다. A.. 2021. 6. 11. 이전 1 다음 반응형