title: How to get data from AskDialog back to activity
body: <p>I have one activity1 with listview and after click on one item of list it shows own askDialog with 2 optiones(Buttons). I need to get back which one i clicked to open another activity from my activity1 with list. How can i do that?
  My AskDialog:</p>
  
  <pre><code>public class AskDialog extends Dialog implements
      android.view.View.OnClickListener {
  
  public Activity c;
  
  private Button edit;
  private Button delete;
  private int position;
  private boolean tariff;
  
  public AskDialog(Activity a,int position,boolean tariff) {
      super(a);
      // TODO Auto-generated constructor stub
      this.c = a;
      this.position = position;
      this.tariff = tariff;
  }
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      requestWindowFeature(Window.FEATURE_NO_TITLE);
      setContentView(R.layout.ask_dialog);
      edit = (Button) findViewById(R.id.editBtn);
      if(tariff){
          edit.setText("Zobrazit záznam");
      }
      delete = (Button) findViewById(R.id.deleteBtn);
      edit.setOnClickListener(this);
      delete.setOnClickListener(this);
  
  }
  
  @Override
  public void onClick(View v) {
      switch (v.getId()) {
          case R.id.editBtn:
  
              break;
          case R.id.deleteBtn:
  dismiss();
              break;
          default:
              break;
          }
          dismiss();
      }
  }
  </code></pre>
  
  <p>This is where i call that dialog:</p>
  
  <pre><code>listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
                  @Override
                  public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position,
                                          long id) {
                      positionOfTAriff = position;
  AskDialog askDialog = new AskDialog(MyCommonListActivity.this,position,false);
  askDialog.show();
  </code></pre>
  
  <p>Or is there any odher dialog i should use for that?</p>