[Solved] Starting an Activity on Condition


Try using this:

if ( "Both".equals ( s2 ) )
{
    //Do something
}

s2 == "Both" will not compare the text in Java.

You can also use this to ignore casing:

if ( "Both".equalsIgnoreCase ( s2 ) ) 
{
     //Do something
}

0

solved Starting an Activity on Condition