You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add this with UI in order to add blinking light . I am beginner so I don't know about mobile developement
public void toggle(View view)
{
Button button = (Button) view;
// mine coding for disco light
if(button.getText().equals("Switch On") )
{
int i=1000;
while (i>3)
{
if(i%80!=0)
{
//button.setText(R.string.switch_on_text);
torchToggle("off");
}
if(i%80==0)
{
// button.setText(R.string.switch_off_text);
torchToggle("on");
}
if (i==10000)
{
button.setText(R.string.switch_off_text);
torchToggle("off");
break;
}
i++;
}
}
// mine coding
}
The text was updated successfully, but these errors were encountered:
add this with UI in order to add blinking light . I am beginner so I don't know about mobile developement
public void toggle(View view)
{
Button button = (Button) view;
// mine coding for disco light
if(button.getText().equals("Switch On") )
{
int i=1000;
while (i>3)
{
if(i%80!=0)
{
//button.setText(R.string.switch_on_text);
torchToggle("off");
}
if(i%80==0)
{
// button.setText(R.string.switch_off_text);
torchToggle("on");
}
if (i==10000)
{
button.setText(R.string.switch_off_text);
torchToggle("off");
break;
}
i++;
}
}
// mine coding
The text was updated successfully, but these errors were encountered: