kopia lustrzana https://github.com/ryukoposting/Signal-Android
Reposition video editor and add new play button.
rodzic
c9ba0432a0
commit
9347227ff5
|
@ -181,11 +181,6 @@ public final class VideoThumbnailsRangeSelectorView extends VideoThumbnailsView
|
|||
|
||||
@Override
|
||||
protected void onDraw(final Canvas canvas) {
|
||||
if (thumbHintTextSize > 0) {
|
||||
thumbTimeTextPaint.getTextBounds("0", 0, "0".length(), tempDrawRect);
|
||||
canvas.translate(0, tempDrawRect.height());
|
||||
}
|
||||
|
||||
super.onDraw(canvas);
|
||||
|
||||
canvas.translate(getPaddingLeft(), getPaddingTop());
|
||||
|
@ -252,7 +247,10 @@ public final class VideoThumbnailsRangeSelectorView extends VideoThumbnailsView
|
|||
drawTimeHint(canvas, drawableWidth, drawableHeight, lastDragThumb, true);
|
||||
}
|
||||
|
||||
canvas.save();
|
||||
canvas.translate(0, drawableHeight * 2);
|
||||
drawDurationAndSizeHint(canvas, drawableWidth);
|
||||
canvas.restore();
|
||||
}
|
||||
|
||||
// draw current position marker
|
||||
|
@ -292,7 +290,7 @@ public final class VideoThumbnailsRangeSelectorView extends VideoThumbnailsView
|
|||
}
|
||||
canvas.translate(0, drawableHeight + halfPillHeight);
|
||||
canvas.scale(scaleIn, scaleIn);
|
||||
thumbTimeBackgroundPaint.setAlpha(alpha);
|
||||
thumbTimeBackgroundPaint.setAlpha(Math.round(alpha * 0.6f));
|
||||
thumbTimeTextPaint.setAlpha(alpha);
|
||||
canvas.translate(leftRightPadding - halfPillWidth, halfPillHeight);
|
||||
canvas.drawRoundRect(timePillRect, halfPillHeight, halfPillHeight, thumbTimeBackgroundPaint);
|
||||
|
@ -332,7 +330,7 @@ public final class VideoThumbnailsRangeSelectorView extends VideoThumbnailsView
|
|||
|
||||
canvas.translate(Math.max(halfPillWidth, Math.min((right + left) / 2f, drawableWidth - halfPillWidth)), - 2 * halfPillHeight);
|
||||
canvas.scale(scaleIn, scaleIn);
|
||||
thumbTimeBackgroundPaint.setAlpha(alpha);
|
||||
thumbTimeBackgroundPaint.setAlpha(Math.round(alpha * 0.6f));
|
||||
thumbTimeTextPaint.setAlpha(alpha);
|
||||
canvas.translate(leftRightPadding - halfPillWidth, halfPillHeight);
|
||||
canvas.drawRoundRect(timePillRect, halfPillHeight, halfPillHeight, thumbTimeBackgroundPaint);
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<solid android:color="@color/transparent_black_60" />
|
||||
</shape>
|
|
@ -17,7 +17,9 @@
|
|||
android:id="@+id/video_timeline"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="72dp"
|
||||
android:layout_margin="16dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginTop="60dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
app:cursorColor="#fff"
|
||||
|
@ -28,7 +30,7 @@
|
|||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:thumbColor="@color/core_white"
|
||||
app:thumbColorEdited="#ff0"
|
||||
app:thumbHintBackgroundColor="@color/core_grey_90"
|
||||
app:thumbHintBackgroundColor="@color/transparent_black_60"
|
||||
app:thumbHintTextColor="@color/core_white"
|
||||
app:thumbHintTextSize="14sp"
|
||||
app:thumbTouchRadius="24dp"
|
||||
|
@ -36,11 +38,11 @@
|
|||
|
||||
<FrameLayout
|
||||
android:id="@+id/play_overlay"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="72dp"
|
||||
android:layout_gravity="center"
|
||||
android:alpha="0"
|
||||
android:background="@drawable/circle_white"
|
||||
android:background="@drawable/circle_transparent_black_60"
|
||||
android:longClickable="false"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
@ -49,14 +51,12 @@
|
|||
tools:alpha="1">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="19dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="17dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_width="34dp"
|
||||
android:layout_height="34dp"
|
||||
android:layout_gravity="center"
|
||||
android:contentDescription="@string/ThumbnailView_Play_video_description"
|
||||
android:scaleType="fitXY"
|
||||
android:tint="@color/core_ultramarine"
|
||||
app:srcCompat="@drawable/triangle_right" />
|
||||
android:scaleType="fitCenter"
|
||||
app:srcCompat="@drawable/exo_icon_play" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue