Java Code Examples for android.content.DialogInterface.show()

The following are Jave code examples for showing how to use show() of the android.content.DialogInterface class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: Mire   File: FragmentAbout.java   Source Code and License Vote up 6 votes
private void dialogNoUpdate()
{
	View view = getActivity().getLayoutInflater().inflate(R.layout.dialog_update, null);

	TextView title = (TextView)view.findViewById(R.id.id_title);
	TextView content = (TextView)view.findViewById(R.id.id_content_text);

	title.setText(getResources().getString(R.string.updater_not_available_title));
	content.setText(String.format(getResources().getString(R.string.updater_not_available_description), getResources().getString(R.string.app_name)));

	AlertDialog.Builder builder = new AlertDialog.Builder(getActivity())
	    .setView(view)
	    .setCancelable(true)
	    .setPositiveButton(getResources().getString(R.string.updater_btn_ok), new DialogInterface.OnClickListener()
		{
			@Override
			public void onClick(DialogInterface dialog, int position)
			{ }
		});

	dialog = builder.create();
	dialog.show();
}