-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fe92fa5
commit 5aa08f5
Showing
26 changed files
with
339 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
## 更新日志 | ||
|
||
### v1.8.6(通用) | ||
|
||
* 增加错误显示 | ||
* 节目预告优化 | ||
* 频道列表页单击切换频道 | ||
|
||
### v1.8.4(通用) | ||
|
||
* 解決部分情況下打開後黑屏问题 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package com.lizongying.mytv | ||
|
||
import android.os.Bundle | ||
import android.view.LayoutInflater | ||
import android.view.View | ||
import android.view.ViewGroup | ||
import androidx.core.view.marginLeft | ||
import androidx.core.view.marginTop | ||
import androidx.fragment.app.Fragment | ||
import com.lizongying.mytv.databinding.ErrorBinding | ||
|
||
class ErrorFragment : Fragment() { | ||
private var _binding: ErrorBinding? = null | ||
private val binding get() = _binding!! | ||
|
||
override fun onCreateView( | ||
inflater: LayoutInflater, container: ViewGroup?, | ||
savedInstanceState: Bundle? | ||
): View { | ||
_binding = ErrorBinding.inflate(inflater, container, false) | ||
|
||
val application = requireActivity().applicationContext as MyTvApplication | ||
|
||
binding.logo.layoutParams.width = application.px2Px(binding.logo.layoutParams.width) | ||
binding.logo.layoutParams.height = application.px2Px(binding.logo.layoutParams.height) | ||
|
||
val layoutParamsMain = binding.main.layoutParams as ViewGroup.MarginLayoutParams | ||
layoutParamsMain.leftMargin = application.px2Px(binding.main.marginLeft) | ||
binding.main.layoutParams = layoutParamsMain | ||
|
||
val layoutParams = binding.msg.layoutParams as ViewGroup.MarginLayoutParams | ||
layoutParams.topMargin = application.px2Px(binding.msg.marginTop) | ||
binding.msg.layoutParams = layoutParams | ||
|
||
binding.msg.textSize = application.px2PxFont(binding.msg.textSize) | ||
|
||
(activity as MainActivity).fragmentReady(TAG) | ||
return binding.root | ||
} | ||
|
||
fun show(msg: String) { | ||
binding.msg.text = msg | ||
} | ||
|
||
override fun onDestroyView() { | ||
super.onDestroyView() | ||
_binding = null | ||
} | ||
|
||
companion object { | ||
private const val TAG = "ErrorFragment" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.