Commit a5edb06c authored by jyx's avatar jyx

添加非空判断

parent 3af5ab50
...@@ -21,6 +21,7 @@ import com.xinfu.helivideo.utils.MateUtils ...@@ -21,6 +21,7 @@ import com.xinfu.helivideo.utils.MateUtils
import com.xinfu.helivideo.utils.ToastUtil import com.xinfu.helivideo.utils.ToastUtil
import com.xinfu.library.utils.ConstantUtil import com.xinfu.library.utils.ConstantUtil
import com.xinfu.library.utils.json.JsonUtil import com.xinfu.library.utils.json.JsonUtil
import com.xinfu.library.utils.nodoubleclick.AntiShake
import kotlinx.android.synthetic.main.activity_aboutus.* import kotlinx.android.synthetic.main.activity_aboutus.*
import kotlinx.android.synthetic.main.header_layout.* import kotlinx.android.synthetic.main.header_layout.*
...@@ -64,6 +65,7 @@ class AboutusActivity : BaseActivity(), View.OnClickListener { ...@@ -64,6 +65,7 @@ class AboutusActivity : BaseActivity(), View.OnClickListener {
} }
override fun onClick(v: View?) { override fun onClick(v: View?) {
if (AntiShake.check(v?.id)) return
when (v?.id) { when (v?.id) {
R.id.iv_left_icon -> finish() R.id.iv_left_icon -> finish()
......
...@@ -10,6 +10,7 @@ import com.xinfu.helivideo.R ...@@ -10,6 +10,7 @@ import com.xinfu.helivideo.R
import com.xinfu.helivideo.mvp.presenters.FeedbackPresenter import com.xinfu.helivideo.mvp.presenters.FeedbackPresenter
import com.xinfu.helivideo.mvp.views.FeedbackView import com.xinfu.helivideo.mvp.views.FeedbackView
import com.xinfu.helivideo.ui.activitys.base.BaseActivity import com.xinfu.helivideo.ui.activitys.base.BaseActivity
import com.xinfu.library.utils.nodoubleclick.AntiShake
import kotlinx.android.synthetic.main.activity_feekback.* import kotlinx.android.synthetic.main.activity_feekback.*
import kotlinx.android.synthetic.main.header_layout.* import kotlinx.android.synthetic.main.header_layout.*
...@@ -80,6 +81,8 @@ class FeedbackActivity : BaseActivity(), View.OnClickListener, FeedbackView { ...@@ -80,6 +81,8 @@ class FeedbackActivity : BaseActivity(), View.OnClickListener, FeedbackView {
} }
override fun onClick(v: View?) { override fun onClick(v: View?) {
if (AntiShake.check(v?.id)) return
when (v?.id) { when (v?.id) {
R.id.iv_left_icon -> finish() R.id.iv_left_icon -> finish()
R.id.btn_feedback_next -> { R.id.btn_feedback_next -> {
......
...@@ -17,6 +17,7 @@ import com.xinfu.helivideo.ui.widgets.DialogListener ...@@ -17,6 +17,7 @@ import com.xinfu.helivideo.ui.widgets.DialogListener
import com.xinfu.helivideo.utils.ToastUtil import com.xinfu.helivideo.utils.ToastUtil
import com.xinfu.library.net.neterror.BaseSubscriber import com.xinfu.library.net.neterror.BaseSubscriber
import com.xinfu.library.net.neterror.Throwable import com.xinfu.library.net.neterror.Throwable
import com.xinfu.library.utils.nodoubleclick.AntiShake
import kotlinx.android.synthetic.main.activity_manage_order.* import kotlinx.android.synthetic.main.activity_manage_order.*
import kotlinx.android.synthetic.main.header_layout.* import kotlinx.android.synthetic.main.header_layout.*
...@@ -65,6 +66,8 @@ class ManageOrderActivity : BaseActivity(), View.OnClickListener { ...@@ -65,6 +66,8 @@ class ManageOrderActivity : BaseActivity(), View.OnClickListener {
override fun isApplyKitKatTranslucency() = false override fun isApplyKitKatTranslucency() = false
override fun onClick(v: View?) { override fun onClick(v: View?) {
if (AntiShake.check(v?.id)) return
when (v?.id) { when (v?.id) {
R.id.iv_left_icon -> finish() R.id.iv_left_icon -> finish()
R.id.tv_cancel -> { R.id.tv_cancel -> {
......
...@@ -72,6 +72,8 @@ class MyFragment : BaseFragment(), MyView, View.OnClickListener { ...@@ -72,6 +72,8 @@ class MyFragment : BaseFragment(), MyView, View.OnClickListener {
} }
override fun onClick(v: View?) { override fun onClick(v: View?) {
if (AntiShake.check(v?.id)) return
when (v?.id) { when (v?.id) {
R.id.tv_my_btn -> { R.id.tv_my_btn -> {
if (!userManager.vipFlag) { if (!userManager.vipFlag) {
......
...@@ -16,6 +16,7 @@ import com.xinfu.helivideo.ui.adapter.RecommendPageAdapter ...@@ -16,6 +16,7 @@ import com.xinfu.helivideo.ui.adapter.RecommendPageAdapter
import com.xinfu.helivideo.ui.fragment.base.BaseFragment import com.xinfu.helivideo.ui.fragment.base.BaseFragment
import com.xinfu.helivideo.video.DramaTabFragment import com.xinfu.helivideo.video.DramaTabFragment
import com.xinfu.helivideo.video.tx.TxVideoFragment import com.xinfu.helivideo.video.tx.TxVideoFragment
import com.xinfu.library.utils.nodoubleclick.AntiShake
import kotlinx.android.synthetic.main.fragment_recommend.* import kotlinx.android.synthetic.main.fragment_recommend.*
/** /**
...@@ -150,6 +151,8 @@ class RecommendFragment : BaseFragment(), View.OnClickListener { ...@@ -150,6 +151,8 @@ class RecommendFragment : BaseFragment(), View.OnClickListener {
} }
override fun onClick(v: View?) { override fun onClick(v: View?) {
if (AntiShake.check(v?.id)) return
when (v?.id) { when (v?.id) {
R.id.iv_edit -> { R.id.iv_edit -> {
handleEditStyle(true) handleEditStyle(true)
......
...@@ -582,6 +582,8 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic ...@@ -582,6 +582,8 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
} }
override fun onClick(v: View?) { override fun onClick(v: View?) {
if (AntiShake.check(v?.id)) return
when (v?.id) { when (v?.id) {
R.id.ll_collect -> { R.id.ll_collect -> {
if (mVedioBean!!.collect == 0) { if (mVedioBean!!.collect == 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment