title: BaseExpandableListAdapter and GetChildView - custom dialog limitations?
body: <p>first question and a newbie to android - hopefully that means there is a simple solution that i've just outright missed - here's to hoping ... here goes.</p>
  
  <p>I'm using a custom BaseExpandableListAdapter to drive a ExpandableListView and within the adapter, i've overriden the GetChildView method to display a custom child with 5 buttons.</p>
  
  <pre><code>public class ExpandableListAdapter extends BaseExpandableListAdapter {    
  
  private Context context;
  
  private ArrayList&lt;String&gt; groups;
  
  private ArrayList&lt;ArrayList&lt;String&gt;&gt; children;
  
  private int setCount;
  private int currentSetNumber;
  
  ...
  
  public View getChildView(int groupPosition, int childPosition, boolean isLastChild,
          View convertView, ViewGroup parent) {
  
      if (convertView == null) {
          LayoutInflater infalInflater = (LayoutInflater) context
                  .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
          convertView = infalInflater.inflate(R.layout.child_layout, null);
          parent.setDescendantFocusability(ViewGroup.FOCUS_BLOCK_DESCENDANTS);
      }
  
      Button bPlus = (Button) convertView.findViewById(R.id.btnAddSet);
  
      if(childPosition == 0){
          Button bSetPlace = (Button) convertView.findViewById(R.id.bSetPlace1);
          bSetPlace.setText("Set 1");
  
          bSetPlace.setOnClickListener(new View.OnClickListener(){
  
              ***public void onClick(View v) {
                  // TODO Auto-generated method stub
                  Intent myIntent = new Intent(context,WeightEntryDialog.class);
                  context.startActivity(myIntent);    
              }***
          });
  
  ... remainder of method (not relevant)
  </code></pre>
  
  <p>No issues with anything so far however i appear to be stuck in the onClick method placed on a child button.  What i'd like to do is get a result from the intent (dialog) that i am launching.  Ideally, i'd call startActivityForResult but there is no such method from the context available.  I'm also limited by the scope of the anonymous class.  The dialog is showing but i'm unable to get any values from it, furthermore i'm unable to identify when the dialog is closed because of the lack of feedback.</p>
  
  <p>I would like to return two integers from the dialog.  Not sure if any of the dialog code is relevant but here is the header.  </p>
  
  <pre><code>public class WeightEntryDialog extends Activity {
  </code></pre>
  
  <p>Have i gone too far into the BaseExpandableListAdapter class?  Am i trying to do something in the adapter that i really should be doing elsewhere, it's important for me to maintain control of the children items in the expandable list.  Hopefully i'm clear and someone can offer some guidance.  Thanks a bunch.</p>