I have a toggle button on action bar for switching camera and I want to auto click on toggle button that is place on action bar when ever I start video call .
I can suggest you a solution for this:
private MenuItem toggleButton;
@Override
public boolean onPrepareOptionsMenu(Menu menu) {
toogleButton = menu.findItem(R.id.your_toggle_button_id);
return true;
}
private void startVideoCall() {
// Your code to start video here
...
// Auto set toggle button on.
toggleButton.setChecked(true);
}
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments