Skip to content
Snippets Groups Projects
Commit c7063de5 authored by Taras's avatar Taras
Browse files

Create select sign up type fragment

parent 0494109e
No related branches found
No related tags found
No related merge requests found
package com.futo.circles.feature.sign_up_type
import android.os.Bundle
import android.view.View
import androidx.fragment.app.Fragment
import androidx.navigation.fragment.findNavController
import by.kirich1409.viewbindingdelegate.viewBinding
import com.futo.circles.R
import com.futo.circles.databinding.SelectSignUpTypeFragmentBinding
class SelectSignUpTypeFragment : Fragment(R.layout.select_sign_up_type_fragment) {
private val binding by viewBinding(SelectSignUpTypeFragmentBinding::bind)
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
binding.btnToken.setOnClickListener { navigateToTokenValidation() }
}
private fun navigateToTokenValidation() {
findNavController()
.navigate(SelectSignUpTypeFragmentDirections.toValidateTokenFragment())
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingHorizontal="36dp"
android:paddingVertical="24dp">
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guidelineLogo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_percent="0.35" />
<com.futo.circles.view.CirclesLogoView
android:id="@+id/ivLogo"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@id/guidelineLogo"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tvTokenTitle"
style="@style/title2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/already_have_a_circles_token"
app:layout_constraintBottom_toTopOf="@id/btnToken"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/guidelineLogo"
app:layout_constraintVertical_bias="0.3"
app:layout_constraintVertical_chainStyle="packed" />
<com.google.android.material.button.MaterialButton
android:id="@+id/btnToken"
style="@style/AccentButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/sign_up_with_token"
app:layout_constraintBottom_toTopOf="@id/tvOr"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvTokenTitle" />
<TextView
android:id="@+id/tvOr"
style="@style/headline"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:layout_marginBottom="24dp"
android:gravity="center"
android:text="@string/or"
app:layout_constraintBottom_toTopOf="@id/tvSubscriptionTitle"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/btnToken" />
<TextView
android:id="@+id/tvSubscriptionTitle"
style="@style/title2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/create_a_circles_subscription"
app:layout_constraintBottom_toTopOf="@id/btnSubscription"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvOr" />
<com.google.android.material.button.MaterialButton
android:id="@+id/btnSubscription"
style="@style/AccentButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:enabled="false"
android:text="@string/new_circles_subscription"
app:layout_constraintBottom_toTopOf="@id/tvSubscriptionUnavailable"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvSubscriptionTitle" />
<TextView
android:id="@+id/tvSubscriptionUnavailable"
style="@style/footNote"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:gravity="center"
android:text="@string/new_paid_circles_subscriptions_are_currently_unavailable"
app:drawableStartCompat="@drawable/ic_error"
app:drawableTint="@color/inactive_menu_icon_color"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/btnSubscription" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
...@@ -52,6 +52,12 @@ ...@@ -52,6 +52,12 @@
<string name="cancel">Cancel</string> <string name="cancel">Cancel</string>
<string name="unexpected_error">Something went wrong</string> <string name="unexpected_error">Something went wrong</string>
<string name="group_created">Group created</string> <string name="group_created">Group created</string>
<string name="already_have_a_circles_token">Already have a Circles token?</string>
<string name="sign_up_with_token">Sign up with token</string>
<string name="new_circles_subscription">New Circles subscription</string>
<string name="new_paid_circles_subscriptions_are_currently_unavailable">New paid Circles subscriptions are currently unavailable</string>
<string name="create_a_circles_subscription">Create a Circles subscription</string>
<string name="or">Or</string>
<plurals name="member_plurals"> <plurals name="member_plurals">
<item quantity="one">%d member</item> <item quantity="one">%d member</item>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment