Back to project page Android-MarketBin.
The source code is released under:
MIT License
If you think the Android project Android-MarketBin listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.haunted.marketbin.sample; //from w ww . j av a2s . com import android.app.AlertDialog; import android.app.Dialog; import android.content.DialogInterface; import android.os.Bundle; import android.support.v4.app.DialogFragment; import android.widget.EditText; public class PackageDialogFragment extends DialogFragment { @Override public Dialog onCreateDialog(Bundle savedInstanceState) { final EditText editPackageName = new EditText(getActivity()); editPackageName.setText(MainActivity.demoAppId); editPackageName.setSingleLine(); return new AlertDialog.Builder(getActivity()) .setTitle(getString(R.string.test_package)) .setView(editPackageName) .setNegativeButton(android.R.string.cancel, null) .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { assert editPackageName.getText() != null; MainActivity.demoAppId = editPackageName.getText().toString(); ((MainActivity)getActivity()).refresh(); } }) .show(); } }