title: Getting multiple checkbox values in android?
body: <p>new Android developer here. I'm doing a form that let's users set up some search criteria before searching in a SQLite db. Part of the form includes some checkboxes. How do I go about their values in a "best practice" sense?</p>
  
  <p>I'm used to doing PHP, so I would set up a method that returns an array or object with all the values, and then call that inside the 'onClick' method, but is that also a good idea in Java?</p>
  
  <p>My code looks like this:</p>
  
  <pre><code>    // Setup a listener, and event handler for the onClick event of the button
      buttonFind.setOnClickListener(new View.OnClickListener() {
          public void onClick(View v) {
              // Perform action on click
              String text = "Button clicked";
              int duration = Toast.LENGTH_SHORT;
              Context context = getApplicationContext();
  
              Toast toast = Toast.makeText(context, text, duration);
              toast.show();
          }
      });
  </code></pre>