blob: 5a67ec5ff746456d85d8fc3393f35198c03c4c70 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
package org.rockbox;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.util.Log;
public class YesnoActivity extends Activity
{
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
new AlertDialog.Builder(this)
.setTitle(R.string.KbdInputTitle)
.setIcon(R.drawable.icon)
.setCancelable(false)
.setMessage(getIntent().getStringExtra("value"))
.setPositiveButton(R.string.Yes, new DialogInterface.OnClickListener()
{
public void onClick(DialogInterface dialog, int whichButton) {
setResult(RESULT_OK, getIntent());
finish();
}
})
.setNegativeButton(R.string.No, new DialogInterface.OnClickListener()
{
public void onClick(DialogInterface dialog, int whichButton)
{
setResult(RESULT_CANCELED, getIntent());
finish();
}
})
.show();
}
}
|