please give me the solution
public class Calc extends Activity implements OnClickListener
{
private Button clr;
clr=(Button)findViewById(R.id.Button01);
}
public void onClick(View v)
{
case R.id.Button01:
tv1.setText("REF");
if( ref_flg==true)
{
final AlertDialog alertDialog = new AlertDialog.Builder(this).create();
alertDialog.setTitle("Reset...");
alertDialog.setMessage("REF was already entered");
alertDialog.setButton2("OK", new DialogInterface.OnClickListener()
{
public void onClick(DialogInterface dialog, int which) {
// here you can add functions
dialog.dismiss();
}
});
alertDialog.setIcon(R.drawable.icon);
alertDialog.show();
}
}
so my question is that how i can write the code in case button01 in another activity and get the result from it.