버튼 리스너에이 코드 당신은 설정 팝업 모방하는 사용자 정의 대화와 DialogFragment를 사용할 수 있습니다.
public class CustomDialogFragment extends DialogFragment {
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
CustomDialog dialog = CustomDialog(getActivity());
// Position the dialog window below your action bar
Window window = dialog.getWindow();
WindowManager.LayoutParams lp = new WindowManager.LayoutParams();
lp.gravity = Gravity.TOP | Gravity.RIGHT;
lp.y = 100; // action bar height
window.setAttributes(lp);
return dialog;
}
private class CustomDialog extends Dialog {
public CustomDialog(Context context) {
super(context);
// do not show the title of the dialog box and dismiss
// it if touched outside, as the normal settings pop up
requestWindowFeature(Window.FEATURE_NO_TITLE);
setCanceledOnTouchOutside(true);
// your custom layout
setContentView(R.layout.custom_layout);
}
}
}
나서 그것을 보여
CustomDialogFragment popup = new CustomDialogFragment();
popup.show(getFragmentManager(), "");
체크 [이 (http://stackoverflow.com/a/17872878/1777090) –