diff --git a/app/src/main/java/io/blackbox_vision/helpers/logic/interactor/DetailsInteractor.kt b/app/src/main/java/io/blackbox_vision/helpers/logic/interactor/DetailsInteractor.kt index baded69..416ab67 100644 --- a/app/src/main/java/io/blackbox_vision/helpers/logic/interactor/DetailsInteractor.kt +++ b/app/src/main/java/io/blackbox_vision/helpers/logic/interactor/DetailsInteractor.kt @@ -14,7 +14,7 @@ class DetailsInteractor : BaseInteractor() { //Getting data from somewhere val data = MockUtils.getMockedData(id) - runOnBackground(Runnable { + runOnUiThread(Runnable { if (data != null) { successListener.onSuccess(data) } else { diff --git a/app/src/main/java/io/blackbox_vision/helpers/ui/fragment/DetailsFragment.kt b/app/src/main/java/io/blackbox_vision/helpers/ui/fragment/DetailsFragment.kt index 9aebe71..4459dc0 100644 --- a/app/src/main/java/io/blackbox_vision/helpers/ui/fragment/DetailsFragment.kt +++ b/app/src/main/java/io/blackbox_vision/helpers/ui/fragment/DetailsFragment.kt @@ -7,6 +7,7 @@ import android.widget.Button import android.widget.Toast import butterknife.BindView +import butterknife.ButterKnife import io.blackbox_vision.helpers.R import io.blackbox_vision.helpers.util.MockUtils @@ -22,6 +23,7 @@ class DetailsFragment : BaseFragment(), DetailsView { override fun onViewCreated(view: View?, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) + button = view!!.findViewById(R.id.sample_button) as Button button.setOnClickListener { v -> presenter!!.findRequiredInformation(MockUtils.SAMPLE) } } diff --git a/library/src/main/java/io/blackbox_vision/mvphelpers/ui/fragment/BaseFragment.kt b/library/src/main/java/io/blackbox_vision/mvphelpers/ui/fragment/BaseFragment.kt index 2a888ae..3ad2b66 100644 --- a/library/src/main/java/io/blackbox_vision/mvphelpers/ui/fragment/BaseFragment.kt +++ b/library/src/main/java/io/blackbox_vision/mvphelpers/ui/fragment/BaseFragment.kt @@ -1,7 +1,6 @@ package io.blackbox_vision.mvphelpers.ui.fragment import android.os.Bundle -import android.support.annotation.LayoutRes import android.support.v4.app.Fragment import android.view.LayoutInflater import android.view.View