mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-28 04:25:18 +00:00
parent
c0c051bb66
commit
16c8cc88d7
@ -91,8 +91,7 @@ public class WebRtcCallControls extends LinearLayout {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
listener.onToggle();
|
||||
cameraFlipButton.setBackgroundResource(isChecked ? R.drawable.webrtc_camera_front_button
|
||||
: R.drawable.webrtc_camera_rear_button);
|
||||
updateCameraFlipIcon(isChecked);
|
||||
cameraFlipButton.setEnabled(false);
|
||||
}
|
||||
});
|
||||
@ -153,10 +152,17 @@ public class WebRtcCallControls extends LinearLayout {
|
||||
|
||||
public void setCameraFlipButtonEnabled(boolean enabled) {
|
||||
cameraFlipButton.setChecked(enabled, false);
|
||||
updateCameraFlipIcon(cameraFlipButton.isChecked());
|
||||
}
|
||||
|
||||
private void updateCameraFlipIcon(boolean isChecked) {
|
||||
cameraFlipButton.setBackgroundResource(isChecked ? R.drawable.webrtc_camera_front_button
|
||||
: R.drawable.webrtc_camera_rear_button);
|
||||
}
|
||||
|
||||
public void setCameraFlipAvailable(boolean available) {
|
||||
cameraFlipAvailable = available;
|
||||
cameraFlipButton.setVisibility(cameraFlipAvailable && isVideoEnabled() ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
||||
public void setCameraFlipClickable(boolean clickable) {
|
||||
|
Loading…
Reference in New Issue
Block a user