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