New material resources added.

This commit is contained in:
onurays 2020-05-25 11:23:45 +03:00 committed by Valere
parent 4169f580b8
commit bda1633979
14 changed files with 170 additions and 6 deletions

View File

@ -53,8 +53,10 @@ import javax.inject.Inject
@Parcelize
data class CallArgs(
// val callId: String? = null,
val roomId: String
val roomId: String,
val participantUserId: String,
val isIncomingCall: Boolean,
val isVideoCall: Boolean
) : Parcelable
class VectorCallActivity : VectorBaseActivity(), WebRtcPeerConnectionManager.Listener {
@ -400,9 +402,9 @@ class VectorCallActivity : VectorBaseActivity(), WebRtcPeerConnectionManager.Lis
// mandatory.add(MediaConstraints.KeyValuePair("googHighpassFilter", "true"))
// }
fun newIntent(context: Context, signalingRoomId: String): Intent {
fun newIntent(context: Context, roomId: String, participantUserId: String, isIncomingCall: Boolean, isVideoCall: Boolean): Intent {
return Intent(context, VectorCallActivity::class.java).apply {
putExtra(MvRx.KEY_ARG, CallArgs(roomId = signalingRoomId))
putExtra(MvRx.KEY_ARG, CallArgs(roomId, participantUserId, isIncomingCall, isVideoCall))
}
}
}

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<gradient
android:startColor="?attr/riotx_call_actions_bg_gradient_start"
android:endColor="?attr/riotx_call_actions_bg_gradient_end"
android:type="linear"
android:angle="90"/>
</shape>
</item>
</selector>

View File

@ -0,0 +1,10 @@
<vector android:autoMirrored="true" android:height="40dp"
android:viewportHeight="40" android:viewportWidth="40"
android:width="40dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF4B55" android:fillType="evenOdd"
android:pathData="M20,20m-20,0a20,20 0,1 1,40 0a20,20 0,1 1,-40 0"
android:strokeColor="#00000000" android:strokeWidth="1"/>
<path android:fillColor="#FFFFFF" android:fillType="nonZero"
android:pathData="M20,17.7604C18.4,17.7604 16.85,18.0045 15.4,18.4632L15.4,21.4889C15.4,21.8696 15.17,22.2112 14.84,22.3674C13.86,22.8456 12.97,23.4605 12.18,24.1731C12,24.3487 11.75,24.4463 11.48,24.4463C11.2,24.4463 10.95,24.339 10.77,24.1633L8.29,21.7427C8.11,21.5768 8,21.3328 8,21.0595C8,20.7862 8.11,20.5422 8.29,20.3665C11.34,17.5457 15.46,15.8083 20,15.8083C24.54,15.8083 28.66,17.5457 31.71,20.3665C31.89,20.5422 32,20.7862 32,21.0595C32,21.3328 31.89,21.5768 31.71,21.7525L29.23,24.1731C29.05,24.3487 28.8,24.4561 28.52,24.4561C28.25,24.4561 28,24.3487 27.82,24.1828C27.03,23.4605 26.13,22.8554 25.15,22.3771C24.82,22.221 24.59,21.8891 24.59,21.4987L24.59,18.473C23.15,18.0044 21.6,17.7604 20,17.7604Z"
android:strokeColor="#00000000" android:strokeWidth="1"/>
</vector>

View File

@ -0,0 +1,11 @@
<vector android:autoMirrored="true" android:height="40dp"
android:viewportHeight="40" android:viewportWidth="40"
android:width="40dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillAlpha="0.2" android:fillColor="#000000"
android:fillType="evenOdd"
android:pathData="M20,20m-20,0a20,20 0,1 1,40 0a20,20 0,1 1,-40 0"
android:strokeColor="#00000000" android:strokeWidth="1"/>
<path android:fillColor="#FFFFFF" android:fillType="nonZero"
android:pathData="M26,14.75L23.6225,14.75L22.25,13.25L17.75,13.25L16.3775,14.75L14,14.75C13.175,14.75 12.5,15.425 12.5,16.25L12.5,25.25C12.5,26.075 13.175,26.75 14,26.75L26,26.75C26.825,26.75 27.5,26.075 27.5,25.25L27.5,16.25C27.5,15.425 26.825,14.75 26,14.75ZM20,24.5C17.93,24.5 16.25,22.82 16.25,20.75L14.75,20.75L16.625,18.875L18.5,20.75L17,20.75C17,22.4075 18.3425,23.75 20,23.75C20.435,23.75 20.8475,23.6525 21.215,23.4875L21.77,24.0425C21.2375,24.32 20.645,24.5 20,24.5ZM23.375,22.625L21.5,20.75L23,20.75C23,19.0925 21.6575,17.75 20,17.75C19.565,17.75 19.1525,17.8475 18.785,18.0125L18.23,17.465C18.7625,17.18 19.355,17 20,17C22.07,17 23.75,18.68 23.75,20.75L25.25,20.75L23.375,22.625Z"
android:strokeColor="#00000000" android:strokeWidth="1"/>
</vector>

View File

@ -0,0 +1,7 @@
<vector android:autoMirrored="true" android:height="18dp"
android:viewportHeight="18" android:viewportWidth="18"
android:width="18dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FFFFFF" android:fillType="nonZero"
android:pathData="M15,3.75L12.6225,3.75L11.25,2.25L6.75,2.25L5.3775,3.75L3,3.75C2.175,3.75 1.5,4.425 1.5,5.25L1.5,14.25C1.5,15.075 2.175,15.75 3,15.75L15,15.75C15.825,15.75 16.5,15.075 16.5,14.25L16.5,5.25C16.5,4.425 15.825,3.75 15,3.75ZM9,13.5C6.93,13.5 5.25,11.82 5.25,9.75L3.75,9.75L5.625,7.875L7.5,9.75L6,9.75C6,11.4075 7.3425,12.75 9,12.75C9.435,12.75 9.8475,12.6525 10.215,12.4875L10.77,13.0425C10.2375,13.32 9.645,13.5 9,13.5ZM12.375,11.625L10.5,9.75L12,9.75C12,8.0925 10.6575,6.75 9,6.75C8.565,6.75 8.1525,6.8475 7.785,7.0125L7.23,6.465C7.7625,6.18 8.355,6 9,6C11.07,6 12.75,7.68 12.75,9.75L14.25,9.75L12.375,11.625Z"
android:strokeColor="#00000000" android:strokeWidth="1"/>
</vector>

View File

@ -0,0 +1,11 @@
<vector android:autoMirrored="true" android:height="40dp"
android:viewportHeight="40" android:viewportWidth="40"
android:width="40dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillAlpha="0.2" android:fillColor="#000000"
android:fillType="evenOdd"
android:pathData="M20,20m-20,0a20,20 0,1 1,40 0a20,20 0,1 1,-40 0"
android:strokeColor="#00000000" android:strokeWidth="1"/>
<path android:fillColor="#FFFFFF" android:fillType="nonZero"
android:pathData="M25.25,19.25L23.975,19.25C23.975,19.805 23.855,20.3225 23.6525,20.7875L24.575,21.71C24.995,20.975 25.25,20.1425 25.25,19.25L25.25,19.25ZM22.235,19.3775C22.235,19.3325 22.25,19.295 22.25,19.25L22.25,14.75C22.25,13.505 21.245,12.5 20,12.5C18.755,12.5 17.75,13.505 17.75,14.75L17.75,14.885L22.235,19.3775ZM14.2025,13.25L13.25,14.2025L17.7575,18.71L17.7575,19.25C17.7575,20.495 18.755,21.5 20,21.5C20.165,21.5 20.33,21.4775 20.4875,21.44L21.7325,22.685C21.2,22.9325 20.6075,23.075 20,23.075C17.93,23.075 16.025,21.5 16.025,19.25L14.75,19.25C14.75,21.8075 16.79,23.9225 19.25,24.29L19.25,26.75L20.75,26.75L20.75,24.29C21.4325,24.1925 22.0775,23.9525 22.655,23.615L25.7975,26.75L26.75,25.7975L14.2025,13.25Z"
android:strokeColor="#00000000" android:strokeWidth="1"/>
</vector>

View File

@ -0,0 +1,7 @@
<vector android:autoMirrored="true" android:height="18dp"
android:viewportHeight="18" android:viewportWidth="18"
android:width="18dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FFFFFF" android:fillType="nonZero"
android:pathData="M14.25,8.25L12.975,8.25C12.975,8.805 12.855,9.3225 12.6525,9.7875L13.575,10.71C13.995,9.975 14.25,9.1425 14.25,8.25L14.25,8.25ZM11.235,8.3775C11.235,8.3325 11.25,8.295 11.25,8.25L11.25,3.75C11.25,2.505 10.245,1.5 9,1.5C7.755,1.5 6.75,2.505 6.75,3.75L6.75,3.885L11.235,8.3775ZM3.2025,2.25L2.25,3.2025L6.7575,7.71L6.7575,8.25C6.7575,9.495 7.755,10.5 9,10.5C9.165,10.5 9.33,10.4775 9.4875,10.44L10.7325,11.685C10.2,11.9325 9.6075,12.075 9,12.075C6.93,12.075 5.025,10.5 5.025,8.25L3.75,8.25C3.75,10.8075 5.79,12.9225 8.25,13.29L8.25,15.75L9.75,15.75L9.75,13.29C10.4325,13.1925 11.0775,12.9525 11.655,12.615L14.7975,15.75L15.75,14.7975L3.2025,2.25Z"
android:strokeColor="#00000000" android:strokeWidth="1"/>
</vector>

View File

@ -0,0 +1,11 @@
<vector android:autoMirrored="true" android:height="40dp"
android:viewportHeight="40" android:viewportWidth="40"
android:width="40dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillAlpha="0.2" android:fillColor="#000000"
android:fillType="evenOdd"
android:pathData="M20,20m-20,0a20,20 0,1 1,40 0a20,20 0,1 1,-40 0"
android:strokeColor="#00000000" android:strokeWidth="1"/>
<path android:fillColor="#FFFFFF" android:fillType="nonZero"
android:pathData="M13.25,17.75L13.25,22.25L16.25,22.25L20,26L20,14L16.25,17.75L13.25,17.75ZM23.375,20C23.375,18.6725 22.61,17.5325 21.5,16.9775L21.5,23.015C22.61,22.4675 23.375,21.3275 23.375,20ZM21.5,13.4225L21.5,14.9675C23.6675,15.6125 25.25,17.6225 25.25,20C25.25,22.3775 23.6675,24.3875 21.5,25.0325L21.5,26.5775C24.5075,25.895 26.75,23.21 26.75,20C26.75,16.79 24.5075,14.105 21.5,13.4225Z"
android:strokeColor="#00000000" android:strokeWidth="1"/>
</vector>

View File

@ -0,0 +1,7 @@
<vector android:autoMirrored="true" android:height="18dp"
android:viewportHeight="18" android:viewportWidth="18"
android:width="18dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FFFFFF" android:fillType="nonZero"
android:pathData="M2.25,6.75L2.25,11.25L5.25,11.25L9,15L9,3L5.25,6.75L2.25,6.75ZM12.375,9C12.375,7.6725 11.61,6.5325 10.5,5.9775L10.5,12.015C11.61,11.4675 12.375,10.3275 12.375,9ZM10.5,2.4225L10.5,3.9675C12.6675,4.6125 14.25,6.6225 14.25,9C14.25,11.3775 12.6675,13.3875 10.5,14.0325L10.5,15.5775C13.5075,14.895 15.75,12.21 15.75,9C15.75,5.79 13.5075,3.105 10.5,2.4225Z"
android:strokeColor="#00000000" android:strokeWidth="1"/>
</vector>

View File

@ -0,0 +1,11 @@
<vector android:autoMirrored="true" android:height="40dp"
android:viewportHeight="40" android:viewportWidth="40"
android:width="40dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillAlpha="0.2" android:fillColor="#000000"
android:fillType="evenOdd"
android:pathData="M20,20m-20,0a20,20 0,1 1,40 0a20,20 0,1 1,-40 0"
android:strokeColor="#00000000" android:strokeWidth="1"/>
<path android:fillColor="#FFFFFF" android:fillType="nonZero"
android:pathData="M26.75,15.875L23.75,18.875L23.75,16.25C23.75,15.8375 23.4125,15.5 23,15.5L18.365,15.5L26.75,23.885L26.75,15.875ZM13.4525,12.5L12.5,13.4525L14.5475,15.5L14,15.5C13.5875,15.5 13.25,15.8375 13.25,16.25L13.25,23.75C13.25,24.1625 13.5875,24.5 14,24.5L23,24.5C23.1575,24.5 23.2925,24.44 23.405,24.365L25.7975,26.75L26.75,25.7975L13.4525,12.5Z"
android:strokeColor="#00000000" android:strokeWidth="1"/>
</vector>

View File

@ -0,0 +1,7 @@
<vector android:autoMirrored="true" android:height="18dp"
android:viewportHeight="18" android:viewportWidth="18"
android:width="18dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FFFFFF" android:fillType="nonZero"
android:pathData="M15.75,4.875L12.75,7.875L12.75,5.25C12.75,4.8375 12.4125,4.5 12,4.5L7.365,4.5L15.75,12.885L15.75,4.875ZM2.4525,1.5L1.5,2.4525L3.5475,4.5L3,4.5C2.5875,4.5 2.25,4.8375 2.25,5.25L2.25,12.75C2.25,13.1625 2.5875,13.5 3,13.5L12,13.5C12.1575,13.5 12.2925,13.44 12.405,13.365L14.7975,15.75L15.75,14.7975L2.4525,1.5Z"
android:strokeColor="#00000000" android:strokeWidth="1"/>
</vector>

View File

@ -0,0 +1,5 @@
<vector android:autoMirrored="true" android:height="24dp"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M17,10.5V7c0,-0.55 -0.45,-1 -1,-1H4c-0.55,0 -1,0.45 -1,1v10c0,0.55 0.45,1 1,1h12c0.55,0 1,-0.45 1,-1v-3.5l4,4v-11l-4,4z"/>
</vector>

View File

@ -1,10 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- tools:ignore is needed because lint thinks this can be replaced with a merge. Replacing this
with a merge causes the fullscreen SurfaceView not to be centered. -->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:ignore="MergeRootFrame">
<org.webrtc.SurfaceViewRenderer
@ -20,6 +21,68 @@
android:layout_gravity="bottom|end"
android:layout_margin="16dp" />
<ImageView
android:id="@+id/iv_end_call"
android:layout_width="64dp"
android:layout_height="64dp"
android:src="@drawable/ic_call_end"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginBottom="32dp"
app:layout_constraintBottom_toTopOf="@+id/layout_call_actions"/>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/layout_call_actions"
android:layout_width="match_parent"
android:layout_height="80dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:background="@drawable/bg_call_actions">
<ImageView
android:id="@+id/iv_call_speaker"
android:layout_width="32dp"
android:layout_height="32dp"
android:src="@drawable/ic_call_speaker_default"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:layout_marginStart="32dp"/>
<ImageView
android:id="@+id/iv_call_flip_camera"
android:layout_width="32dp"
android:layout_height="32dp"
android:src="@drawable/ic_call_flip_camera_default"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:layout_marginStart="32dp"/>
<ImageView
android:id="@+id/iv_call_videocam_off"
android:layout_width="32dp"
android:layout_height="32dp"
android:src="@drawable/ic_call_videocam_off_default"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<ImageView
android:id="@+id/iv_call_mute"
android:layout_width="32dp"
android:layout_height="32dp"
android:src="@drawable/ic_call_mute_default"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginEnd="32dp"/>
</androidx.constraintlayout.widget.ConstraintLayout>
<FrameLayout
android:id="@+id/hud_fragment_container"
android:layout_width="match_parent"
@ -30,4 +93,4 @@
android:layout_width="match_parent"
android:layout_height="match_parent" />
</FrameLayout>
</FrameLayout>
</androidx.constraintlayout.widget.ConstraintLayout>