Adds Go Pro button at the bottom

filterfix
Laurent 5 years ago
parent 759b1397db
commit 6491a67d32
  1. 14
      app/src/main/java/net/pokeranalytics/android/ui/modules/feed/FeedFragment.kt
  2. 14
      app/src/main/res/layout/fragment_feed.xml

@ -305,6 +305,20 @@ class FeedFragment : FilterableFragment(), RowRepresentableDelegate {
}
})
this.subscribe.setOnClickListener {
if (!AppGuard.isProUser) {
BillingActivity.newInstanceForResult(this, false)
} else {
Toast.makeText(requireContext(), R.string.purchase_message, Toast.LENGTH_LONG).show()
this.showSubscriptionButton()
}
}
this.showSubscriptionButton()
}
private fun showSubscriptionButton() {
this.subscribe.isVisible = !AppGuard.isProUser
}
private fun hideMessageBox(message: Preferences.FeedMessage) {

@ -109,6 +109,20 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<com.google.android.material.button.MaterialButton
android:id="@+id/subscribe"
android:text="@string/pro_purchase"
style="@style/PokerAnalyticsTheme.Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginBottom="16dp"
android:paddingStart="24dp"
android:paddingEnd="24dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
tools:text="Subscribe" />
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/messageBox"
android:layout_width="0dp"

Loading…
Cancel
Save