tongmengxiao пре 5 месеци
родитељ
комит
c822179841

+ 1 - 1
baseswago/build.gradle

@@ -100,7 +100,7 @@ dependencies {
     api 'top.zibin:Luban:1.1.8'
     api 'com.gitee.hhqhonghengqiang:easy-photos:3.1.8'
     //facebook`
-    api 'com.facebook.android:facebook-android-sdk:14.1.0'
+    api 'com.facebook.android:facebook-android-sdk:17.0.0'
     //google
     api 'com.google.android.gms:play-services-auth:19.0.0'
     //im

+ 10 - 0
home/src/main/res/layout/item_home.xml

@@ -22,6 +22,16 @@
         android:layout_width="18dp"
         android:layout_height="18dp"/>
 
+    <ImageView
+        android:layout_width="22dp"
+        android:layout_height="15dp"
+        android:layout_marginTop="8dp"
+        android:layout_marginStart="8dp"
+        app:layout_constraintTop_toTopOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        android:src="@mipmap/ic_live_lock"
+        android:visibility="gone"/>
+
 
     <com.swago.baseswago.cusview.BoldTextView
         android:id="@+id/tvName"

BIN
home/src/main/res/mipmap-xxhdpi/ic_live_lock.png


+ 55 - 0
room/src/main/java/com/swago/room/dialog/CloseLiveDialog.kt

@@ -0,0 +1,55 @@
+package com.swago.room.dialog
+
+import android.os.Bundle
+import android.os.CountDownTimer
+import android.view.Gravity
+import androidx.fragment.app.viewModels
+import com.swago.baseswago.baseroom.SwagoRoomManager
+import com.swago.baseswago.dialog.BaseXDFragment
+import com.swago.baseswago.util.NoDoubleClickListener
+import com.swago.baseswago.util.SwagoLoading
+import com.swago.room.bean.UserRoomModel
+import com.swago.room.databinding.DialogAudioNoticeBinding
+import com.swago.room.databinding.DialogCloseLiveBinding
+import com.swago.room.vm.RoomOtherVm
+
+class CloseLiveDialog : BaseXDFragment<DialogCloseLiveBinding>() {
+
+    private lateinit var countDownTimer: CountDownTimer
+    private val totalTimeInMillis: Long = 15000
+
+    init {
+        setGravity(Gravity.CENTER)
+        setDimAmount(0.5f)
+        setCanCancel(false)
+    }
+
+
+    companion object {
+        fun newInstance(): CloseLiveDialog {
+            val args = Bundle()
+            val fragment = CloseLiveDialog()
+            fragment.arguments = args
+            return fragment
+        }
+    }
+
+    override fun initOther() {
+        countDownTimer = object : CountDownTimer(totalTimeInMillis, 1000) {
+            override fun onTick(millisUntilFinished: Long) {
+                val secondsRemaining = millisUntilFinished / 1000
+
+            }
+
+            override fun onFinish() {
+
+            }
+
+        }
+        countDownTimer.start()
+    }
+
+    override fun initLiveData() {
+
+    }
+}

+ 100 - 0
room/src/main/res/layout/dialog_close_live.xml

@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    app:layout_constraintTop_toTopOf="parent"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools">
+
+
+    <androidx.constraintlayout.widget.ConstraintLayout
+        android:background="@drawable/shape_white_20"
+        app:layout_constraintTop_toTopOf="parent"
+        android:layout_marginStart="40dp"
+        android:layout_marginEnd="40dp"
+        android:paddingBottom="30dp"
+        android:layout_marginTop="@dimen/dp_40"
+        app:layout_constraintBottom_toBottomOf="parent"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content">
+
+
+    <TextView
+        android:id="@+id/tv_close_title"
+        android:text="Account has been banned"
+        android:textColor="#0F172A"
+        android:textSize="18sp"
+        android:textStyle="bold"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent"
+        android:layout_marginTop="30dp"/>
+
+    <TextView
+        android:id="@+id/tv_hint"
+        android:text="Please contact customer service if you have any questions."
+        android:textColor="#0F172A"
+        android:textSize="14sp"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        android:layout_marginTop="16dp"
+        android:gravity="center"
+        app:layout_constraintTop_toBottomOf="@+id/tv_close_title"/>
+
+    <TextView
+        android:id="@+id/tv_time"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="32dp"
+        android:layout_marginEnd="32dp"
+        android:layout_marginTop="16dp"
+        android:textSize="@dimen/sp_14"
+        android:text="The live will be closed after 5s."
+        android:textColor="#DC2626"
+        android:gravity="center"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/tv_hint"/>
+
+    <TextView
+        android:id="@+id/tv_setting"
+        android:layout_width="match_parent"
+        android:layout_height="50dp"
+        android:layout_marginTop="20dp"
+        app:layout_constraintTop_toBottomOf="@+id/tv_time"
+        app:layout_constraintEnd_toEndOf="parent"
+        android:layout_marginEnd="20dp"
+        android:textColor="#fff"
+        android:textSize="@dimen/sp_16"
+        android:text="Close the Live"
+        android:gravity="center"
+        android:layout_marginBottom="30dp"
+        android:layout_marginStart="30dp"
+        android:background="@drawable/shape_9b20fc_20"/>
+
+    </androidx.constraintlayout.widget.ConstraintLayout>
+
+    <ImageView
+        android:id="@+id/iv_bg"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:background="@mipmap/bg_close_live"
+        android:layout_marginStart="40dp"
+        android:layout_marginEnd="40dp"
+        android:layout_marginTop="@dimen/dp_40"
+
+        app:layout_constraintTop_toTopOf="parent"/>
+
+    <ImageView
+        android:layout_width="80dp"
+        android:layout_height="80dp"
+        android:src="@mipmap/ic_close_live"
+        app:layout_constraintTop_toTopOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintEnd_toEndOf="parent"/>
+
+</androidx.constraintlayout.widget.ConstraintLayout>

BIN
room/src/main/res/mipmap-xxhdpi/bg_close_live.png


BIN
room/src/main/res/mipmap-xxhdpi/ic_close_live.png