Compare commits
8 Commits
native1
...
98e7d57c7d
| Author | SHA1 | Date | |
|---|---|---|---|
| 98e7d57c7d | |||
| 3c8ac29398 | |||
| 5f945fe6e3 | |||
| 11ab4e244d | |||
| 5cafd2ac1d | |||
| c2b947c630 | |||
| d60322cbc2 | |||
| 88c791a520 |
@@ -101,8 +101,8 @@ dependencies {
|
||||
implementation("com.yanzhenjie.recyclerview:x:1.3.2")
|
||||
//Android-PickerView-时间弹窗
|
||||
implementation("com.contrarywind:Android-PickerView:4.1.9")
|
||||
//基于exoPlayer 自定义播放器 JPlayer支持功能
|
||||
implementation("com.ycjiang:VideoPlayModule-Lite:2.3.61")
|
||||
// GSYVideoPlayer
|
||||
implementation("io.github.carguo:gsyvideoplayer:13.0.0")
|
||||
|
||||
|
||||
}
|
||||
@@ -22,11 +22,20 @@
|
||||
android:allowBackup="true"
|
||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||
android:fullBackupContent="@xml/backup_rules"
|
||||
android:icon="@mipmap/loge"
|
||||
android:icon="@mipmap/logo"
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.DefenseApplication">
|
||||
<activity
|
||||
android:name=".home.StartActivity"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".personal.LoginPasswordActivity"
|
||||
android:exported="false" />
|
||||
@@ -90,6 +99,7 @@
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".liveVideo.LiveVideoActivity"
|
||||
android:configChanges="orientation|screenSize|keyboardHidden"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".home.SetNameActivity"
|
||||
@@ -108,7 +118,8 @@
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".home.HomeActivity"
|
||||
android:exported="false" />
|
||||
android:exported="false">
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".login.RegisterSuccessActivity"
|
||||
android:exported="false" />
|
||||
@@ -126,13 +137,7 @@
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".login.LoginActivity"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
android:exported="false" />
|
||||
|
||||
<provider
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
|
||||
@@ -15,11 +15,6 @@ class MyApplication : Application() {
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
Utils.init(this) // 初始化 AndroidUtilCode
|
||||
|
||||
var token = UserinfoUtil.getUserInfo()?.access_token;
|
||||
if (token != null) {
|
||||
ApiConfig.authToken = token
|
||||
};
|
||||
LanguageUtil.init(this)
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ class AddDeviceAdapter(
|
||||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||
val device = devices[position]
|
||||
holder.tvName.text = device.name
|
||||
holder.ivIcon.setImageResource(R.drawable.img)
|
||||
holder.ivIcon.setImageResource(R.mipmap.img)
|
||||
|
||||
// 点击事件
|
||||
holder.itemView.setOnClickListener { onItemClick(device) }
|
||||
|
||||
@@ -64,7 +64,7 @@ class FamilyAdapter(
|
||||
binding.tvFamilyName.setTextColor(binding.root.context.getColor(R.color.white))
|
||||
binding.tvFamilyRole.setTextColor(binding.root.context.getColor(R.color.white))
|
||||
binding.ivCheck.visibility = View.VISIBLE
|
||||
binding.ivCheck.setImageResource(R.drawable.ic_check_white)
|
||||
binding.ivCheck.setImageResource(R.mipmap.ic_check_white)
|
||||
} else {
|
||||
binding.layoutFamilyItem.setBackgroundResource(0)
|
||||
binding.tvFamilyName.setTextColor(binding.root.context.getColor(R.color.black))
|
||||
|
||||
@@ -37,10 +37,10 @@ class HomeActivity : BaseActivity() {
|
||||
binding.tabHome.setOnClickListener {
|
||||
switchFragment(homeMenuFragment)
|
||||
// 切换图标 + 文字颜色
|
||||
binding.ivHome.setImageResource(R.drawable.home_checked)
|
||||
binding.ivHome.setImageResource(R.mipmap.home_checked)
|
||||
binding.tvHome.setTextColor(resources.getColor(R.color.ic_selected))
|
||||
|
||||
binding.ivProfile.setImageResource(R.drawable.profile)
|
||||
binding.ivProfile.setImageResource(R.mipmap.profile)
|
||||
binding.tvProfile.setTextColor(resources.getColor(R.color.ic_normal))
|
||||
}
|
||||
|
||||
@@ -48,10 +48,10 @@ class HomeActivity : BaseActivity() {
|
||||
binding.tabProfile.setOnClickListener {
|
||||
switchFragment(personalFragment)
|
||||
// 切换图标 + 文字颜色
|
||||
binding.ivHome.setImageResource(R.drawable.home)
|
||||
binding.ivHome.setImageResource(R.mipmap.home)
|
||||
binding.tvHome.setTextColor(resources.getColor(R.color.ic_normal))
|
||||
|
||||
binding.ivProfile.setImageResource(R.drawable.profile_checked)
|
||||
binding.ivProfile.setImageResource(R.mipmap.profile_checked)
|
||||
binding.tvProfile.setTextColor(resources.getColor(R.color.ic_selected))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ class PersonalFragment : Fragment() {
|
||||
.titleBar(binding.headerLayout)
|
||||
.init()
|
||||
Glide.with(this)
|
||||
.load(R.drawable.img)
|
||||
.load(R.mipmap.img)
|
||||
.circleCrop()
|
||||
.into(binding.ivAvatar)
|
||||
binding.headerLayout.setOnClickListener {
|
||||
@@ -243,8 +243,8 @@ class PersonalFragment : Fragment() {
|
||||
}
|
||||
userInfo.avatar?.let {
|
||||
val requestOptions = RequestOptions()
|
||||
.placeholder(R.drawable.img) // 加载中显示
|
||||
.error(R.drawable.img) // 失败时显示
|
||||
.placeholder(R.mipmap.img) // 加载中显示
|
||||
.error(R.mipmap.img) // 失败时显示
|
||||
|
||||
Glide.with(this)
|
||||
.load(it) // 如果 avatar 为 null,Glide 会直接回调 error
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.example.defenseapplication.home
|
||||
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import com.example.defenseapplication.databinding.ActivityStartBinding
|
||||
import com.example.defenseapplication.login.LoginActivity
|
||||
import com.example.defenseapplication.utils.ApiConfig
|
||||
import com.example.defenseapplication.utils.UserinfoUtil
|
||||
|
||||
class StartActivity : AppCompatActivity() {
|
||||
private lateinit var binding: ActivityStartBinding
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
binding = ActivityStartBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
|
||||
// 延迟2秒后再判断登录状态
|
||||
Handler(Looper.getMainLooper()).postDelayed({
|
||||
val userInfo = UserinfoUtil.getUserInfo()
|
||||
if (userInfo != null) {
|
||||
// 设置token
|
||||
ApiConfig.authToken = userInfo.access_token
|
||||
val intent = Intent(this, HomeActivity::class.java)
|
||||
startActivity(intent)
|
||||
} else {
|
||||
val intent = Intent(this, LoginActivity::class.java)
|
||||
startActivity(intent)
|
||||
}
|
||||
finish()
|
||||
}, 2000) // 2秒延迟
|
||||
}
|
||||
}
|
||||
@@ -1,39 +1,32 @@
|
||||
package com.example.defenseapplication.liveVideo
|
||||
|
||||
import android.content.res.Configuration
|
||||
import android.content.Context
|
||||
import android.graphics.Color
|
||||
import android.media.AudioManager
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.WindowManager
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.SeekBar
|
||||
import android.widget.TextView
|
||||
import android.widget.Toast
|
||||
import androidx.activity.OnBackPressedCallback
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import chuangyuan.ycj.videolibrary.listener.VideoInfoListener
|
||||
import chuangyuan.ycj.videolibrary.video.ExoUserPlayer
|
||||
import chuangyuan.ycj.videolibrary.video.VideoPlayerManager
|
||||
import com.google.android.exoplayer2.ui.PlayerView
|
||||
import com.google.android.exoplayer2.SimpleExoPlayer
|
||||
import com.example.defenseapplication.R
|
||||
import com.example.defenseapplication.adapter.AlarmLogAdapter
|
||||
import com.example.defenseapplication.bean.DeviceAlarmBean
|
||||
import com.example.defenseapplication.bean.DeviceAlarmResponse
|
||||
import com.example.defenseapplication.databinding.AlarmLogActivityBinding
|
||||
import com.example.defenseapplication.utils.RetrofitNetwork
|
||||
import com.gyf.immersionbar.ImmersionBar
|
||||
import kotlinx.coroutines.launch
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder
|
||||
import com.shuyu.gsyvideoplayer.listener.GSYSampleCallBack
|
||||
import com.shuyu.gsyvideoplayer.utils.OrientationUtils
|
||||
import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer
|
||||
import com.bigkoo.pickerview.builder.TimePickerBuilder
|
||||
import com.bigkoo.pickerview.listener.OnTimeSelectListener
|
||||
import com.example.defenseapplication.view.MyGSYVideoPlayer
|
||||
import com.shuyu.gsyvideoplayer.GSYVideoManager
|
||||
import kotlinx.coroutines.launch
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
|
||||
//告警记录
|
||||
class AlarmLogActivity : AppCompatActivity() {
|
||||
@@ -42,151 +35,105 @@ class AlarmLogActivity : AppCompatActivity() {
|
||||
private var adapter: AlarmLogAdapter? = null
|
||||
private val alarmList = mutableListOf<DeviceAlarmBean>()
|
||||
private val originalAlarmList = mutableListOf<DeviceAlarmBean>()
|
||||
private lateinit var exoPlayerManager: ExoUserPlayer
|
||||
private var isMuted = false
|
||||
private var isPlaying = false
|
||||
private var deviceId: String? = null
|
||||
private var isLoading = false
|
||||
private var fromLiveVideo = false
|
||||
private var isFullScreen = false
|
||||
private var isControlsVisible = false
|
||||
private val hideDelay = 5000L // 5秒自动隐藏
|
||||
private val hideHandler = Handler(Looper.getMainLooper())
|
||||
private val hideRunnable = Runnable {
|
||||
hideControls()
|
||||
}
|
||||
private var passedVideoUrl: String? = null
|
||||
private var passedSelectedId: String? = null
|
||||
private var passedCreateTime: String? = null
|
||||
private var totalDuration: Long = 0
|
||||
private val progressHandler = Handler(Looper.getMainLooper())
|
||||
private val progressRunnable = object : Runnable {
|
||||
override fun run() {
|
||||
updateProgress()
|
||||
progressHandler.postDelayed(this, 1000)
|
||||
}
|
||||
}
|
||||
private var videoUrl: String? = null
|
||||
private var orientationUtils: OrientationUtils? = null
|
||||
|
||||
private var isMute = false
|
||||
private lateinit var audioManager: AudioManager
|
||||
private var isRightMenuVisible = false
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
binding = AlarmLogActivityBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
|
||||
window.setFlags(
|
||||
WindowManager.LayoutParams.FLAG_FULLSCREEN,
|
||||
WindowManager.LayoutParams.FLAG_FULLSCREEN
|
||||
)
|
||||
audioManager = getSystemService(Context.AUDIO_SERVICE) as AudioManager
|
||||
|
||||
deviceId = intent.getStringExtra("device_id")
|
||||
fromLiveVideo = intent.getBooleanExtra("from_live_video", false)
|
||||
passedVideoUrl = intent.getStringExtra("video_url")
|
||||
passedSelectedId = intent.getStringExtra("selected_id")
|
||||
passedCreateTime = intent.getStringExtra("create_time")
|
||||
videoUrl = intent.getStringExtra("video_url")
|
||||
calendar = Calendar.getInstance()
|
||||
updateDateDisplay()
|
||||
initVideoPlayer()
|
||||
initRecyclerView()
|
||||
fetchAlarmList()
|
||||
initListener()
|
||||
|
||||
// onBackPressedDispatcher.addCallback(this, object : OnBackPressedCallback(true) {
|
||||
// override fun handleOnBackPressed() {
|
||||
// if (exoPlayerManager.onBackPressed()) {
|
||||
// return
|
||||
// }
|
||||
// finish()
|
||||
// }
|
||||
// })
|
||||
}
|
||||
|
||||
private fun dpToPx(dp: Int): Int {
|
||||
val density = resources.displayMetrics.density
|
||||
return (dp * density).toInt()
|
||||
}
|
||||
|
||||
private fun initVideoPlayer() {
|
||||
val videoPlayerView = binding.exoPlayContextId
|
||||
val videoUri = if (fromLiveVideo && !passedVideoUrl.isNullOrEmpty()) {
|
||||
passedVideoUrl!!
|
||||
} else {
|
||||
"https://media.w3.org/2010/05/sintel/trailer.mp4"
|
||||
}
|
||||
val videoUrl = intent.getStringExtra("video_url") ?: "https://media.w3.org/2010/05/sintel/trailer.mp4"
|
||||
val progressDrawable = ContextCompat.getDrawable(this, R.drawable.progress_video)
|
||||
val thumbDrawable = ContextCompat.getDrawable(this, R.drawable.thumb_video)
|
||||
|
||||
exoPlayerManager = VideoPlayerManager.Builder(VideoPlayerManager.TYPE_PLAY_GESTURE, videoPlayerView)
|
||||
.setPlayUri(videoUri)
|
||||
.setPosition(0)
|
||||
.addVideoInfoListener(object : VideoInfoListener {
|
||||
override fun onPlayStart(p0: Long) {
|
||||
Log.d("AlarmLogActivity", "视频开始播放")
|
||||
startProgressUpdate()
|
||||
showControls()
|
||||
resetHideTimer()
|
||||
orientationUtils = OrientationUtils(this, binding.exoPlayContextId)
|
||||
orientationUtils?.isEnable = true
|
||||
|
||||
GSYVideoOptionBuilder()
|
||||
.setUrl(videoUrl)
|
||||
.setVideoTitle("")
|
||||
.setNeedLockFull(true)
|
||||
.setCacheWithPlay(false)
|
||||
.setRotateViewAuto(true)
|
||||
.setLockLand(false)
|
||||
.setShowFullAnimation(true)
|
||||
.setNeedShowWifiTip(false)
|
||||
.setEnlargeImageRes(R.mipmap.full_size)
|
||||
.setShrinkImageRes(R.mipmap.full_screen)
|
||||
.setBottomShowProgressBarDrawable(progressDrawable, thumbDrawable)
|
||||
.setVideoAllCallBack(object : GSYSampleCallBack() {
|
||||
override fun onPrepared(url: String?, vararg objects: Any?) {
|
||||
super.onPrepared(url, *objects)
|
||||
orientationUtils?.isEnable = true
|
||||
}
|
||||
|
||||
override fun onLoadingChanged() {
|
||||
}
|
||||
|
||||
override fun onPlayerError(p0: com.google.android.exoplayer2.ExoPlaybackException?) {
|
||||
Toast.makeText(this@AlarmLogActivity, "播放失败", Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
|
||||
override fun onPlayEnd() {
|
||||
Log.d("AlarmLogActivity", "播放结束")
|
||||
stopProgressUpdate()
|
||||
hideControls()
|
||||
}
|
||||
|
||||
override fun isPlaying(p0: Boolean) {
|
||||
isPlaying = p0
|
||||
if (p0) {
|
||||
startProgressUpdate()
|
||||
// 视频开始播放时,如果控制栏可见,启动自动隐藏计时器
|
||||
if (isControlsVisible) {
|
||||
resetHideTimer()
|
||||
}
|
||||
} else {
|
||||
stopProgressUpdate()
|
||||
// 视频暂停时,取消自动隐藏计时器,保持控制栏显示
|
||||
hideHandler.removeCallbacks(hideRunnable)
|
||||
showControls()
|
||||
}
|
||||
}
|
||||
|
||||
fun onRepeatModeChanged(p0: Int) {
|
||||
override fun onQuitFullscreen(url: String?, vararg objects: Any?) {
|
||||
super.onQuitFullscreen(url, *objects)
|
||||
orientationUtils?.backToProtVideo()
|
||||
}
|
||||
})
|
||||
.create()
|
||||
.build(binding.exoPlayContextId)
|
||||
binding.exoPlayContextId.backButton.setOnClickListener {
|
||||
|
||||
exoPlayerManager.startPlayer()
|
||||
|
||||
setupControllerVisibilityListener()
|
||||
updateProgress()
|
||||
}
|
||||
|
||||
private fun setupControllerVisibilityListener() {
|
||||
// 移除原来的控制器监听器,改为自定义控制逻辑
|
||||
}
|
||||
|
||||
private fun findPlayerView(view: View): PlayerView? {
|
||||
if (view is PlayerView) {
|
||||
return view
|
||||
if (orientationUtils?.isLand == 1) {
|
||||
// 当前全屏,先退出全屏
|
||||
binding.exoPlayContextId.fullscreenButton.performClick()
|
||||
} else {
|
||||
finish()
|
||||
}
|
||||
}
|
||||
if (view is ViewGroup) {
|
||||
for (i in 0 until view.childCount) {
|
||||
val child = view.getChildAt(i)
|
||||
val found = findPlayerView(child)
|
||||
if (found != null) {
|
||||
return found
|
||||
|
||||
binding.exoPlayContextId.onControlVisibilityChanged = { show ->
|
||||
Log.e("GSY_TEST", "Activity收到回调 show=$show")
|
||||
val visible = if (show) View.VISIBLE else View.GONE
|
||||
|
||||
binding.ivDownload.visibility = visible
|
||||
binding.ivDelete.visibility = visible
|
||||
binding.ivMute.visibility = visible
|
||||
}
|
||||
|
||||
binding.exoPlayContextId.startPlayLogic()
|
||||
binding.exoPlayContextId.fullscreenButton.setOnClickListener {
|
||||
orientationUtils?.resolveByClick()
|
||||
|
||||
binding.exoPlayContextId.startWindowFullscreen(this, true, true)?.let { fullPlayer ->
|
||||
|
||||
if (fullPlayer is MyGSYVideoPlayer) {
|
||||
fullPlayer.onControlVisibilityChanged = { show ->
|
||||
val visible = if (show) View.VISIBLE else View.GONE
|
||||
binding.ivDownload.visibility = visible
|
||||
binding.ivDelete.visibility = visible
|
||||
binding.ivMute.visibility = visible
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
private fun initRecyclerView() {
|
||||
adapter = AlarmLogAdapter(alarmList) { item ->
|
||||
if (!item.video.isNullOrEmpty()) {
|
||||
playVideo(item.video!!)
|
||||
Toast.makeText(this, "该告警记录有视频", Toast.LENGTH_SHORT).show()
|
||||
} else {
|
||||
Toast.makeText(this, "该告警记录没有视频", Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
@@ -195,68 +142,6 @@ class AlarmLogActivity : AppCompatActivity() {
|
||||
binding.alarmListRecyclerView.adapter = adapter
|
||||
}
|
||||
|
||||
private fun playVideo(videoUrl: String) {
|
||||
exoPlayerManager.onDestroy()
|
||||
|
||||
exoPlayerManager = VideoPlayerManager.Builder(VideoPlayerManager.TYPE_PLAY_GESTURE, binding.exoPlayContextId)
|
||||
.setPlayUri(videoUrl)
|
||||
.setPosition(0)
|
||||
.addVideoInfoListener(object : VideoInfoListener {
|
||||
override fun onPlayStart(p0: Long) {
|
||||
Log.d("AlarmLogActivity", "视频开始播放")
|
||||
startProgressUpdate()
|
||||
showControls()
|
||||
resetHideTimer()
|
||||
}
|
||||
|
||||
override fun onLoadingChanged() {
|
||||
}
|
||||
|
||||
override fun onPlayerError(p0: com.google.android.exoplayer2.ExoPlaybackException?) {
|
||||
Toast.makeText(this@AlarmLogActivity, "播放失败", Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
|
||||
override fun onPlayEnd() {
|
||||
Log.d("AlarmLogActivity", "播放结束")
|
||||
stopProgressUpdate()
|
||||
hideControls()
|
||||
}
|
||||
|
||||
override fun isPlaying(p0: Boolean) {
|
||||
isPlaying = p0
|
||||
if (p0) {
|
||||
startProgressUpdate()
|
||||
// 视频开始播放时,如果控制栏可见,启动自动隐藏计时器
|
||||
if (isControlsVisible) {
|
||||
resetHideTimer()
|
||||
}
|
||||
} else {
|
||||
stopProgressUpdate()
|
||||
// 视频暂停时,取消自动隐藏计时器,保持控制栏显示
|
||||
hideHandler.removeCallbacks(hideRunnable)
|
||||
showControls()
|
||||
}
|
||||
}
|
||||
|
||||
fun onRepeatModeChanged(p0: Int) {
|
||||
}
|
||||
})
|
||||
.create()
|
||||
|
||||
exoPlayerManager.startPlayer()
|
||||
|
||||
// 保持当前的静音状态
|
||||
if (isMuted) {
|
||||
try {
|
||||
val method = exoPlayerManager.javaClass.getMethod("getPlayer")
|
||||
val player = method.invoke(exoPlayerManager) as? SimpleExoPlayer
|
||||
player?.volume = 0f
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun fetchAlarmList() {
|
||||
val currentDeviceId = deviceId ?: return
|
||||
|
||||
@@ -328,226 +213,34 @@ class AlarmLogActivity : AppCompatActivity() {
|
||||
binding.tvDate.text = "${month}月${day}日"
|
||||
}
|
||||
|
||||
private fun showControls() {
|
||||
isControlsVisible = true
|
||||
binding.functionBar.visibility = View.VISIBLE
|
||||
binding.muteBar.visibility = View.VISIBLE
|
||||
binding.playBar.visibility = View.VISIBLE
|
||||
binding.progressBar.visibility = View.VISIBLE
|
||||
// 只有在视频播放时才启动自动隐藏计时器
|
||||
if (isPlaying) {
|
||||
resetHideTimer()
|
||||
}
|
||||
}
|
||||
|
||||
private fun hideControls() {
|
||||
isControlsVisible = false
|
||||
binding.functionBar.visibility = View.GONE
|
||||
binding.muteBar.visibility = View.GONE
|
||||
binding.playBar.visibility = View.GONE
|
||||
binding.progressBar.visibility = View.GONE
|
||||
}
|
||||
|
||||
private fun toggleControls() {
|
||||
if (isControlsVisible) {
|
||||
hideControls()
|
||||
} else {
|
||||
showControls()
|
||||
}
|
||||
}
|
||||
|
||||
private fun resetHideTimer() {
|
||||
hideHandler.removeCallbacks(hideRunnable)
|
||||
// 只有在视频播放时才启动自动隐藏计时器
|
||||
if (isPlaying) {
|
||||
hideHandler.postDelayed(hideRunnable, hideDelay)
|
||||
}
|
||||
}
|
||||
|
||||
private fun initListener() {
|
||||
// 点击视频区域切换控制栏显示/隐藏
|
||||
binding.exoPlayContextId.setOnClickListener {
|
||||
toggleControls()
|
||||
}
|
||||
|
||||
// 控制栏上的按钮点击时重置隐藏计时器
|
||||
binding.ivBack.setOnClickListener {
|
||||
resetHideTimer()
|
||||
finish()
|
||||
}
|
||||
|
||||
binding.expandImg.setOnClickListener {
|
||||
showDatePicker()
|
||||
}
|
||||
|
||||
binding.ivMute.setOnClickListener {
|
||||
resetHideTimer()
|
||||
toggleMute()
|
||||
}
|
||||
|
||||
binding.ivDownload.setOnClickListener {
|
||||
resetHideTimer()
|
||||
downloadVideo()
|
||||
Toast.makeText(this,"下载视频",Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
|
||||
binding.ivDelete.setOnClickListener {
|
||||
resetHideTimer()
|
||||
deleteVideo()
|
||||
|
||||
}
|
||||
|
||||
binding.ivFullScreen.setOnClickListener {
|
||||
resetHideTimer()
|
||||
toggleFullScreen()
|
||||
}
|
||||
|
||||
binding.ivPlay.setOnClickListener {
|
||||
resetHideTimer()
|
||||
togglePlay()
|
||||
}
|
||||
|
||||
binding.seekBar.setOnSeekBarChangeListener(object : android.widget.SeekBar.OnSeekBarChangeListener {
|
||||
override fun onProgressChanged(seekBar: android.widget.SeekBar?, progress: Int, fromUser: Boolean) {
|
||||
if (fromUser) {
|
||||
resetHideTimer()
|
||||
exoPlayerManager.seekTo(progress.toLong() * 1000)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onStartTrackingTouch(seekBar: android.widget.SeekBar?) {
|
||||
resetHideTimer()
|
||||
}
|
||||
|
||||
override fun onStopTrackingTouch(seekBar: android.widget.SeekBar?) {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
private fun toggleMute() {
|
||||
isMuted = !isMuted
|
||||
try {
|
||||
// 通过反射获取底层的 ExoPlayer 实例
|
||||
val method = exoPlayerManager.javaClass.getMethod("getPlayer")
|
||||
val player = method.invoke(exoPlayerManager) as? SimpleExoPlayer
|
||||
|
||||
if (isMuted) {
|
||||
binding.ivMute.setImageResource(R.drawable.mute)
|
||||
player?.volume = 0f
|
||||
Toast.makeText(this, R.string.sound_off, Toast.LENGTH_SHORT).show()
|
||||
binding.ivMute.setOnClickListener {
|
||||
isMute = !isMute
|
||||
if (isMute) {
|
||||
audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, 0, 0)
|
||||
binding.ivMute.setImageResource(
|
||||
R.mipmap.mute
|
||||
)
|
||||
} else {
|
||||
binding.ivMute.setImageResource(R.drawable.un_mute)
|
||||
player?.volume = 1f
|
||||
Toast.makeText(this, R.string.sound_on, Toast.LENGTH_SHORT).show()
|
||||
audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, audioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC) / 2, 0)
|
||||
binding.ivMute.setImageResource(
|
||||
R.mipmap.un_mute
|
||||
)
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
Toast.makeText(this, "音量控制失败", Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
}
|
||||
|
||||
private fun downloadVideo() {
|
||||
Toast.makeText(this, R.string.download, Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
|
||||
private fun deleteVideo() {
|
||||
Toast.makeText(this, R.string.delete, Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
|
||||
private fun updateProgress() {
|
||||
val currentPosition = exoPlayerManager.getCurrentPosition()
|
||||
totalDuration = exoPlayerManager.getDuration()
|
||||
|
||||
binding.tvCurrentTime.text = formatTime(currentPosition)
|
||||
binding.tvTotalTime.text = formatTime(totalDuration)
|
||||
|
||||
if (totalDuration > 0) {
|
||||
val progress = (currentPosition * 100 / totalDuration).toInt()
|
||||
binding.seekBar.progress = progress
|
||||
}
|
||||
}
|
||||
|
||||
private fun formatTime(milliseconds: Long): String {
|
||||
val seconds = (milliseconds / 1000).toInt()
|
||||
val hours = seconds / 3600
|
||||
val minutes = (seconds % 3600) / 60
|
||||
val secs = seconds % 60
|
||||
|
||||
return if (hours > 0) {
|
||||
String.format("%02d:%02d:%02d", hours, minutes, secs)
|
||||
} else {
|
||||
String.format("%02d:%02d", minutes, secs)
|
||||
}
|
||||
}
|
||||
|
||||
private fun startProgressUpdate() {
|
||||
stopProgressUpdate()
|
||||
progressHandler.post(progressRunnable)
|
||||
}
|
||||
|
||||
private fun stopProgressUpdate() {
|
||||
progressHandler.removeCallbacks(progressRunnable)
|
||||
}
|
||||
|
||||
private fun toggleFullScreen() {
|
||||
isFullScreen = !isFullScreen
|
||||
if (isFullScreen) {
|
||||
binding.ivFullScreen.setImageResource(R.drawable.full_screen)
|
||||
requestedOrientation = android.content.pm.ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE
|
||||
} else {
|
||||
binding.ivFullScreen.setImageResource(R.drawable.full_size)
|
||||
requestedOrientation = android.content.pm.ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
|
||||
}
|
||||
}
|
||||
|
||||
private fun togglePlay() {
|
||||
isPlaying = !isPlaying
|
||||
if (isPlaying) {
|
||||
binding.ivPlay.setImageResource(R.drawable.zt)
|
||||
exoPlayerManager.startPlayer()
|
||||
} else {
|
||||
binding.ivPlay.setImageResource(R.drawable.start)
|
||||
exoPlayerManager.onPause()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
exoPlayerManager.onResume()
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
super.onPause()
|
||||
exoPlayerManager.onPause()
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
exoPlayerManager.onDestroy()
|
||||
}
|
||||
|
||||
override fun onConfigurationChanged(newConfig: Configuration) {
|
||||
super.onConfigurationChanged(newConfig)
|
||||
|
||||
if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||
// 进入横屏(全屏)模式
|
||||
binding.titleLayout.visibility = View.GONE
|
||||
binding.alarmListRecyclerView.visibility = View.GONE
|
||||
|
||||
val params = binding.exoPlayContextId.layoutParams
|
||||
params.width = LinearLayout.LayoutParams.MATCH_PARENT
|
||||
params.height = LinearLayout.LayoutParams.MATCH_PARENT
|
||||
binding.exoPlayContextId.layoutParams = params
|
||||
} else if (newConfig.orientation == Configuration.ORIENTATION_PORTRAIT) {
|
||||
// 进入竖屏(非全屏)模式
|
||||
binding.titleLayout.visibility = View.VISIBLE
|
||||
binding.alarmListRecyclerView.visibility = View.VISIBLE
|
||||
|
||||
val params = binding.exoPlayContextId.layoutParams
|
||||
params.width = LinearLayout.LayoutParams.MATCH_PARENT
|
||||
params.height = dpToPx(280)
|
||||
binding.exoPlayContextId.layoutParams = params
|
||||
}
|
||||
|
||||
exoPlayerManager.onConfigurationChanged(newConfig)
|
||||
|
||||
}
|
||||
|
||||
private fun showDatePicker() {
|
||||
@@ -568,4 +261,21 @@ class AlarmLogActivity : AppCompatActivity() {
|
||||
.build()
|
||||
timePicker.show()
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
super.onPause()
|
||||
binding.exoPlayContextId.onVideoPause()
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
binding.exoPlayContextId.onVideoResume()
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
|
||||
orientationUtils?.releaseListener()
|
||||
binding.exoPlayContextId.release()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,47 +1,34 @@
|
||||
package com.example.defenseapplication.liveVideo
|
||||
|
||||
import android.Manifest
|
||||
import android.content.Intent
|
||||
import android.content.pm.PackageManager
|
||||
import android.media.MediaRecorder
|
||||
import android.content.res.Configuration
|
||||
import android.graphics.Color
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import android.view.animation.ScaleAnimation
|
||||
import android.widget.Toast
|
||||
import androidx.activity.result.contract.ActivityResultContracts
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import android.view.View
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import chuangyuan.ycj.videolibrary.video.ExoUserPlayer
|
||||
import com.bumptech.glide.Glide
|
||||
import com.example.defenseapplication.R
|
||||
import com.example.defenseapplication.adapter.AlarmLogHorizontalAdapter
|
||||
import com.example.defenseapplication.base.BaseActivity
|
||||
import com.example.defenseapplication.bean.DeviceAlarmBean
|
||||
import com.example.defenseapplication.bean.DeviceAlarmResponse
|
||||
import com.example.defenseapplication.databinding.LiveVideoActivityBinding
|
||||
import com.example.defenseapplication.utils.ActivityManager
|
||||
import com.example.defenseapplication.utils.RetrofitNetwork
|
||||
import com.gyf.immersionbar.ImmersionBar
|
||||
import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder
|
||||
import com.shuyu.gsyvideoplayer.listener.GSYSampleCallBack
|
||||
import com.shuyu.gsyvideoplayer.utils.OrientationUtils
|
||||
import kotlinx.coroutines.launch
|
||||
import java.io.File
|
||||
import java.io.IOException
|
||||
import android.content.res.Configuration
|
||||
import androidx.activity.OnBackPressedCallback
|
||||
import chuangyuan.ycj.videolibrary.listener.VideoInfoListener
|
||||
import chuangyuan.ycj.videolibrary.video.VideoPlayerManager
|
||||
import android.view.View
|
||||
import com.bumptech.glide.Glide
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
|
||||
class LiveVideoActivity : BaseActivity() {
|
||||
private lateinit var binding: LiveVideoActivityBinding
|
||||
|
||||
private lateinit var exoPlayerManager: ExoUserPlayer
|
||||
private var isVoiceEnabled = false
|
||||
private var isLightOn = false
|
||||
private var isRecording = false
|
||||
private var mediaRecorder: MediaRecorder? = null
|
||||
private var micPulseAnimation: ScaleAnimation? = null
|
||||
private var isConsoleVisible = false
|
||||
private var deviceId: String? = null
|
||||
private var alarmList: MutableList<DeviceAlarmBean> = mutableListOf()
|
||||
private var alarmAdapter: AlarmLogHorizontalAdapter? = null
|
||||
@@ -50,21 +37,13 @@ class LiveVideoActivity : BaseActivity() {
|
||||
private val pageSize = 10
|
||||
private var hasMore = true
|
||||
private var isLoading = false
|
||||
private var isFirstLoad = true
|
||||
|
||||
private val requestPermissionLauncher = registerForActivityResult(
|
||||
ActivityResultContracts.RequestPermission()
|
||||
) { isGranted ->
|
||||
if (isGranted) {
|
||||
startRecordingMode()
|
||||
} else {
|
||||
Toast.makeText(this, R.string.recording_permission_needed, Toast.LENGTH_SHORT).show()
|
||||
isRecording = false
|
||||
}
|
||||
}
|
||||
|
||||
private var orientationUtils: OrientationUtils? = null
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
Log.d("onEnterFullscreen", "onCreate")
|
||||
|
||||
binding = LiveVideoActivityBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
|
||||
@@ -83,47 +62,86 @@ class LiveVideoActivity : BaseActivity() {
|
||||
initAlarmRecyclerView()
|
||||
initListener()
|
||||
fetchAlarmList()
|
||||
// onBackPressedDispatcher.addCallback(this, object : OnBackPressedCallback(true) {
|
||||
// override fun handleOnBackPressed() {
|
||||
// if (exoPlayerManager.onBackPressed()) {
|
||||
// return
|
||||
// }
|
||||
// finish()
|
||||
// }
|
||||
// })
|
||||
}
|
||||
|
||||
/*
|
||||
* 这段代码重写了onConfigurationChanged方法,用于监听屏幕方向变化:
|
||||
当屏幕旋转为横屏时,隐藏顶部栏(topBar)
|
||||
当屏幕为竖屏时,显示顶部栏
|
||||
目的是在横屏观看视频时提供更沉浸的全屏体验。
|
||||
* */
|
||||
override fun onConfigurationChanged(newConfig: Configuration) {
|
||||
super.onConfigurationChanged(newConfig)
|
||||
if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||
binding.topBar.visibility = View.GONE
|
||||
} else {
|
||||
binding.topBar.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
|
||||
private fun initVideoPlayer() {
|
||||
val videoPlayerView = binding.exoPlayContextId
|
||||
val videoUrl = "https://www.w3schools.com/html/movie.mp4"//"https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8"
|
||||
|
||||
exoPlayerManager = VideoPlayerManager.Builder(VideoPlayerManager.TYPE_PLAY_GESTURE, videoPlayerView)
|
||||
.setPlayUri("https://media.w3.org/2010/05/sintel/trailer.mp4")
|
||||
.setPosition(0)
|
||||
.addVideoInfoListener(object : VideoInfoListener {
|
||||
override fun onPlayStart(p0: Long) {
|
||||
Log.d("LiveVideoActivity", "视频开始播放")
|
||||
orientationUtils = OrientationUtils(this, binding.exoPlayContextId)
|
||||
orientationUtils?.isEnable = true
|
||||
|
||||
GSYVideoOptionBuilder()
|
||||
.setUrl(videoUrl)
|
||||
.setCacheWithPlay(false)
|
||||
.setCacheWithPlay(false)
|
||||
.setRotateViewAuto(true)
|
||||
.setLockLand(false)
|
||||
.setShowFullAnimation(true)
|
||||
.setNeedShowWifiTip(false)
|
||||
.setEnlargeImageRes(R.drawable.full_size)
|
||||
.setShrinkImageRes(R.drawable.full_screen)
|
||||
.setVideoAllCallBack(object : GSYSampleCallBack() {
|
||||
override fun onPrepared(url: String?, vararg objects: Any?) {
|
||||
super.onPrepared(url, *objects)
|
||||
orientationUtils?.isEnable = true
|
||||
}
|
||||
|
||||
override fun onLoadingChanged() {
|
||||
}
|
||||
override fun onQuitFullscreen(url: String?, vararg objects: Any?) {
|
||||
super.onQuitFullscreen(url, *objects)
|
||||
|
||||
override fun onPlayerError(p0: com.google.android.exoplayer2.ExoPlaybackException?) {
|
||||
Toast.makeText(this@LiveVideoActivity, "播放失败", Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
|
||||
override fun onPlayEnd() {
|
||||
Log.d("LiveVideoActivity", "播放结束")
|
||||
}
|
||||
|
||||
override fun isPlaying(p0: Boolean) {
|
||||
}
|
||||
|
||||
fun onRepeatModeChanged(p0: Int) {
|
||||
orientationUtils?.backToProtVideo()
|
||||
}
|
||||
|
||||
})
|
||||
.create()
|
||||
.build(binding.exoPlayContextId)
|
||||
hidePlayerControls()
|
||||
binding.exoPlayContextId.startPlayLogic()
|
||||
binding.exoPlayContextId.fullscreenButton.setOnClickListener {
|
||||
orientationUtils?.resolveByClick()
|
||||
binding.exoPlayContextId.startWindowFullscreen(this, true, true)
|
||||
}
|
||||
|
||||
}
|
||||
private fun hidePlayerControls() {
|
||||
binding.exoPlayContextId.backButton.visibility = View.GONE
|
||||
binding.exoPlayContextId.titleTextView.visibility = View.GONE
|
||||
binding.exoPlayContextId.startButton.visibility = View.GONE
|
||||
|
||||
binding.exoPlayContextId.findViewById<View>(
|
||||
com.shuyu.gsyvideoplayer.R.id.current
|
||||
)?.visibility = View.GONE
|
||||
|
||||
binding.exoPlayContextId.findViewById<View>(
|
||||
com.shuyu.gsyvideoplayer.R.id.total
|
||||
)?.visibility = View.GONE
|
||||
|
||||
binding.exoPlayContextId.findViewById<View>(
|
||||
com.shuyu.gsyvideoplayer.R.id.progress
|
||||
)?.visibility = View.INVISIBLE
|
||||
|
||||
binding.exoPlayContextId.findViewById<View>(
|
||||
com.shuyu.gsyvideoplayer.R.id.start
|
||||
)?.visibility = View.GONE
|
||||
|
||||
binding.exoPlayContextId.findViewById<View>(
|
||||
com.shuyu.gsyvideoplayer.R.id.layout_bottom
|
||||
)?.setBackgroundColor(Color.TRANSPARENT)
|
||||
|
||||
exoPlayerManager.startPlayer()
|
||||
}
|
||||
|
||||
private fun initAlarmRecyclerView() {
|
||||
@@ -177,20 +195,15 @@ class LiveVideoActivity : BaseActivity() {
|
||||
startActivity(intent)
|
||||
}
|
||||
|
||||
binding.llVoice.setOnClickListener {
|
||||
toggleVoice()
|
||||
}
|
||||
|
||||
binding.llLight.setOnClickListener {
|
||||
toggleLight()
|
||||
}
|
||||
isLightOn = !isLightOn
|
||||
|
||||
binding.llRecord.setOnClickListener {
|
||||
toggleRecording()
|
||||
}
|
||||
|
||||
binding.llAlarmLog.setOnClickListener {
|
||||
Toast.makeText(this, R.string.view_alarm_log, Toast.LENGTH_SHORT).show()
|
||||
if (isLightOn) {
|
||||
binding.ivLight.setImageResource(com.example.defenseapplication.R.mipmap.light_on_open)
|
||||
} else {
|
||||
binding.ivLight.setImageResource(com.example.defenseapplication.R.mipmap.light_on)
|
||||
}
|
||||
}
|
||||
|
||||
binding.xq.setOnClickListener {
|
||||
@@ -200,52 +213,30 @@ class LiveVideoActivity : BaseActivity() {
|
||||
startActivity(intent)
|
||||
}
|
||||
|
||||
// 控制台方向按钮点击事件
|
||||
binding.ivUp.setOnClickListener {
|
||||
handleDirectionClick("up")
|
||||
}
|
||||
binding.ivDown.setOnClickListener {
|
||||
handleDirectionClick("down")
|
||||
}
|
||||
binding.ivLeft.setOnClickListener {
|
||||
handleDirectionClick("left")
|
||||
}
|
||||
binding.ivRight.setOnClickListener {
|
||||
handleDirectionClick("right")
|
||||
}
|
||||
|
||||
// 触摸反馈
|
||||
setTouchFeedback(binding.ivUp)
|
||||
setTouchFeedback(binding.ivDown)
|
||||
setTouchFeedback(binding.ivLeft)
|
||||
setTouchFeedback(binding.ivRight)
|
||||
}
|
||||
|
||||
private fun setTouchFeedback(view: View) {
|
||||
view.setOnTouchListener { v, event ->
|
||||
when (event.action) {
|
||||
android.view.MotionEvent.ACTION_DOWN -> {
|
||||
v.scaleX = 0.9f
|
||||
v.scaleY = 0.9f
|
||||
}
|
||||
android.view.MotionEvent.ACTION_UP, android.view.MotionEvent.ACTION_CANCEL -> {
|
||||
v.scaleX = 1.0f
|
||||
v.scaleY = 1.0f
|
||||
}
|
||||
binding.llRecord.setOnClickListener {
|
||||
isConsoleVisible = !isConsoleVisible
|
||||
if (isConsoleVisible) {
|
||||
binding.llAlarmLog.visibility = View.GONE
|
||||
binding.consoleBar.visibility = View.VISIBLE
|
||||
binding.ivRecord.setImageResource(R.mipmap.copy_open)
|
||||
} else {
|
||||
binding.llAlarmLog.visibility = View.VISIBLE
|
||||
binding.consoleBar.visibility = View.GONE
|
||||
binding.ivRecord.setImageResource(R.mipmap.copy)
|
||||
}
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleDirectionClick(direction: String) {
|
||||
val directionText = when (direction) {
|
||||
"up" -> getString(R.string.direction_up)
|
||||
"down" -> getString(R.string.direction_down)
|
||||
"left" -> getString(R.string.direction_left)
|
||||
"right" -> getString(R.string.direction_right)
|
||||
else -> ""
|
||||
}
|
||||
|
||||
binding.llVoice.setOnClickListener {
|
||||
isVoiceEnabled = !isVoiceEnabled
|
||||
if (isVoiceEnabled) {
|
||||
Glide.with(this)
|
||||
.asGif()
|
||||
.load(R.mipmap.voice_open)
|
||||
.into(binding.ivVoice)
|
||||
} else {
|
||||
binding.ivVoice.setImageResource(R.mipmap.voice)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun fetchAlarmList(page: Int = 1) {
|
||||
@@ -260,20 +251,13 @@ class LiveVideoActivity : BaseActivity() {
|
||||
)
|
||||
Log.d("LiveVideoActivity", "总条数: ${response.total}, 当前页数据条数: ${response.rows.size}")
|
||||
val newData = response.rows
|
||||
if (newData.isEmpty()) {
|
||||
} else {
|
||||
newData.take(3).forEachIndexed { index, item ->
|
||||
Log.d("LiveVideoActivity", " 第${index + 1}条 - id: ${item.id}, categoryName: ${item.categoryName}, createTime: ${item.createTime}")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
totalPage = if (response.total % pageSize == 0) {
|
||||
response.total / pageSize
|
||||
} else {
|
||||
response.total / pageSize + 1
|
||||
}
|
||||
isFirstLoad = false
|
||||
|
||||
|
||||
if (page == 1) {
|
||||
alarmList.clear()
|
||||
hasMore = totalPage > 1
|
||||
@@ -288,135 +272,19 @@ class LiveVideoActivity : BaseActivity() {
|
||||
}
|
||||
}
|
||||
|
||||
private fun toggleVoice() {
|
||||
isVoiceEnabled = !isVoiceEnabled
|
||||
|
||||
if (isVoiceEnabled) {
|
||||
Glide.with(this).asGif().load(com.example.defenseapplication.R.drawable.voice_on_open).into(binding.ivVoice)
|
||||
} else {
|
||||
binding.ivVoice.setImageResource(com.example.defenseapplication.R.drawable.voice)
|
||||
}
|
||||
}
|
||||
|
||||
private fun toggleLight() {
|
||||
isLightOn = !isLightOn
|
||||
|
||||
if (isLightOn) {
|
||||
binding.ivLight.setImageResource(com.example.defenseapplication.R.drawable.light_on_open)
|
||||
} else {
|
||||
binding.ivLight.setImageResource(com.example.defenseapplication.R.drawable.light_on)
|
||||
}
|
||||
}
|
||||
|
||||
private fun toggleRecording() {
|
||||
if (!isRecording) {
|
||||
if (checkRecordAudioPermission()) {
|
||||
startRecordingMode()
|
||||
} else {
|
||||
requestRecordAudioPermission()
|
||||
}
|
||||
} else {
|
||||
stopRecordingMode()
|
||||
}
|
||||
}
|
||||
|
||||
private fun checkRecordAudioPermission(): Boolean {
|
||||
return ContextCompat.checkSelfPermission(
|
||||
this,
|
||||
Manifest.permission.RECORD_AUDIO
|
||||
) == PackageManager.PERMISSION_GRANTED
|
||||
}
|
||||
|
||||
private fun requestRecordAudioPermission() {
|
||||
requestPermissionLauncher.launch(Manifest.permission.RECORD_AUDIO)
|
||||
}
|
||||
|
||||
private fun startRecordingMode() {
|
||||
isRecording = true
|
||||
|
||||
binding.ivRecord.setImageResource(com.example.defenseapplication.R.drawable.copy_open)
|
||||
binding.llAlarmLog.visibility = View.GONE
|
||||
binding.consoleBar.visibility = View.VISIBLE
|
||||
|
||||
Glide.with(this).asGif().load(com.example.defenseapplication.R.drawable.voice_on_open).into(binding.ivVoice)
|
||||
isVoiceEnabled = true
|
||||
|
||||
startVoiceRecording()
|
||||
}
|
||||
|
||||
private fun stopRecordingMode() {
|
||||
isRecording = false
|
||||
|
||||
binding.ivRecord.setImageResource(com.example.defenseapplication.R.drawable.copy)
|
||||
binding.llAlarmLog.visibility = View.VISIBLE
|
||||
binding.consoleBar.visibility = View.GONE
|
||||
|
||||
binding.ivVoice.setImageResource(com.example.defenseapplication.R.drawable.voice)
|
||||
isVoiceEnabled = false
|
||||
|
||||
stopVoiceRecording()
|
||||
stopMicPulseAnimation()
|
||||
}
|
||||
|
||||
private fun stopMicPulseAnimation() {
|
||||
micPulseAnimation?.let {
|
||||
binding.ivVoice.clearAnimation()
|
||||
micPulseAnimation = null
|
||||
}
|
||||
}
|
||||
|
||||
private fun startVoiceRecording() {
|
||||
mediaRecorder = MediaRecorder().apply {
|
||||
setAudioSource(MediaRecorder.AudioSource.MIC)
|
||||
setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP)
|
||||
val outputDir = getExternalFilesDir(null) ?: filesDir
|
||||
val audioDir = File(outputDir, "audio")
|
||||
if (!audioDir.exists()) {
|
||||
audioDir.mkdirs()
|
||||
}
|
||||
val outputFile = File(audioDir, "voice_record_${System.currentTimeMillis()}.3gp")
|
||||
setOutputFile(outputFile.absolutePath)
|
||||
setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB)
|
||||
|
||||
try {
|
||||
prepare()
|
||||
start()
|
||||
} catch (e: IOException) {
|
||||
e.printStackTrace()
|
||||
Toast.makeText(this@LiveVideoActivity, R.string.recording_start_failed, Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun stopVoiceRecording() {
|
||||
mediaRecorder?.let {
|
||||
try {
|
||||
it.stop()
|
||||
it.release()
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
mediaRecorder = null
|
||||
}
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
exoPlayerManager.onResume()
|
||||
binding.exoPlayContextId.onVideoResume()
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
super.onPause()
|
||||
exoPlayerManager.onPause()
|
||||
binding.exoPlayContextId.onVideoPause()
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
exoPlayerManager.onDestroy()
|
||||
orientationUtils?.releaseListener()
|
||||
binding.exoPlayContextId.release()
|
||||
}
|
||||
|
||||
override fun onConfigurationChanged(newConfig: Configuration) {
|
||||
super.onConfigurationChanged(newConfig)
|
||||
exoPlayerManager.onConfigurationChanged(newConfig)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -32,14 +32,6 @@ class LoginActivity : AppCompatActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
if (UserinfoUtil.getUserInfo() != null) {
|
||||
val intent = Intent(this, HomeActivity::class.java)
|
||||
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK
|
||||
startActivity(intent)
|
||||
finish()
|
||||
return
|
||||
}
|
||||
|
||||
binding = ActivityLoginBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
|
||||
|
||||
@@ -232,7 +232,7 @@ class InvitationCodeActivity : AppCompatActivity() {
|
||||
}
|
||||
}
|
||||
|
||||
val logoDrawable = ContextCompat.getDrawable(this, R.mipmap.loge)
|
||||
val logoDrawable = ContextCompat.getDrawable(this, R.mipmap.logo)
|
||||
if (logoDrawable != null) {
|
||||
val logoSize = width / 5
|
||||
val logoX = (width - logoSize) / 2
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.example.defenseapplication.view
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer
|
||||
|
||||
class MyGSYVideoPlayer @JvmOverloads constructor(
|
||||
context: Context, attrs: AttributeSet? = null
|
||||
) : StandardGSYVideoPlayer(context, attrs) {
|
||||
|
||||
/** 控制栏显示/隐藏监听 */
|
||||
var onControlVisibilityChanged: ((Boolean) -> Unit)? = null
|
||||
|
||||
// 播放中显示控制栏
|
||||
override fun changeUiToPlayingShow() {
|
||||
super.changeUiToPlayingShow()
|
||||
Log.e("GSY_TEST", "通知显示按钮")
|
||||
onControlVisibilityChanged?.invoke(true)
|
||||
}
|
||||
|
||||
// 暂停中显示控制栏hideAllExceptFullscreen
|
||||
override fun changeUiToPauseShow() {
|
||||
super.changeUiToPauseShow()
|
||||
onControlVisibilityChanged?.invoke(true)
|
||||
}
|
||||
|
||||
// 播放中清除控制栏
|
||||
override fun changeUiToPlayingClear() {
|
||||
super.changeUiToPlayingClear()
|
||||
Log.e("GSY_TEST", "changeUiToPlayingClear")
|
||||
onControlVisibilityChanged?.invoke(false)
|
||||
}
|
||||
// 暂停中清除控制栏
|
||||
override fun changeUiToPauseClear() {
|
||||
super.changeUiToPauseClear()
|
||||
onControlVisibilityChanged?.invoke(false)
|
||||
}
|
||||
|
||||
// 完成播放
|
||||
override fun changeUiToCompleteClear() {
|
||||
super.changeUiToCompleteClear()
|
||||
onControlVisibilityChanged?.invoke(false)
|
||||
}
|
||||
override fun hideAllWidget() {
|
||||
Log.e("GSY_TEST", "通知隐藏按钮")
|
||||
super.hideAllWidget()
|
||||
onControlVisibilityChanged?.invoke(false)
|
||||
}
|
||||
|
||||
override fun changeUiToNormal() {
|
||||
Log.e("GSY_TEST", "changeUiToNormal")
|
||||
super.changeUiToNormal()
|
||||
}
|
||||
|
||||
override fun changeUiToPreparingShow() {
|
||||
Log.e("GSY_TEST", "changeUiToPreparingShow")
|
||||
super.changeUiToPreparingShow()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.example.defenseapplication.view
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.View
|
||||
import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer
|
||||
|
||||
class MyGSYVideoPlayerLive @JvmOverloads constructor(
|
||||
context: Context, attrs: AttributeSet? = null
|
||||
) : StandardGSYVideoPlayer(context, attrs) {
|
||||
|
||||
override fun init(context: Context) {
|
||||
super.init(context)
|
||||
startButton.visibility = View.GONE
|
||||
}
|
||||
|
||||
override fun updateStartImage() {
|
||||
startButton.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
@@ -47,9 +47,9 @@ object ToastUtils {
|
||||
|
||||
// 设置图标和文字
|
||||
if (isSuccess) {
|
||||
ivIcon.setImageResource(R.drawable.fill) // 成功图标
|
||||
ivIcon.setImageResource(R.mipmap.fill) // 成功图标
|
||||
} else {
|
||||
ivIcon.setImageResource(R.drawable.error_circle) // 失败图标
|
||||
ivIcon.setImageResource(R.mipmap.error_circle) // 失败图标
|
||||
}
|
||||
tvMessage.text = message
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<animation-list xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:oneshot="false">
|
||||
<item android:drawable="@drawable/device1" android:duration="200" />
|
||||
<item android:drawable="@drawable/device2" android:duration="200" />
|
||||
<item android:drawable="@drawable/device3" android:duration="200" />
|
||||
<item android:drawable="@mipmap/device1" android:duration="200" />
|
||||
<item android:drawable="@mipmap/device2" android:duration="200" />
|
||||
<item android:drawable="@mipmap/device3" android:duration="200" />
|
||||
</animation-list>
|
||||
@@ -1,16 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<animation-list xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:oneshot="false">
|
||||
<item android:drawable="@drawable/img_add_dev_aini_1" android:duration="200"/>
|
||||
<item android:drawable="@drawable/img_add_dev_aini_2" android:duration="200"/>
|
||||
<item android:drawable="@drawable/img_add_dev_aini_3" android:duration="200"/>
|
||||
<item android:drawable="@drawable/img_add_dev_aini_2" android:duration="500"/>
|
||||
<item android:drawable="@drawable/img_connect_anim_phone1" android:duration="200"/>
|
||||
<item android:drawable="@drawable/img_connect_anim_phone2" android:duration="200"/>
|
||||
<item android:drawable="@drawable/img_connect_anim_phone3" android:duration="200"/>
|
||||
<item android:drawable="@drawable/img_connect_anim_phone1" android:duration="500"/>
|
||||
<item android:drawable="@drawable/img_connect_anim_wifi1" android:duration="200"/>
|
||||
<item android:drawable="@drawable/img_connect_anim_wifi2" android:duration="200"/>
|
||||
<item android:drawable="@drawable/img_connect_anim_wifi3" android:duration="200"/>
|
||||
<item android:drawable="@drawable/img_connect_anim_wifi1" android:duration="500"/>
|
||||
<item android:drawable="@mipmap/device1" android:duration="200"/>
|
||||
<item android:drawable="@mipmap/device2" android:duration="200"/>
|
||||
<item android:drawable="@mipmap/device3" android:duration="200"/>
|
||||
<item android:drawable="@mipmap/device2" android:duration="500"/>
|
||||
<item android:drawable="@mipmap/img_connect_anim_phone1" android:duration="200"/>
|
||||
<item android:drawable="@mipmap/img_connect_anim_phone2" android:duration="200"/>
|
||||
<item android:drawable="@mipmap/img_connect_anim_phone3" android:duration="200"/>
|
||||
<item android:drawable="@mipmap/img_connect_anim_phone1" android:duration="500"/>
|
||||
<item android:drawable="@mipmap/img_connect_anim_wifi1" android:duration="200"/>
|
||||
<item android:drawable="@mipmap/img_connect_anim_wifi2" android:duration="200"/>
|
||||
<item android:drawable="@mipmap/img_connect_anim_wifi3" android:duration="200"/>
|
||||
<item android:drawable="@mipmap/img_connect_anim_wifi1" android:duration="500"/>
|
||||
</animation-list>
|
||||
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 1.2 KiB |
31
app/src/main/res/drawable/progress_video.xml
Normal file
@@ -0,0 +1,31 @@
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<!-- 背景 -->
|
||||
<item android:id="@android:id/background">
|
||||
<shape>
|
||||
<corners android:radius="2dp"/>
|
||||
<solid android:color="#333333"/>
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<!-- 缓冲 -->
|
||||
<item android:id="@android:id/secondaryProgress">
|
||||
<clip>
|
||||
<shape>
|
||||
<corners android:radius="2dp"/>
|
||||
<solid android:color="#888888"/>
|
||||
</shape>
|
||||
</clip>
|
||||
</item>
|
||||
|
||||
<!-- 播放进度 -->
|
||||
<item android:id="@android:id/progress">
|
||||
<clip>
|
||||
<shape>
|
||||
<corners android:radius="2dp"/>
|
||||
<solid android:color="#09C2BD"/>
|
||||
</shape>
|
||||
</clip>
|
||||
</item>
|
||||
|
||||
</layer-list>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_checked="true" android:drawable="@drawable/check_ellipse"/>
|
||||
<item android:drawable="@drawable/ellipse"/>
|
||||
<item android:state_checked="true" android:drawable="@mipmap/check_ellipse"/>
|
||||
<item android:drawable="@mipmap/ellipse"/>
|
||||
</selector>
|
||||
11
app/src/main/res/drawable/thumb_video.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<size
|
||||
android:width="12dp"
|
||||
android:height="12dp"/>
|
||||
|
||||
<solid android:color="#09C2BD"/>
|
||||
|
||||
<corners android:radius="6dp"/>
|
||||
|
||||
</shape>
|
||||
@@ -12,7 +12,7 @@
|
||||
android:id="@+id/logoFrame"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:src="@mipmap/loge"
|
||||
android:src="@mipmap/logo"
|
||||
android:contentDescription="Logo"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
||||
23
app/src/main/res/layout/activity_start.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/main"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/huaban"
|
||||
tools:context=".home.StartActivity">
|
||||
|
||||
<!-- Logo 图片:横竖屏均居中 -->
|
||||
<ImageView
|
||||
android:id="@+id/logoFrame"
|
||||
android:layout_width="264dp"
|
||||
android:layout_height="62dp"
|
||||
android:src="@mipmap/logo2"
|
||||
android:padding="5dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -89,8 +89,7 @@
|
||||
<ImageView
|
||||
android:id="@+id/ivScanAnimation"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="260dp"
|
||||
android:src="@drawable/add_d" />
|
||||
android:layout_height="260dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvEmptyHint"
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:src="@drawable/back"
|
||||
android:src="@mipmap/back"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
@@ -59,7 +59,7 @@
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/ic_wifi" />
|
||||
android:src="@mipmap/ic_wifi" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etWifiName"
|
||||
@@ -95,7 +95,7 @@
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/ic_lock" />
|
||||
android:src="@mipmap/ic_lock" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etWifiPassword"
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
android:id="@+id/ivBack"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/back" />
|
||||
android:src="@mipmap/back" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
@@ -55,7 +55,7 @@
|
||||
<ImageView
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:src="@drawable/search"
|
||||
android:src="@mipmap/search"
|
||||
android:layout_marginRight="8dp"/>
|
||||
|
||||
<EditText
|
||||
|
||||
@@ -2,10 +2,8 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/main"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#000000"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 视频播放区域和悬浮按钮 -->
|
||||
@@ -14,136 +12,50 @@
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<!-- 视频播放区域 -->
|
||||
<chuangyuan.ycj.videolibrary.widget.VideoPlayerView
|
||||
<com.example.defenseapplication.view.MyGSYVideoPlayer
|
||||
android:layout_marginTop="40dp"
|
||||
android:id="@+id/exoPlayContextId"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="280dp"
|
||||
android:background="@android:color/transparent"
|
||||
app:use_controller="false"/>
|
||||
android:layout_height="280dp"/>
|
||||
|
||||
<!-- 自定义顶部栏 - 返回、下载、删除在同一行 -->
|
||||
<!-- 右上侧按钮层 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/functionBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="44dp"
|
||||
android:layout_gravity="top"
|
||||
android:background="@android:color/transparent"
|
||||
android:gravity="center_vertical"
|
||||
android:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivBack"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:padding="8dp"
|
||||
android:src="@drawable/back_white"/>
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"/>
|
||||
android:layout_marginTop="50dp"
|
||||
android:id="@+id/rightMenu"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivDownload"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:padding="8dp"
|
||||
android:src="@drawable/download"/>
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@mipmap/download"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivDelete"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:padding="8dp"
|
||||
android:src="@drawable/delete"/>
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:src="@mipmap/delete"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 右下角按钮区域 - 静音、全屏按钮 -->
|
||||
<!-- 右下侧按钮层 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/muteBar"
|
||||
android:id="@+id/rightDow"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center">
|
||||
android:layout_gravity="end|bottom"
|
||||
android:layout_marginEnd="15dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivMute"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:padding="8dp"
|
||||
android:src="@drawable/un_mute"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivFullScreen"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:padding="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:src="@drawable/full_size"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 左下角播放按钮 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/playBar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|start">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivPlay"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:padding="8dp"
|
||||
android:src="@drawable/zt"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 底部进度条和时间区域 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/progressBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="44dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="@android:color/transparent"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="70dp"
|
||||
android:paddingRight="70dp">
|
||||
|
||||
<!-- 当前时间 -->
|
||||
<TextView
|
||||
android:id="@+id/tvCurrentTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="00:00"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="14sp"/>
|
||||
|
||||
<!-- 进度条 -->
|
||||
<SeekBar
|
||||
android:id="@+id/seekBar"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:max="100"
|
||||
android:progress="0"
|
||||
android:progressDrawable="@drawable/custom_seekbar"
|
||||
android:thumb="@drawable/custom_thumb"/>
|
||||
|
||||
<!-- 总时长 -->
|
||||
<TextView
|
||||
android:id="@+id/tvTotalTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="00:00"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="14sp"/>
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginBottom="60dp"
|
||||
android:src="@mipmap/un_mute"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -176,7 +88,7 @@
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/expand" />
|
||||
android:src="@mipmap/expand" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
android:id="@+id/ivBack"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/back" />
|
||||
android:src="@mipmap/back" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
@@ -139,7 +139,7 @@
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:src="@drawable/right_back" />
|
||||
android:src="@mipmap/right_back" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:src="@drawable/right_back" />
|
||||
android:src="@mipmap/right_back" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
android:id="@+id/ivBack"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/back" />
|
||||
android:src="@mipmap/back" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
android:id="@+id/ivBack"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/back" />
|
||||
android:src="@mipmap/back" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
@@ -84,7 +84,7 @@
|
||||
android:id="@+id/successImage"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="110dp"
|
||||
android:src="@drawable/connected_successfully" />
|
||||
android:src="@mipmap/success" />
|
||||
|
||||
<TextView
|
||||
android:layout_marginTop="20dp"
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
android:id="@+id/ivBack"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/back" />
|
||||
android:src="@mipmap/back" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<ImageView
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:src="@drawable/chinexe"
|
||||
android:src="@mipmap/chinese"
|
||||
android:scaleType="centerInside" />
|
||||
|
||||
<TextView
|
||||
@@ -69,7 +69,7 @@
|
||||
<ImageView
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:src="@drawable/english"
|
||||
android:src="@mipmap/english"
|
||||
android:scaleType="centerInside" />
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
android:id="@+id/safeIcon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/safe"
|
||||
android:src="@mipmap/safe"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
@@ -96,7 +96,7 @@
|
||||
android:id="@+id/cardFaceIcon"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="150dp"
|
||||
android:src="@drawable/face_verification"
|
||||
android:src="@mipmap/face_verification"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/topSubContainer" />
|
||||
@@ -138,7 +138,7 @@
|
||||
<ImageView
|
||||
android:layout_width="59dp"
|
||||
android:layout_height="59dp"
|
||||
android:src="@drawable/mask_group"/>
|
||||
android:src="@mipmap/mask_group"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -149,7 +149,7 @@
|
||||
<ImageView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:src="@drawable/common_icons_miniprogram2"/>
|
||||
android:src="@mipmap/common_icons_miniprogram2"/>
|
||||
<TextView
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -175,7 +175,7 @@
|
||||
<ImageView
|
||||
android:layout_width="59dp"
|
||||
android:layout_height="59dp"
|
||||
android:src="@drawable/standard_capture"/>
|
||||
android:src="@mipmap/standard_capture"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -186,7 +186,7 @@
|
||||
<ImageView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:src="@drawable/common_icons_miniprogram1"/>
|
||||
android:src="@mipmap/common_icons_miniprogram1"/>
|
||||
<TextView
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -212,7 +212,7 @@
|
||||
<ImageView
|
||||
android:layout_width="59dp"
|
||||
android:layout_height="59dp"
|
||||
android:src="@drawable/cropped_shot"/>
|
||||
android:src="@mipmap/cropped_shot"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -223,7 +223,7 @@
|
||||
<ImageView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:src="@drawable/common_icons_miniprogram1"/>
|
||||
android:src="@mipmap/common_icons_miniprogram1"/>
|
||||
<TextView
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -249,7 +249,7 @@
|
||||
<ImageView
|
||||
android:layout_width="59dp"
|
||||
android:layout_height="59dp"
|
||||
android:src="@drawable/low_light"/>
|
||||
android:src="@mipmap/low_light"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -260,7 +260,7 @@
|
||||
<ImageView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:src="@drawable/common_icons_miniprogram1"/>
|
||||
android:src="@mipmap/common_icons_miniprogram1"/>
|
||||
<TextView
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
android:id="@+id/ivBack"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/back" />
|
||||
android:src="@mipmap/back" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
@@ -54,7 +54,7 @@
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:src="@drawable/right_back" />
|
||||
android:src="@mipmap/right_back" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@drawable/back"
|
||||
android:src="@mipmap/back"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
@@ -69,8 +69,8 @@
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@drawable/ic_red_dot" />
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
android:id="@+id/iv_home"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/home_checked"/>
|
||||
android:src="@mipmap/home_checked"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_home"
|
||||
@@ -64,7 +64,7 @@
|
||||
android:id="@+id/iv_profile"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/profile"/>
|
||||
android:src="@mipmap/profile"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_profile"
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="6dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:src="@drawable/triangle" />
|
||||
android:src="@mipmap/triangle" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
@@ -76,7 +76,7 @@
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/message"/>
|
||||
android:src="@mipmap/message"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvUnreadCount"
|
||||
@@ -103,7 +103,7 @@
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/scan_icon"/>
|
||||
android:src="@mipmap/scan_icon"/>
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
@@ -116,7 +116,7 @@
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/add"/>
|
||||
android:src="@mipmap/add"/>
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
@@ -165,7 +165,7 @@
|
||||
<ImageView
|
||||
android:layout_width="244dp"
|
||||
android:layout_height="131dp"
|
||||
android:src="@drawable/default_page" />
|
||||
android:src="@mipmap/default_page" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
android:id="@+id/ivBack"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/back" />
|
||||
android:src="@mipmap/back" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
@@ -65,7 +65,7 @@
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:src="@drawable/right_back" />
|
||||
android:src="@mipmap/right_back" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 二维码卡片 -->
|
||||
@@ -114,7 +114,7 @@
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@mipmap/loge" />
|
||||
android:src="@mipmap/logo" />
|
||||
</FrameLayout>
|
||||
<!-- 使用智能文字和图标 -->
|
||||
<LinearLayout
|
||||
@@ -190,7 +190,7 @@
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/right_back" />
|
||||
android:src="@mipmap/right_back" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 底部按钮区域 -->
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
<ImageView
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/go_up" />
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@mipmap/go_up" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -65,8 +65,7 @@
|
||||
android:id="@+id/ivDetail"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:padding="5dp"
|
||||
android:src="@drawable/right_back"
|
||||
android:src="@mipmap/right_back"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
@@ -18,6 +18,6 @@
|
||||
android:id="@+id/ivWifiIcon"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/ic_wifi"/>
|
||||
android:src="@mipmap/ic_wifi"/>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -22,7 +22,7 @@
|
||||
android:id="@+id/ivBack"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/back" />
|
||||
android:src="@mipmap/back" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
@@ -55,7 +55,7 @@
|
||||
<ImageView
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:src="@drawable/search"
|
||||
android:src="@mipmap/search"
|
||||
android:layout_marginRight="8dp"/>
|
||||
|
||||
<EditText
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
android:id="@+id/btnBack"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:background="@drawable/back"/>
|
||||
android:background="@mipmap/back"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTitle"
|
||||
@@ -39,17 +39,16 @@
|
||||
android:id="@+id/ivMenu"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/settings" />
|
||||
android:src="@mipmap/settings" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 视频播放区域 -->
|
||||
<chuangyuan.ycj.videolibrary.widget.VideoPlayerView
|
||||
|
||||
<com.example.defenseapplication.view.MyGSYVideoPlayerLive
|
||||
android:id="@+id/exoPlayContextId"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="250dp"
|
||||
android:background="@android:color/transparent"
|
||||
app:use_controller="false"/>
|
||||
android:layout_height="280dp"/>
|
||||
|
||||
|
||||
<!-- 功能按钮区域 -->
|
||||
<LinearLayout
|
||||
@@ -72,7 +71,7 @@
|
||||
android:id="@+id/ivVoice"
|
||||
android:layout_width="42dp"
|
||||
android:layout_height="42dp"
|
||||
android:src="@drawable/voice" />
|
||||
android:src="@mipmap/voice" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -96,7 +95,7 @@
|
||||
android:id="@+id/ivLight"
|
||||
android:layout_width="42dp"
|
||||
android:layout_height="42dp"
|
||||
android:src="@drawable/light_on" />
|
||||
android:src="@mipmap/light_on" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -120,7 +119,7 @@
|
||||
android:id="@+id/ivRecord"
|
||||
android:layout_width="42dp"
|
||||
android:layout_height="42dp"
|
||||
android:src="@drawable/copy"/>
|
||||
android:src="@mipmap/copy"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -241,7 +240,7 @@
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/right_back"/>
|
||||
android:src="@mipmap/right_back"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
android:id="@+id/ivBack"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/back" />
|
||||
android:src="@mipmap/back" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
@@ -49,7 +49,7 @@
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:src="@drawable/right_back" />
|
||||
android:src="@mipmap/right_back" />
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
@@ -69,7 +69,7 @@
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:src="@drawable/right_back" />
|
||||
android:src="@mipmap/right_back" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/no_message" />
|
||||
android:src="@mipmap/no_message" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
android:id="@+id/ivBack"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/back" />
|
||||
android:src="@mipmap/back" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
@@ -76,7 +76,7 @@
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:src="@drawable/right_back" />
|
||||
android:src="@mipmap/right_back" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
android:id="@+id/ivBack"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/back" />
|
||||
android:src="@mipmap/back" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
@@ -52,7 +52,7 @@
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:src="@drawable/right_back" />
|
||||
android:src="@mipmap/right_back" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:src="@drawable/right_back" />
|
||||
android:src="@mipmap/right_back" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
<ImageView
|
||||
android:layout_width="42dp"
|
||||
android:layout_height="42dp"
|
||||
android:src="@drawable/switch_family" />
|
||||
android:src="@mipmap/switch_family" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -107,7 +107,7 @@
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:src="@drawable/right_back" />
|
||||
android:src="@mipmap/right_back" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -122,7 +122,7 @@
|
||||
<ImageView
|
||||
android:layout_width="42dp"
|
||||
android:layout_height="42dp"
|
||||
android:src="@drawable/user_manage" />
|
||||
android:src="@mipmap/user_manage" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
@@ -136,7 +136,7 @@
|
||||
<ImageView
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:src="@drawable/right_back" />
|
||||
android:src="@mipmap/right_back" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -151,7 +151,7 @@
|
||||
<ImageView
|
||||
android:layout_width="42dp"
|
||||
android:layout_height="42dp"
|
||||
android:src="@drawable/pwd_manager" />
|
||||
android:src="@mipmap/pwd_manager" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
@@ -165,7 +165,7 @@
|
||||
<ImageView
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:src="@drawable/right_back" />
|
||||
android:src="@mipmap/right_back" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -180,7 +180,7 @@
|
||||
<ImageView
|
||||
android:layout_width="42dp"
|
||||
android:layout_height="42dp"
|
||||
android:src="@drawable/face_manage" />
|
||||
android:src="@mipmap/face_manage" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
@@ -194,7 +194,7 @@
|
||||
<ImageView
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:src="@drawable/right_back" />
|
||||
android:src="@mipmap/right_back" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/itemLanguage"
|
||||
@@ -207,7 +207,7 @@
|
||||
<ImageView
|
||||
android:layout_width="42dp"
|
||||
android:layout_height="42dp"
|
||||
android:src="@drawable/voice_translation" />
|
||||
android:src="@mipmap/voice_translation" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
@@ -230,7 +230,7 @@
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:src="@drawable/right_back" />
|
||||
android:src="@mipmap/right_back" />
|
||||
</LinearLayout>
|
||||
|
||||
<Space
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
android:id="@+id/ivBack"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/back" />
|
||||
android:src="@mipmap/back" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
@@ -58,7 +58,7 @@
|
||||
android:layout_height="33dp"
|
||||
android:background="@drawable/bg_white"
|
||||
android:padding="8dp"
|
||||
android:src="@drawable/phone"/>
|
||||
android:src="@mipmap/phone"/>
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:src="@drawable/right_back" />
|
||||
android:src="@mipmap/right_back" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:src="@drawable/right_back" />
|
||||
android:src="@mipmap/right_back" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -62,7 +62,7 @@ tools:context=".login.RegisterSuccessActivity">
|
||||
android:id="@+id/cardFaceIcon"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="110dp"
|
||||
android:src="@drawable/success"
|
||||
android:src="@mipmap/success"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvRegisterSubtitle" />
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
android:id="@+id/ivBack"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/back" />
|
||||
android:src="@mipmap/back" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:src="@drawable/back"
|
||||
android:src="@mipmap/back"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
android:id="@+id/ivBack"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/back" />
|
||||
android:src="@mipmap/back" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
@@ -69,7 +69,7 @@
|
||||
<ImageView
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:src="@drawable/right_back" />
|
||||
android:src="@mipmap/right_back" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
@@ -98,7 +98,7 @@
|
||||
<ImageView
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:src="@drawable/right_back" />
|
||||
android:src="@mipmap/right_back" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
@@ -142,7 +142,7 @@
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:src="@drawable/right_back" />
|
||||
android:src="@mipmap/right_back" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:src="@drawable/right_back" />
|
||||
android:src="@mipmap/right_back" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -240,7 +240,7 @@
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:src="@drawable/right_back" />
|
||||
android:src="@mipmap/right_back" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -270,7 +270,7 @@
|
||||
<ImageView
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:src="@drawable/right_back" />
|
||||
android:src="@mipmap/right_back" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
@@ -313,7 +313,7 @@
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:src="@drawable/right_back" />
|
||||
android:src="@mipmap/right_back" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -358,7 +358,7 @@
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:src="@drawable/right_back" />
|
||||
android:src="@mipmap/right_back" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -388,7 +388,7 @@
|
||||
<ImageView
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:src="@drawable/right_back" />
|
||||
android:src="@mipmap/right_back" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
android:id="@+id/ivBack"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/back" />
|
||||
android:src="@mipmap/back" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
@@ -55,7 +55,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/human_body" />
|
||||
android:src="@mipmap/human_body" />
|
||||
|
||||
<!-- 打击标记图标(跟随选中的区域移动,坐标相对于父容器中心) -->
|
||||
<ImageView
|
||||
@@ -64,7 +64,7 @@
|
||||
android:layout_height="100dp"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/dajitubiao" />
|
||||
android:src="@mipmap/dajitubiao" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
android:id="@+id/ivBack"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/back" />
|
||||
android:src="@mipmap/back" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
android:id="@+id/ivBack"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/back" />
|
||||
android:src="@mipmap/back" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
@@ -75,7 +75,7 @@
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:src="@drawable/right_back"/>
|
||||
android:src="@mipmap/right_back"/>
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -20,7 +20,7 @@
|
||||
android:id="@+id/btnBack"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/back" />
|
||||
android:src="@mipmap/back" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
android:id="@+id/ivBack"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/back" />
|
||||
android:src="@mipmap/back" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
@@ -75,7 +75,7 @@
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:src="@drawable/right_back" />
|
||||
android:src="@mipmap/right_back" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:src="@drawable/right_back" />
|
||||
android:src="@mipmap/right_back" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:src="@drawable/right_back" />
|
||||
android:src="@mipmap/right_back" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -195,7 +195,7 @@
|
||||
<ImageView
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:src="@drawable/right_back" />
|
||||
android:src="@mipmap/right_back" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:src="@drawable/back"
|
||||
android:src="@mipmap/back"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
@@ -59,7 +59,7 @@
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/ic_wifi" />
|
||||
android:src="@mipmap/ic_wifi" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etWifiName"
|
||||
@@ -95,7 +95,7 @@
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/ic_lock" />
|
||||
android:src="@mipmap/ic_lock" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etWifiPassword"
|
||||
|
||||
|
Before Width: | Height: | Size: 527 B |
|
Before Width: | Height: | Size: 269 KiB |
|
Before Width: | Height: | Size: 497 B |
|
Before Width: | Height: | Size: 383 B |
|
Before Width: | Height: | Size: 848 B |
|
Before Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 591 B |
|
Before Width: | Height: | Size: 855 B |
BIN
app/src/main/res/mipmap-xhdpi/add.png
Normal file
|
After Width: | Height: | Size: 254 B |
BIN
app/src/main/res/mipmap-xhdpi/back.png
Normal file
|
After Width: | Height: | Size: 592 B |
BIN
app/src/main/res/mipmap-xhdpi/check_ellipse.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
app/src/main/res/mipmap-xhdpi/chinese.png
Normal file
|
After Width: | Height: | Size: 429 B |
BIN
app/src/main/res/mipmap-xhdpi/common_icons_miniprogram1.png
Normal file
|
After Width: | Height: | Size: 529 B |
BIN
app/src/main/res/mipmap-xhdpi/common_icons_miniprogram2.png
Normal file
|
After Width: | Height: | Size: 494 B |
BIN
app/src/main/res/mipmap-xhdpi/copy.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
app/src/main/res/mipmap-xhdpi/copy_open.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
app/src/main/res/mipmap-xhdpi/cropped_shot.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
app/src/main/res/mipmap-xhdpi/dajitubiao.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
app/src/main/res/mipmap-xhdpi/default_page.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
app/src/main/res/mipmap-xhdpi/delete.png
Normal file
|
After Width: | Height: | Size: 909 B |
BIN
app/src/main/res/mipmap-xhdpi/device1.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
app/src/main/res/mipmap-xhdpi/device2.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
app/src/main/res/mipmap-xhdpi/device3.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
app/src/main/res/mipmap-xhdpi/download.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ellipse.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
app/src/main/res/mipmap-xhdpi/english.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
app/src/main/res/mipmap-xhdpi/error_circle.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
app/src/main/res/mipmap-xhdpi/expand.png
Normal file
|
After Width: | Height: | Size: 572 B |
BIN
app/src/main/res/mipmap-xhdpi/face_manage.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
app/src/main/res/mipmap-xhdpi/face_verification.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
app/src/main/res/mipmap-xhdpi/fill.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
app/src/main/res/mipmap-xhdpi/full_screen.png
Normal file
|
After Width: | Height: | Size: 765 B |
BIN
app/src/main/res/mipmap-xhdpi/full_size.png
Normal file
|
After Width: | Height: | Size: 786 B |
BIN
app/src/main/res/mipmap-xhdpi/go_up.png
Normal file
|
After Width: | Height: | Size: 992 B |
BIN
app/src/main/res/mipmap-xhdpi/home.png
Normal file
|
After Width: | Height: | Size: 735 B |
BIN
app/src/main/res/mipmap-xhdpi/home_checked.png
Normal file
|
After Width: | Height: | Size: 593 B |
BIN
app/src/main/res/mipmap-xhdpi/huaban.png
Normal file
|
After Width: | Height: | Size: 497 KiB |
BIN
app/src/main/res/mipmap-xhdpi/human_body.png
Normal file
|
After Width: | Height: | Size: 359 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic.png
Normal file
|
After Width: | Height: | Size: 540 B |
BIN
app/src/main/res/mipmap-xhdpi/ic_check_white.png
Normal file
|
After Width: | Height: | Size: 331 B |