mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-27 08:55:54 +03:00
add call recording animation
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
bafe9198eb
commit
fcef4b9c9b
1 changed files with 11 additions and 0 deletions
|
@ -52,6 +52,9 @@ import android.view.MotionEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.view.ViewTreeObserver;
|
import android.view.ViewTreeObserver;
|
||||||
|
import android.view.animation.AlphaAnimation;
|
||||||
|
import android.view.animation.Animation;
|
||||||
|
import android.view.animation.LinearInterpolator;
|
||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
import android.widget.RelativeLayout;
|
import android.widget.RelativeLayout;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
@ -183,6 +186,7 @@ public class CallActivity extends CallBaseActivity {
|
||||||
|
|
||||||
public static final String VIDEO_STREAM_TYPE_SCREEN = "screen";
|
public static final String VIDEO_STREAM_TYPE_SCREEN = "screen";
|
||||||
public static final String VIDEO_STREAM_TYPE_VIDEO = "video";
|
public static final String VIDEO_STREAM_TYPE_VIDEO = "video";
|
||||||
|
private static final Long RECORDING_ANIMATION_DURATION = 1000L;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
NcApi ncApi;
|
NcApi ncApi;
|
||||||
|
@ -2923,9 +2927,16 @@ public class CallActivity extends CallBaseActivity {
|
||||||
public void showCallRecordingIndicator() {
|
public void showCallRecordingIndicator() {
|
||||||
binding.callRecordingIndicator.setVisibility(View.VISIBLE);
|
binding.callRecordingIndicator.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
|
Animation animation = new AlphaAnimation(1.0f, 0.0f);
|
||||||
|
animation.setDuration(RECORDING_ANIMATION_DURATION);
|
||||||
|
animation.setInterpolator(new LinearInterpolator());
|
||||||
|
animation.setRepeatCount(Animation.INFINITE);
|
||||||
|
animation.setRepeatMode(Animation.REVERSE);
|
||||||
|
binding.callRecordingIndicator.startAnimation(animation);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void hideCallRecordingIndicator() {
|
public void hideCallRecordingIndicator() {
|
||||||
|
binding.callRecordingIndicator.clearAnimation();
|
||||||
binding.callRecordingIndicator.setVisibility(View.GONE);
|
binding.callRecordingIndicator.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue