다이얼 로그 관련해서 어려워보여서 최대한 쉬운 예제로 구성된 아래의 블로그를 통해서 만들고 있습니다.
http://khie74.tistory.com/1169521457
블로그를 최대한 따라해보려고 하는데..
그런데 아래의 dismiss() 부분에 에러가 뜨는데 어떻게 바꾸어주어야 할지..
에러 내용은 can not reslove method 'dismiss()' 입니다. dismiss가 정의되지 않았다는건데..
어떻게 해야, 버튼을 눌렀을때 위의 블로그처럼 간단한 메세지창이 뜰까요..
문자수가 8000자가 넘어서 아래의 답변에 살짝 이어서 달아보겠습니다.
<xml 부분>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_custom__dialog"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:background="#363636"
tools:context="ex.real_project.Custom_Dialog">
<TextView
android:id="@+id/Custom_TextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="커스텀 다이얼로그 입니다."
android:layout_centerHorizontal="true"
android:layout_alignParentTop="true"
/>
<Button
android:id="@+id/Custom_Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="눌러주세요"
android:layout_centerHorizontal="true"
android:layout_below="@+id/Custom_TextView"
/>
</RelativeLayout>