|
|
|
|
@ -4,8 +4,8 @@ import android.os.Bundle |
|
|
|
|
import android.view.LayoutInflater |
|
|
|
|
import android.view.View |
|
|
|
|
import android.view.ViewGroup |
|
|
|
|
import kotlinx.android.synthetic.main.fragment_screen_slide_page.* |
|
|
|
|
import net.pokeranalytics.android.R |
|
|
|
|
import net.pokeranalytics.android.databinding.FragmentScreenSlidePageBinding |
|
|
|
|
import net.pokeranalytics.android.exceptions.PAIllegalStateException |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -31,20 +31,29 @@ class ScreenSlidePageFragment : BaseFragment() { |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
override fun onCreateView( |
|
|
|
|
inflater: LayoutInflater, |
|
|
|
|
container: ViewGroup?, |
|
|
|
|
savedInstanceState: Bundle? |
|
|
|
|
): View = inflater.inflate(R.layout.fragment_screen_slide_page, container, false) |
|
|
|
|
private var _binding: FragmentScreenSlidePageBinding? = null |
|
|
|
|
private val binding get() = _binding!! |
|
|
|
|
|
|
|
|
|
// Life Cycle |
|
|
|
|
|
|
|
|
|
override fun onDestroyView() { |
|
|
|
|
super.onDestroyView() |
|
|
|
|
_binding = null |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { |
|
|
|
|
_binding = FragmentScreenSlidePageBinding.inflate(inflater, container, false) |
|
|
|
|
return binding.root |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { |
|
|
|
|
super.onViewCreated(view, savedInstanceState) |
|
|
|
|
|
|
|
|
|
val bundle = arguments ?: throw PAIllegalStateException("No bundle found") |
|
|
|
|
|
|
|
|
|
this.icon.setImageResource(bundle.getInt(BundleKey.ICON.key)) |
|
|
|
|
this.title.text = requireContext().getString(bundle.getInt(BundleKey.TITLE.key)) |
|
|
|
|
this.description.text = requireContext().getString(bundle.getInt(BundleKey.DESCRIPTION.key)) |
|
|
|
|
binding.icon.setImageResource(bundle.getInt(BundleKey.ICON.key)) |
|
|
|
|
binding.title.text = requireContext().getString(bundle.getInt(BundleKey.TITLE.key)) |
|
|
|
|
binding.description.text = requireContext().getString(bundle.getInt(BundleKey.DESCRIPTION.key)) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|