commit
98e547b248
@ -0,0 +1,28 @@ |
|||||||
|
package net.pokeranalytics.android.ui.fragment.components |
||||||
|
|
||||||
|
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 |
||||||
|
|
||||||
|
|
||||||
|
class ScreenSlidePageFragment(var iconResId: Int, var titleResId: Int, var descriptionResId: Int) : PokerAnalyticsFragment() { |
||||||
|
|
||||||
|
override fun onCreateView( |
||||||
|
inflater: LayoutInflater, |
||||||
|
container: ViewGroup?, |
||||||
|
savedInstanceState: Bundle? |
||||||
|
): View = inflater.inflate(R.layout.fragment_screen_slide_page, container, false) |
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { |
||||||
|
super.onViewCreated(view, savedInstanceState) |
||||||
|
|
||||||
|
this.icon.setImageResource(this.iconResId) |
||||||
|
this.title.text = requireContext().getString(this.titleResId) |
||||||
|
this.description.text = requireContext().getString(this.descriptionResId) |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,9 @@ |
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" |
||||||
|
android:width="24dp" |
||||||
|
android:height="24dp" |
||||||
|
android:viewportWidth="24" |
||||||
|
android:viewportHeight="24"> |
||||||
|
<path |
||||||
|
android:fillColor="#FF000000" |
||||||
|
android:pathData="M18.6,6.62c-1.44,0 -2.8,0.56 -3.77,1.53L12,10.66 10.48,12h0.01L7.8,14.39c-0.64,0.64 -1.49,0.99 -2.4,0.99 -1.87,0 -3.39,-1.51 -3.39,-3.38S3.53,8.62 5.4,8.62c0.91,0 1.76,0.35 2.44,1.03l1.13,1 1.51,-1.34L9.22,8.2C8.2,7.18 6.84,6.62 5.4,6.62 2.42,6.62 0,9.04 0,12s2.42,5.38 5.4,5.38c1.44,0 2.8,-0.56 3.77,-1.53l2.83,-2.5 0.01,0.01L13.52,12h-0.01l2.69,-2.39c0.64,-0.64 1.49,-0.99 2.4,-0.99 1.87,0 3.39,1.51 3.39,3.38s-1.52,3.38 -3.39,3.38c-0.9,0 -1.76,-0.35 -2.44,-1.03l-1.14,-1.01 -1.51,1.34 1.27,1.12c1.02,1.01 2.37,1.57 3.82,1.57 2.98,0 5.4,-2.41 5.4,-5.38s-2.42,-5.37 -5.4,-5.37z"/> |
||||||
|
</vector> |
||||||
@ -0,0 +1,9 @@ |
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" |
||||||
|
android:width="24dp" |
||||||
|
android:height="24dp" |
||||||
|
android:viewportWidth="24" |
||||||
|
android:viewportHeight="24"> |
||||||
|
<path |
||||||
|
android:fillColor="#FF000000" |
||||||
|
android:pathData="M20,4L4,4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2zM20,8l-8,5 -8,-5L4,6l8,5 8,-5v2z"/> |
||||||
|
</vector> |
||||||
@ -0,0 +1,9 @@ |
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" |
||||||
|
android:width="24dp" |
||||||
|
android:height="24dp" |
||||||
|
android:viewportWidth="24" |
||||||
|
android:viewportHeight="24"> |
||||||
|
<path |
||||||
|
android:fillColor="#FF000000" |
||||||
|
android:pathData="M12.65,10C11.83,7.67 9.61,6 7,6c-3.31,0 -6,2.69 -6,6s2.69,6 6,6c2.61,0 4.83,-1.67 5.65,-4H17v4h4v-4h2v-4H12.65zM7,14c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2 2,0.9 2,2 -0.9,2 -2,2z"/> |
||||||
|
</vector> |
||||||
@ -0,0 +1,9 @@ |
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" |
||||||
|
android:width="24dp" |
||||||
|
android:height="24dp" |
||||||
|
android:viewportWidth="24" |
||||||
|
android:viewportHeight="24"> |
||||||
|
<path |
||||||
|
android:fillColor="#FF000000" |
||||||
|
android:pathData="M22.99,9C19.15,5.16 13.8,3.76 8.84,4.78l2.52,2.52c3.47,-0.17 6.99,1.05 9.63,3.7l2,-2zM18.99,13c-1.29,-1.29 -2.84,-2.13 -4.49,-2.56l3.53,3.53 0.96,-0.97zM2,3.05L5.07,6.1C3.6,6.82 2.22,7.78 1,9l1.99,2c1.24,-1.24 2.67,-2.16 4.2,-2.77l2.24,2.24C7.81,10.89 6.27,11.73 5,13v0.01L6.99,15c1.36,-1.36 3.14,-2.04 4.92,-2.06L18.98,20l1.27,-1.26L3.29,1.79 2,3.05zM9,17l3,3 3,-3c-1.65,-1.66 -4.34,-1.66 -6,0z"/> |
||||||
|
</vector> |
||||||
@ -0,0 +1,50 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" |
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto" |
||||||
|
xmlns:tools="http://schemas.android.com/tools" |
||||||
|
android:id="@+id/content" |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="match_parent"> |
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout |
||||||
|
android:layout_width="wrap_content" |
||||||
|
android:layout_height="wrap_content"> |
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView |
||||||
|
android:id="@+id/title" |
||||||
|
app:layout_constraintTop_toTopOf="parent" |
||||||
|
app:layout_constraintStart_toStartOf="parent" |
||||||
|
app:layout_constraintEnd_toEndOf="parent" |
||||||
|
style="@style/PokerAnalyticsTheme.TextView.SubscriptionFeatureTitle" |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="wrap_content" |
||||||
|
tools:text="Title"/> |
||||||
|
|
||||||
|
<ImageView |
||||||
|
android:id="@+id/icon" |
||||||
|
android:tint="@color/green" |
||||||
|
app:layout_constraintTop_toBottomOf="@id/title" |
||||||
|
app:layout_constraintStart_toStartOf="parent" |
||||||
|
app:layout_constraintEnd_toEndOf="parent" |
||||||
|
android:src="@drawable/ic_baseline_all_inclusive_24px" |
||||||
|
android:layout_width="48dp" |
||||||
|
android:layout_height="48dp" /> |
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView |
||||||
|
android:paddingLeft="24dp" |
||||||
|
android:paddingRight="24dp" |
||||||
|
android:id="@+id/description" |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="wrap_content" |
||||||
|
android:gravity="center" |
||||||
|
style="@style/PokerAnalyticsTheme.TextView.SubscriptionFeature" |
||||||
|
app:layout_constraintTop_toBottomOf="@id/icon" |
||||||
|
app:layout_constraintStart_toStartOf="parent" |
||||||
|
app:layout_constraintEnd_toEndOf="parent" |
||||||
|
android:layout_marginTop="20dp" |
||||||
|
android:maxLines="5" |
||||||
|
tools:text="Description qui va avec le text youpi. Il peut y avoir plusieurs ligne de texte oui tout a fait."/> |
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout> |
||||||
|
|
||||||
|
</ScrollView> |
||||||
@ -1,64 +1,86 @@ |
|||||||
<?xml version="1.0" encoding="utf-8"?> |
<?xml version="1.0" encoding="utf-8"?> |
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||||
xmlns:app="http://schemas.android.com/apk/res-auto" |
xmlns:app="http://schemas.android.com/apk/res-auto" |
||||||
|
xmlns:tools="http://schemas.android.com/tools" |
||||||
android:layout_width="match_parent" |
android:layout_width="match_parent" |
||||||
android:layout_height="match_parent" |
android:layout_height="match_parent" |
||||||
xmlns:tools="http://schemas.android.com/tools" |
|
||||||
android:orientation="vertical"> |
android:orientation="vertical"> |
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView |
<androidx.appcompat.widget.AppCompatTextView |
||||||
android:id="@+id/title" |
android:id="@+id/title" |
||||||
android:layout_marginTop="24dp" |
style="@style/PokerAnalyticsTheme.TextView.SubscriptionTitle" |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="wrap_content" |
||||||
android:layout_marginLeft="16dp" |
android:layout_marginLeft="16dp" |
||||||
|
android:layout_marginTop="24dp" |
||||||
android:layout_marginRight="16dp" |
android:layout_marginRight="16dp" |
||||||
android:text="@string/pro_upgrade" |
|
||||||
style="@style/PokerAnalyticsTheme.TextView.SubscriptionTitle" |
|
||||||
app:layout_constraintStart_toStartOf="parent" |
|
||||||
app:layout_constraintEnd_toEndOf="parent" |
|
||||||
app:layout_constraintTop_toTopOf="parent" |
|
||||||
android:gravity="center" |
android:gravity="center" |
||||||
app:autoSizeTextType="uniform" |
android:text="@string/pro_upgrade" |
||||||
app:autoSizeMinTextSize="24sp" |
|
||||||
app:autoSizeMaxTextSize="36sp" |
app:autoSizeMaxTextSize="36sp" |
||||||
|
app:autoSizeMinTextSize="24sp" |
||||||
app:autoSizeStepGranularity="2sp" |
app:autoSizeStepGranularity="2sp" |
||||||
android:layout_width="match_parent" |
app:autoSizeTextType="uniform" /> |
||||||
android:layout_height="wrap_content" /> |
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView |
<androidx.constraintlayout.widget.ConstraintLayout |
||||||
android:id="@+id/freetrial" |
android:id="@+id/container" |
||||||
style="@style/PokerAnalyticsTheme.TextView.SubscriptionSubTitle" |
|
||||||
app:layout_constraintTop_toBottomOf="@id/title" |
|
||||||
app:layout_constraintStart_toStartOf="parent" |
|
||||||
app:layout_constraintEnd_toEndOf="parent" |
|
||||||
android:gravity="center" |
|
||||||
android:layout_width="match_parent" |
android:layout_width="match_parent" |
||||||
android:layout_height="wrap_content" |
android:layout_height="match_parent"> |
||||||
tools:text="30 day free trial"/> |
|
||||||
|
|
||||||
<!-- --> |
<androidx.appcompat.widget.AppCompatTextView |
||||||
|
android:id="@+id/freetrial" |
||||||
|
style="@style/PokerAnalyticsTheme.TextView.SubscriptionSubTitle" |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="wrap_content" |
||||||
|
android:gravity="center" |
||||||
|
app:layout_constraintEnd_toEndOf="parent" |
||||||
|
app:layout_constraintStart_toStartOf="parent" |
||||||
|
app:layout_constraintTop_toTopOf="@id/container" |
||||||
|
tools:text="30 day free trial" /> |
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView |
<androidx.viewpager.widget.ViewPager |
||||||
android:id="@+id/price" |
android:id="@+id/pager" |
||||||
style="@style/PokerAnalyticsTheme.TextView.SubscriptionPrice" |
android:layout_width="250dp" |
||||||
app:layout_constraintBottom_toTopOf="@id/purchase" |
android:layout_height="200dp" |
||||||
app:layout_constraintStart_toStartOf="parent" |
android:layout_marginTop="100dp" |
||||||
app:layout_constraintEnd_toEndOf="parent" |
app:layout_constraintTop_toBottomOf="@id/freetrial" |
||||||
android:gravity="center" |
app:layout_constraintStart_toStartOf="parent" |
||||||
android:layout_width="match_parent" |
app:layout_constraintEnd_toEndOf="parent" |
||||||
android:layout_height="wrap_content" |
app:layout_constraintHorizontal_bias="0.5" /> |
||||||
tools:text="$29.99 / year"/> |
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton |
<LinearLayout |
||||||
android:id="@+id/purchase" |
android:orientation="horizontal" |
||||||
style="@style/PokerAnalyticsTheme.Button" |
android:id="@+id/pageIndicator" |
||||||
app:layout_constraintStart_toStartOf="parent" |
android:layout_width="wrap_content" |
||||||
app:layout_constraintEnd_toEndOf="parent" |
android:layout_height="wrap_content" |
||||||
app:layout_constraintBottom_toBottomOf="parent" |
app:layout_constraintTop_toBottomOf="@id/pager" |
||||||
android:layout_height="wrap_content" |
app:layout_constraintHorizontal_bias="0.5" |
||||||
android:layout_width="match_parent" |
app:layout_constraintStart_toStartOf="parent" |
||||||
android:layout_marginLeft="16dp" |
app:layout_constraintEnd_toEndOf="parent"/> |
||||||
android:layout_marginRight="16dp" |
|
||||||
android:layout_marginBottom="42dp" |
<androidx.appcompat.widget.AppCompatTextView |
||||||
android:text="@string/pro_purchase" /> |
android:id="@+id/price" |
||||||
|
style="@style/PokerAnalyticsTheme.TextView.SubscriptionPrice" |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="wrap_content" |
||||||
|
android:gravity="center" |
||||||
|
app:layout_constraintBottom_toTopOf="@id/purchase" |
||||||
|
app:layout_constraintEnd_toEndOf="parent" |
||||||
|
app:layout_constraintStart_toStartOf="parent" |
||||||
|
tools:text="$29.99 / year" /> |
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton |
||||||
|
android:id="@+id/purchase" |
||||||
|
style="@style/PokerAnalyticsTheme.Button" |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="wrap_content" |
||||||
|
android:layout_marginLeft="16dp" |
||||||
|
android:layout_marginRight="16dp" |
||||||
|
android:layout_marginBottom="32dp" |
||||||
|
android:text="@string/pro_purchase" |
||||||
|
app:layout_constraintBottom_toBottomOf="parent" |
||||||
|
app:layout_constraintEnd_toEndOf="parent" |
||||||
|
app:layout_constraintStart_toStartOf="parent" /> |
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout> |
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout> |
</LinearLayout> |
||||||
Loading…
Reference in new issue