Validating a String and calling an activity as per the result
<p>I wanted to call a different activity if my String value(from) is empty and vice verse:</p>

<pre><code>    String[] from = new String[] { "name" };

    if (from.length &gt;= 1)

    {
        int[] to = new int[] { R.id.countryTextView111};
        conAdapter = new SimpleCursorAdapter(CountryList.this, R.layout.countrylist, null, from, to);
        setListAdapter(conAdapter); // set adapter

    }   
    else 

    {

        Intent intent = new Intent(getApplicationContext(), EmailSettings.class);
        startActivity(intent);

    }
</code></pre>

<p>For some reason my Condition isn't working so need an Expert view.</p>

<p>Thanks,</p>

<p>Ali</p>
