|
|
|
@ -44,6 +44,14 @@ class SubscriptionFragment : BaseFragment(), SkuDetailsResponseListener, Purchas |
|
|
|
|
|
|
|
|
|
|
|
companion object { |
|
|
|
companion object { |
|
|
|
val parallax: Float = 64f.px |
|
|
|
val parallax: Float = 64f.px |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fun newInstance(showSessionMessage: Boolean) : SubscriptionFragment { |
|
|
|
|
|
|
|
val fragment = SubscriptionFragment() |
|
|
|
|
|
|
|
val bundle = Bundle() |
|
|
|
|
|
|
|
bundle.putBoolean(BundleKey.SHOW_MESSAGE.value, showSessionMessage) |
|
|
|
|
|
|
|
fragment.arguments = bundle |
|
|
|
|
|
|
|
return fragment |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private var pagerAdapter: ScreenSlidePagerAdapter? = null |
|
|
|
private var pagerAdapter: ScreenSlidePagerAdapter? = null |
|
|
|
@ -71,20 +79,20 @@ class SubscriptionFragment : BaseFragment(), SkuDetailsResponseListener, Purchas |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
fun setData(showSessionMessage: Boolean) { |
|
|
|
|
|
|
|
this.showSessionMessage = showSessionMessage |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { |
|
|
|
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { |
|
|
|
return inflater.inflate(R.layout.fragment_subscription, container, false) |
|
|
|
return inflater.inflate(R.layout.fragment_subscription, container, false) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { |
|
|
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { |
|
|
|
super.onViewCreated(view, savedInstanceState) |
|
|
|
super.onViewCreated(view, savedInstanceState) |
|
|
|
|
|
|
|
initData() |
|
|
|
initUI() |
|
|
|
initUI() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private fun initData() { |
|
|
|
|
|
|
|
this.showSessionMessage = arguments?.getBoolean(BundleKey.SHOW_MESSAGE.value) ?: false |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private fun initUI() { |
|
|
|
private fun initUI() { |
|
|
|
|
|
|
|
|
|
|
|
val upgradeString = requireContext().getString(R.string.pro_upgrade) |
|
|
|
val upgradeString = requireContext().getString(R.string.pro_upgrade) |
|
|
|
|