摘要:
1、方法一public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); MediaPlayer mPlayer = MediaPlayer.create(FakeCallScreen.this, R.raw.mysoundfile); mPlayer.start(); }public void onDestroy() { mPla... 阅读全文
摘要:
1.该效果是当按返回按钮时弹出一个提示,来确保无误操作,采用常见的对话框样式。 1 protected void dialog() { 2 AlertDialog.Builder builder = new Builder(context); 3 builder.setMessage("确认退出吗?"); 4 builder.setTitle("提示"); 5 builder.setPositiveButton("确认", new OnClickListener() { 6 @Override 7 public void onClic 阅读全文