private Dialog dialog;
public MicVolume(Activity activity) {
// TODO Auto-generated constructor stub
Log.i(TAG, "MicVolume Constructor");
dialog = new Dialog(activity); <-context를 받아야 하는 부분이지만 activity로 대체하였습니다.
dialog.setOwnerActivity(activity);
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setContentView(R.layout.mic_volume);
dialog.show();
MakeButtonListener();
}
MicVolume micVolume = new MicVolume(Context(콘텍스트 이름).this);
public Dialog (Context context)
Create a Dialog window that uses the default dialog frame style.
Parameters
context |
The Context the Dialog is to run it. In particular, it uses the window manager and theme in this context to present its UI. |
이용하는 부분에 따라 context 대신 activity를 집어 넣을 수 도 있습니다.