Skip to content

Commit 120eef8

Browse files
updated sample
1 parent b755fb2 commit 120eef8

1 file changed

Lines changed: 34 additions & 35 deletions

File tree

Lines changed: 34 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,64 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<androidx.constraintlayout.widget.ConstraintLayout
3-
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"
4-
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
5-
android:layout_height="match_parent">
3+
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"
4+
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
5+
android:layout_height="match_parent">
66

77
<FrameLayout
8-
android:id="@+id/videoViewContainer" android:layout_width="match_parent" android:layout_height="match_parent"
9-
android:background="@android:color/black">
8+
android:id="@+id/videoViewContainer" android:layout_width="match_parent"
9+
android:layout_height="match_parent"
10+
android:background="@android:color/black">
1011

1112
<VideoView
12-
android:id="@+id/videoView" android:layout_width="match_parent" android:layout_height="match_parent"
13-
android:layout_gravity="center" tools:foreground="@tools:sample/backgrounds/scenic"/>
13+
android:id="@+id/videoView" android:layout_width="match_parent" android:layout_height="match_parent"
14+
android:layout_gravity="center" tools:foreground="@tools:sample/backgrounds/scenic"/>
1415

1516
<ImageView
16-
android:id="@+id/playIndicatorView" android:layout_width="wrap_content" android:layout_height="wrap_content"
17-
android:layout_gravity="center" app:srcCompat="@drawable/icon_video_play"/>
17+
android:id="@+id/playIndicatorView" android:layout_width="wrap_content"
18+
android:layout_height="wrap_content"
19+
android:layout_gravity="center" app:srcCompat="@drawable/icon_video_play"/>
1820

1921
</FrameLayout>
2022

2123
<com.google.android.material.floatingactionbutton.FloatingActionButton
22-
android:id="@+id/fab" android:layout_width="wrap_content" android:layout_height="wrap_content"
23-
android:layout_margin="16dp" android:clickable="true" android:focusable="true" app:fabSize="auto"
24-
app:layout_constraintBottom_toTopOf="@id/timeTextContainer" app:layout_constraintEnd_toEndOf="parent"
25-
app:srcCompat="@android:drawable/ic_menu_crop" tools:ignore="RtlCompat"/>
24+
android:id="@+id/fab" android:layout_width="wrap_content" android:layout_height="wrap_content"
25+
android:layout_margin="16dp" android:clickable="true" android:focusable="true" app:fabSize="auto"
26+
app:layout_constraintBottom_toTopOf="@id/timeTextContainer" app:layout_constraintEnd_toEndOf="parent"
27+
app:srcCompat="@android:drawable/ic_menu_crop" tools:ignore="RtlCompat"/>
2628

27-
<androidx.constraintlayout.widget.ConstraintLayout
28-
android:id="@+id/trimmingContainer" android:layout_width="match_parent" android:layout_height="wrap_content"
29-
android:background="#33ffffff" app:layout_constraintBottom_toBottomOf="parent">
29+
<View app:layout_constraintTop_toTopOf="@id/timeTextContainer"
30+
android:id="@+id/trimmingContainer" android:layout_width="match_parent" android:layout_height="0px"
31+
android:background="#33ffffff" app:layout_constraintBottom_toBottomOf="parent"/>
3032

31-
<com.lb.video_trimmer_library.view.TimeLineView
33+
<com.lb.video_trimmer_library.view.TimeLineView
3234
android:id="@+id/timeLineView" android:layout_width="match_parent" android:layout_height="wrap_content"
33-
app:layout_constraintTop_toTopOf="parent" tools:background="@tools:sample/backgrounds/scenic"/>
35+
app:layout_constraintBottom_toBottomOf="parent" tools:background="@tools:sample/backgrounds/scenic"/>
3436

35-
<com.lb.video_trimmer_library.view.RangeSeekBarView
37+
<com.lb.video_trimmer_library.view.RangeSeekBarView
3638
android:id="@+id/rangeSeekBarView" android:layout_width="match_parent" android:layout_height="wrap_content"
37-
app:layout_constraintTop_toTopOf="@id/timeLineView" tools:background="#3300ffff"/>
38-
39-
</androidx.constraintlayout.widget.ConstraintLayout>
39+
app:layout_constraintBottom_toBottomOf="@id/timeLineView" tools:background="#3300ffff"/>
4040

4141
<FrameLayout
42-
android:id="@+id/timeTextContainer" android:layout_width="match_parent" android:layout_height="wrap_content"
43-
android:visibility="gone" app:layout_constraintBottom_toTopOf="@id/trimmingContainer"
44-
tools:visibility="visible">
42+
android:id="@+id/timeTextContainer" android:layout_width="match_parent" android:layout_height="wrap_content"
43+
android:visibility="gone" app:layout_constraintBottom_toTopOf="@id/timeLineView"
44+
tools:visibility="visible">
4545

4646
<TextView
47-
android:id="@+id/videoFileSizeTextView" android:layout_width="wrap_content"
48-
android:layout_height="wrap_content" android:layout_gravity="end" android:textColor="#fff"
49-
android:textSize="12sp" tools:ignore="RtlCompat" tools:text="33 MB"/>
47+
android:id="@+id/videoFileSizeTextView" android:layout_width="wrap_content"
48+
android:layout_height="wrap_content" android:layout_gravity="end" android:textColor="#fff"
49+
android:textSize="12sp" tools:ignore="RtlCompat" tools:text="33 MB"/>
5050

5151
<TextView
52-
android:id="@+id/trimTimeRangeTextView" android:layout_width="wrap_content"
53-
android:layout_height="wrap_content" android:layout_gravity="center" android:gravity="center"
54-
android:textColor="#fff" android:textSize="12sp" tools:ignore="RtlCompat" tools:text="0:00 .. 1:00"/>
52+
android:id="@+id/trimTimeRangeTextView" android:layout_width="wrap_content"
53+
android:layout_height="wrap_content" android:layout_gravity="center" android:gravity="center"
54+
android:textColor="#fff" android:textSize="12sp" tools:ignore="RtlCompat" tools:text="0:00 .. 1:00"/>
5555

5656
<TextView
57-
android:id="@+id/playbackTimeTextView" android:layout_width="wrap_content"
58-
android:layout_height="wrap_content" android:layout_gravity="start" android:textColor="#fff"
59-
android:textSize="12sp" tools:ignore="RtlCompat" tools:text="0:30"/>
57+
android:id="@+id/playbackTimeTextView" android:layout_width="wrap_content"
58+
android:layout_height="wrap_content" android:layout_gravity="start" android:textColor="#fff"
59+
android:textSize="12sp" tools:ignore="RtlCompat" tools:text="0:30"/>
6060

6161
</FrameLayout>
6262

63-
6463
</androidx.constraintlayout.widget.ConstraintLayout>
6564

0 commit comments

Comments
 (0)