take a boolean variable and wirtie two if condition
on each condition set condtions
On Mar 27, 8:55 pm, Gabriel gab...@gmail.com wrote:
How I create a button with two functions?
For example, when I click it once it starts a sound, and if I click it
again it stops the sounds.
Or a Mute
use the even-odd logic.. like
int i=1;
button.onclick()
{
if(i%2==0)
{
///operation...
i++;
}
else
{
//operation
i++;
}
}
i think u got it...
i hope it works
-
Regards
Dixit Wadhwani
It's not working Dixie. Can you put this code more clear?
On 27 mar, 13:09, Dixi dixitwadhw...@gmail.com wrote:
use the even-odd logic.. like
int i=1;
button.onclick()
{
if(i%2==0)
{
///operation...
i++;
}
else
{
package org.dixit.com
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
public class ChangeTextValue extends Activity {
/** Called when the activity is first created. */
private int i =
4 matches
Mail list logo