mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-16 01:05:04 +01:00
Fix call management buttons
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
4d0fa0927b
commit
4f908a2961
@ -452,7 +452,7 @@ public class CallController extends BaseController {
|
||||
onCameraClick();
|
||||
}
|
||||
} else {
|
||||
cameraControlButton.setImageResource(R.drawable.ic_videocam_off_white_24px);
|
||||
cameraControlButton.getHierarchy().setPlaceholderImage(R.drawable.ic_videocam_off_white_24px);
|
||||
cameraControlButton.setAlpha(0.7f);
|
||||
cameraSwitchButton.setVisibility(View.GONE);
|
||||
}
|
||||
@ -463,7 +463,7 @@ public class CallController extends BaseController {
|
||||
onMicrophoneClick();
|
||||
}
|
||||
} else {
|
||||
microphoneControlButton.setImageResource(R.drawable.ic_mic_off_white_24px);
|
||||
microphoneControlButton.getHierarchy().setPlaceholderImage(R.drawable.ic_mic_off_white_24px);
|
||||
}
|
||||
|
||||
if (!inCall) {
|
||||
@ -618,14 +618,14 @@ public class CallController extends BaseController {
|
||||
audioOn = !audioOn;
|
||||
|
||||
if (audioOn) {
|
||||
microphoneControlButton.setActualImageResource(R.drawable.ic_mic_white_24px);
|
||||
microphoneControlButton.getHierarchy().setPlaceholderImage(R.drawable.ic_mic_white_24px);
|
||||
} else {
|
||||
microphoneControlButton.setActualImageResource(R.drawable.ic_mic_off_white_24px);
|
||||
microphoneControlButton.getHierarchy().setPlaceholderImage(R.drawable.ic_mic_off_white_24px);
|
||||
}
|
||||
|
||||
toggleMedia(audioOn, false);
|
||||
} else {
|
||||
microphoneControlButton.setActualImageResource(R.drawable.ic_mic_white_24px);
|
||||
microphoneControlButton.getHierarchy().setPlaceholderImage(R.drawable.ic_mic_white_24px);
|
||||
pulseAnimation.start();
|
||||
toggleMedia(true, false);
|
||||
}
|
||||
@ -661,12 +661,12 @@ public class CallController extends BaseController {
|
||||
videoOn = !videoOn;
|
||||
|
||||
if (videoOn) {
|
||||
cameraControlButton.setActualImageResource(R.drawable.ic_videocam_white_24px);
|
||||
cameraControlButton.getHierarchy().setPlaceholderImage(R.drawable.ic_videocam_white_24px);
|
||||
if (cameraEnumerator.getDeviceNames().length > 1) {
|
||||
cameraSwitchButton.setVisibility(View.VISIBLE);
|
||||
}
|
||||
} else {
|
||||
cameraControlButton.setActualImageResource(R.drawable.ic_videocam_off_white_24px);
|
||||
cameraControlButton.getHierarchy().setPlaceholderImage(R.drawable.ic_videocam_off_white_24px);
|
||||
cameraSwitchButton.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
@ -1938,7 +1938,7 @@ public class CallController extends BaseController {
|
||||
v.onTouchEvent(event);
|
||||
if (event.getAction() == MotionEvent.ACTION_UP && isPTTActive) {
|
||||
isPTTActive = false;
|
||||
microphoneControlButton.setActualImageResource(R.drawable.ic_mic_off_white_24px);
|
||||
microphoneControlButton.getHierarchy().setPlaceholderImage(R.drawable.ic_mic_off_white_24px);
|
||||
pulseAnimation.stop();
|
||||
toggleMedia(false, false);
|
||||
animateCallControls(false, 5000);
|
||||
|
@ -57,6 +57,7 @@ import com.facebook.drawee.backends.pipeline.Fresco;
|
||||
import com.facebook.imagepipeline.core.ImagePipeline;
|
||||
import com.facebook.imagepipeline.datasource.BaseBitmapDataSubscriber;
|
||||
import com.facebook.imagepipeline.image.CloseableImage;
|
||||
import com.facebook.imagepipeline.postprocessors.RoundAsCirclePostprocessor;
|
||||
import com.facebook.imagepipeline.postprocessors.RoundPostprocessor;
|
||||
import com.facebook.imagepipeline.request.ImageRequest;
|
||||
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||
@ -215,7 +216,7 @@ public class ConversationsListController extends BaseController implements Searc
|
||||
@Override
|
||||
protected void onNewResultImpl(Bitmap bitmap) {
|
||||
if (bitmap != null) {
|
||||
new RoundPostprocessor(true).process(bitmap);
|
||||
new RoundAsCirclePostprocessor(true).process(bitmap);
|
||||
menuItem.setIcon(new BitmapDrawable(bitmap));
|
||||
}
|
||||
}
|
||||
|
@ -94,8 +94,9 @@
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center_horizontal|bottom"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:backgroundTint="@color/colorPrimary"
|
||||
app:actualImageResource="@drawable/ic_switch_video_white_24px" />
|
||||
app:backgroundImage="@color/colorPrimary"
|
||||
app:roundAsCircle="true"
|
||||
app:placeholderImage="@drawable/ic_switch_video_white_24px" />
|
||||
</FrameLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
@ -115,7 +116,9 @@
|
||||
android:layout_above="@id/callControlsLinearLayoutView"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:tint="@color/nc_darkRed"
|
||||
app:actualImageResource="@drawable/ic_call_end_white_24px" />
|
||||
app:backgroundImage="@color/colorPrimary"
|
||||
app:roundAsCircle="true"
|
||||
app:placeholderImage="@drawable/ic_call_end_white_24px" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/callControlsLinearLayoutView"
|
||||
@ -134,11 +137,15 @@
|
||||
android:layout_height="60dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:alpha="0.7"
|
||||
android:backgroundTint="@color/colorPrimary"
|
||||
app:actualImageResource="@drawable/ic_mic_off_white_24px" />
|
||||
app:backgroundImage="@color/colorPrimary"
|
||||
app:roundAsCircle="true"
|
||||
app:placeholderImage="@drawable/ic_mic_off_white_24px" />
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/call_control_camera"
|
||||
app:backgroundImage="@color/colorPrimary"
|
||||
app:roundAsCircle="true"
|
||||
app:placeholderImage="@drawable/ic_videocam_white_24px"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_marginStart="24dp"
|
||||
@ -147,6 +154,8 @@
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/callControlEnableSpeaker"
|
||||
app:backgroundImage="@color/colorPrimary"
|
||||
app:roundAsCircle="true"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_marginStart="24dp"
|
||||
|
Loading…
Reference in New Issue
Block a user