mirror of
https://github.com/wulkanowy/wulkanowy.git
synced 2025-01-31 23:02:45 +01:00
Contact info after failed login (#556)
This commit is contained in:
parent
ce9b12eb93
commit
7e30524876
@ -21,6 +21,7 @@ import io.github.wulkanowy.utils.openInternetBrowser
|
|||||||
import io.github.wulkanowy.utils.showSoftInput
|
import io.github.wulkanowy.utils.showSoftInput
|
||||||
import kotlinx.android.synthetic.main.fragment_login_form.*
|
import kotlinx.android.synthetic.main.fragment_login_form.*
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
import io.github.wulkanowy.utils.openEmail
|
||||||
|
|
||||||
class LoginFormFragment : BaseFragment(), LoginFormView {
|
class LoginFormFragment : BaseFragment(), LoginFormView {
|
||||||
|
|
||||||
@ -62,6 +63,8 @@ class LoginFormFragment : BaseFragment(), LoginFormView {
|
|||||||
loginFormHost.setOnItemClickListener { _, _, _, _ -> presenter.onHostSelected() }
|
loginFormHost.setOnItemClickListener { _, _, _, _ -> presenter.onHostSelected() }
|
||||||
loginFormSignIn.setOnClickListener { presenter.onSignInClick() }
|
loginFormSignIn.setOnClickListener { presenter.onSignInClick() }
|
||||||
loginFormPrivacyLink.setOnClickListener { presenter.onPrivacyLinkClick() }
|
loginFormPrivacyLink.setOnClickListener { presenter.onPrivacyLinkClick() }
|
||||||
|
loginFormContactDiscord.setOnClickListener { presenter.onDiscordClick() }
|
||||||
|
loginFormContactEmail.setOnClickListener { presenter.onEmailClick() }
|
||||||
|
|
||||||
loginFormPass.setOnEditorActionListener { _, id, _ ->
|
loginFormPass.setOnEditorActionListener { _, id, _ ->
|
||||||
if (id == IME_ACTION_DONE || id == IME_NULL) loginFormSignIn.callOnClick() else false
|
if (id == IME_ACTION_DONE || id == IME_NULL) loginFormSignIn.callOnClick() else false
|
||||||
@ -154,8 +157,25 @@ class LoginFormFragment : BaseFragment(), LoginFormView {
|
|||||||
context?.openInternetBrowser("https://wulkanowy.github.io/polityka-prywatnosci.html", ::showMessage)
|
context?.openInternetBrowser("https://wulkanowy.github.io/polityka-prywatnosci.html", ::showMessage)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun showContact(show: Boolean) {
|
||||||
|
loginFormContact.visibility = if (show) VISIBLE else GONE
|
||||||
|
}
|
||||||
|
|
||||||
override fun onDestroyView() {
|
override fun onDestroyView() {
|
||||||
super.onDestroyView()
|
super.onDestroyView()
|
||||||
presenter.onDetachView()
|
presenter.onDetachView()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun openDiscordInvite() {
|
||||||
|
context?.openInternetBrowser("https://discord.gg/vccAQBr", ::showMessage)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun openEmail() {
|
||||||
|
context?.openEmail(
|
||||||
|
requireContext().getString(R.string.login_email_intent_title),
|
||||||
|
"wulkanowyinc@gmail.com",
|
||||||
|
requireContext().getString(R.string.login_email_subject),
|
||||||
|
requireContext().getString(R.string.login_email_text, appInfo.systemModel, appInfo.systemVersion.toString(), appInfo.versionName)
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,7 @@ class LoginFormPresenter @Inject constructor(
|
|||||||
super.onAttachView(view)
|
super.onAttachView(view)
|
||||||
view.run {
|
view.run {
|
||||||
initView()
|
initView()
|
||||||
|
showContact(false)
|
||||||
if (appInfo.isDebug) showVersion() else showPrivacyPolicy()
|
if (appInfo.isDebug) showVersion() else showPrivacyPolicy()
|
||||||
|
|
||||||
loginErrorHandler.onBadCredentials = {
|
loginErrorHandler.onBadCredentials = {
|
||||||
@ -86,9 +87,18 @@ class LoginFormPresenter @Inject constructor(
|
|||||||
Timber.i("Login result: An exception occurred")
|
Timber.i("Login result: An exception occurred")
|
||||||
analytics.logEvent("registration_form", "success" to false, "students" to -1, "endpoint" to endpoint, "error" to it.message.ifNullOrBlank { "No message" })
|
analytics.logEvent("registration_form", "success" to false, "students" to -1, "endpoint" to endpoint, "error" to it.message.ifNullOrBlank { "No message" })
|
||||||
loginErrorHandler.dispatch(it)
|
loginErrorHandler.dispatch(it)
|
||||||
|
view?.showContact(true)
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun onDiscordClick() {
|
||||||
|
view?.openDiscordInvite()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun onEmailClick() {
|
||||||
|
view?.openEmail()
|
||||||
|
}
|
||||||
|
|
||||||
private fun validateCredentials(login: String, password: String): Boolean {
|
private fun validateCredentials(login: String, password: String): Boolean {
|
||||||
var isCorrect = true
|
var isCorrect = true
|
||||||
|
|
||||||
|
@ -42,4 +42,10 @@ interface LoginFormView : BaseView {
|
|||||||
fun notifyParentAccountLogged(students: List<Student>, loginData: Triple<String, String, String>)
|
fun notifyParentAccountLogged(students: List<Student>, loginData: Triple<String, String, String>)
|
||||||
|
|
||||||
fun openPrivacyPolicyPage()
|
fun openPrivacyPolicyPage()
|
||||||
|
|
||||||
|
fun showContact(show: Boolean)
|
||||||
|
|
||||||
|
fun openDiscordInvite()
|
||||||
|
|
||||||
|
fun openEmail()
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,9 @@ import io.github.wulkanowy.R
|
|||||||
import io.github.wulkanowy.data.db.entities.Student
|
import io.github.wulkanowy.data.db.entities.Student
|
||||||
import io.github.wulkanowy.ui.base.BaseFragment
|
import io.github.wulkanowy.ui.base.BaseFragment
|
||||||
import io.github.wulkanowy.ui.modules.main.MainActivity
|
import io.github.wulkanowy.ui.modules.main.MainActivity
|
||||||
|
import io.github.wulkanowy.utils.AppInfo
|
||||||
|
import io.github.wulkanowy.utils.openEmail
|
||||||
|
import io.github.wulkanowy.utils.openInternetBrowser
|
||||||
import io.github.wulkanowy.utils.setOnItemClickListener
|
import io.github.wulkanowy.utils.setOnItemClickListener
|
||||||
import kotlinx.android.synthetic.main.fragment_login_student_select.*
|
import kotlinx.android.synthetic.main.fragment_login_student_select.*
|
||||||
import java.io.Serializable
|
import java.io.Serializable
|
||||||
@ -26,6 +29,9 @@ class LoginStudentSelectFragment : BaseFragment(), LoginStudentSelectView {
|
|||||||
@Inject
|
@Inject
|
||||||
lateinit var loginAdapter: FlexibleAdapter<AbstractFlexibleItem<*>>
|
lateinit var loginAdapter: FlexibleAdapter<AbstractFlexibleItem<*>>
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
lateinit var appInfo: AppInfo
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
const val SAVED_STUDENTS = "STUDENTS"
|
const val SAVED_STUDENTS = "STUDENTS"
|
||||||
|
|
||||||
@ -44,6 +50,8 @@ class LoginStudentSelectFragment : BaseFragment(), LoginStudentSelectView {
|
|||||||
override fun initView() {
|
override fun initView() {
|
||||||
loginStudentSelectSignIn.setOnClickListener { presenter.onSignIn() }
|
loginStudentSelectSignIn.setOnClickListener { presenter.onSignIn() }
|
||||||
loginAdapter.apply { setOnItemClickListener { presenter.onItemSelected(it) } }
|
loginAdapter.apply { setOnItemClickListener { presenter.onItemSelected(it) } }
|
||||||
|
loginStudentSelectContactDiscord.setOnClickListener { presenter.onDiscordClick() }
|
||||||
|
loginStudentSelectContactEmail.setOnClickListener { presenter.onEmailClick() }
|
||||||
|
|
||||||
loginStudentSelectRecycler.apply {
|
loginStudentSelectRecycler.apply {
|
||||||
adapter = loginAdapter
|
adapter = loginAdapter
|
||||||
@ -80,8 +88,25 @@ class LoginStudentSelectFragment : BaseFragment(), LoginStudentSelectView {
|
|||||||
outState.putSerializable(SAVED_STUDENTS, presenter.students as Serializable)
|
outState.putSerializable(SAVED_STUDENTS, presenter.students as Serializable)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun showContact(show: Boolean) {
|
||||||
|
loginStudentSelectContact.visibility = if (show) VISIBLE else GONE
|
||||||
|
}
|
||||||
|
|
||||||
override fun onDestroyView() {
|
override fun onDestroyView() {
|
||||||
presenter.onDetachView()
|
presenter.onDetachView()
|
||||||
super.onDestroyView()
|
super.onDestroyView()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun openDiscordInvite() {
|
||||||
|
context?.openInternetBrowser("https://discord.gg/vccAQBr", ::showMessage)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun openEmail() {
|
||||||
|
context?.openEmail(
|
||||||
|
requireContext().getString(R.string.login_email_intent_title),
|
||||||
|
"wulkanowyinc@gmail.com",
|
||||||
|
requireContext().getString(R.string.login_email_subject),
|
||||||
|
requireContext().getString(R.string.login_email_text, appInfo.systemModel, appInfo.systemVersion.toString(), appInfo.versionName)
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,7 @@ class LoginStudentSelectPresenter @Inject constructor(
|
|||||||
super.onAttachView(view)
|
super.onAttachView(view)
|
||||||
view.run {
|
view.run {
|
||||||
initView()
|
initView()
|
||||||
|
showContact(false)
|
||||||
enableSignIn(false)
|
enableSignIn(false)
|
||||||
loginErrorHandler.onStudentDuplicate = {
|
loginErrorHandler.onStudentDuplicate = {
|
||||||
showMessage(it)
|
showMessage(it)
|
||||||
@ -88,7 +89,16 @@ class LoginStudentSelectPresenter @Inject constructor(
|
|||||||
view?.apply {
|
view?.apply {
|
||||||
showProgress(false)
|
showProgress(false)
|
||||||
showContent(true)
|
showContent(true)
|
||||||
|
showContact(true)
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun onDiscordClick() {
|
||||||
|
view?.openDiscordInvite()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun onEmailClick() {
|
||||||
|
view?.openEmail()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,4 +15,10 @@ interface LoginStudentSelectView : BaseView {
|
|||||||
fun showContent(show: Boolean)
|
fun showContent(show: Boolean)
|
||||||
|
|
||||||
fun enableSignIn(enable: Boolean)
|
fun enableSignIn(enable: Boolean)
|
||||||
|
|
||||||
|
fun showContact(show: Boolean)
|
||||||
|
|
||||||
|
fun openDiscordInvite()
|
||||||
|
|
||||||
|
fun openEmail()
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,10 @@ import io.github.wulkanowy.R
|
|||||||
import io.github.wulkanowy.data.db.entities.Student
|
import io.github.wulkanowy.data.db.entities.Student
|
||||||
import io.github.wulkanowy.ui.base.BaseFragment
|
import io.github.wulkanowy.ui.base.BaseFragment
|
||||||
import io.github.wulkanowy.ui.modules.login.LoginActivity
|
import io.github.wulkanowy.ui.modules.login.LoginActivity
|
||||||
|
import io.github.wulkanowy.utils.AppInfo
|
||||||
import io.github.wulkanowy.utils.hideSoftInput
|
import io.github.wulkanowy.utils.hideSoftInput
|
||||||
|
import io.github.wulkanowy.utils.openEmail
|
||||||
|
import io.github.wulkanowy.utils.openInternetBrowser
|
||||||
import io.github.wulkanowy.utils.showSoftInput
|
import io.github.wulkanowy.utils.showSoftInput
|
||||||
import kotlinx.android.synthetic.main.fragment_login_symbol.*
|
import kotlinx.android.synthetic.main.fragment_login_symbol.*
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
@ -24,6 +27,9 @@ class LoginSymbolFragment : BaseFragment(), LoginSymbolView {
|
|||||||
@Inject
|
@Inject
|
||||||
lateinit var presenter: LoginSymbolPresenter
|
lateinit var presenter: LoginSymbolPresenter
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
lateinit var appInfo: AppInfo
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private const val SAVED_LOGIN_DATA = "LOGIN_DATA"
|
private const val SAVED_LOGIN_DATA = "LOGIN_DATA"
|
||||||
|
|
||||||
@ -44,6 +50,8 @@ class LoginSymbolFragment : BaseFragment(), LoginSymbolView {
|
|||||||
|
|
||||||
override fun initView() {
|
override fun initView() {
|
||||||
loginSymbolSignIn.setOnClickListener { presenter.attemptLogin(loginSymbolName.text.toString()) }
|
loginSymbolSignIn.setOnClickListener { presenter.attemptLogin(loginSymbolName.text.toString()) }
|
||||||
|
loginSymbolContactDiscord.setOnClickListener { presenter.onDiscordClick() }
|
||||||
|
loginSymbolContactEmail.setOnClickListener { presenter.onEmailClick() }
|
||||||
|
|
||||||
loginSymbolName.doOnTextChanged { _, _, _, _ -> presenter.onSymbolTextChanged() }
|
loginSymbolName.doOnTextChanged { _, _, _, _ -> presenter.onSymbolTextChanged() }
|
||||||
|
|
||||||
@ -109,8 +117,25 @@ class LoginSymbolFragment : BaseFragment(), LoginSymbolView {
|
|||||||
outState.putSerializable(SAVED_LOGIN_DATA, presenter.loginData)
|
outState.putSerializable(SAVED_LOGIN_DATA, presenter.loginData)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun showContact(show: Boolean) {
|
||||||
|
loginSymbolContact.visibility = if (show) VISIBLE else GONE
|
||||||
|
}
|
||||||
|
|
||||||
override fun onDestroyView() {
|
override fun onDestroyView() {
|
||||||
super.onDestroyView()
|
super.onDestroyView()
|
||||||
presenter.onDetachView()
|
presenter.onDetachView()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun openDiscordInvite() {
|
||||||
|
context?.openInternetBrowser("https://discord.gg/vccAQBr", ::showMessage)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun openEmail() {
|
||||||
|
context?.openEmail(
|
||||||
|
requireContext().getString(R.string.login_email_intent_title),
|
||||||
|
"wulkanowyinc@gmail.com",
|
||||||
|
requireContext().getString(R.string.login_email_subject),
|
||||||
|
requireContext().getString(R.string.login_email_text, appInfo.systemModel, appInfo.systemVersion.toString(), appInfo.versionName)
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,10 @@ class LoginSymbolPresenter @Inject constructor(
|
|||||||
@Suppress("UNCHECKED_CAST")
|
@Suppress("UNCHECKED_CAST")
|
||||||
fun onAttachView(view: LoginSymbolView, savedLoginData: Serializable?) {
|
fun onAttachView(view: LoginSymbolView, savedLoginData: Serializable?) {
|
||||||
super.onAttachView(view)
|
super.onAttachView(view)
|
||||||
view.initView()
|
view.run {
|
||||||
|
initView()
|
||||||
|
showContact(false)
|
||||||
|
}
|
||||||
if (savedLoginData is Triple<*, *, *>) {
|
if (savedLoginData is Triple<*, *, *>) {
|
||||||
loginData = savedLoginData as Triple<String, String, String>
|
loginData = savedLoginData as Triple<String, String, String>
|
||||||
}
|
}
|
||||||
@ -64,6 +67,7 @@ class LoginSymbolPresenter @Inject constructor(
|
|||||||
if (it.isEmpty()) {
|
if (it.isEmpty()) {
|
||||||
Timber.i("Login with symbol result: Empty student list")
|
Timber.i("Login with symbol result: Empty student list")
|
||||||
setErrorSymbolIncorrect()
|
setErrorSymbolIncorrect()
|
||||||
|
view?.showContact(true)
|
||||||
} else {
|
} else {
|
||||||
Timber.i("Login with symbol result: Success")
|
Timber.i("Login with symbol result: Success")
|
||||||
notifyParentAccountLogged(it)
|
notifyParentAccountLogged(it)
|
||||||
@ -73,6 +77,7 @@ class LoginSymbolPresenter @Inject constructor(
|
|||||||
Timber.i("Login with symbol result: An exception occurred")
|
Timber.i("Login with symbol result: An exception occurred")
|
||||||
analytics.logEvent("registration_symbol", "success" to false, "students" to -1, "endpoint" to loginData?.third, "symbol" to symbol, "error" to it.message.ifNullOrBlank { "No message" })
|
analytics.logEvent("registration_symbol", "success" to false, "students" to -1, "endpoint" to loginData?.third, "symbol" to symbol, "error" to it.message.ifNullOrBlank { "No message" })
|
||||||
loginErrorHandler.dispatch(it)
|
loginErrorHandler.dispatch(it)
|
||||||
|
view?.showContact(true)
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,4 +88,12 @@ class LoginSymbolPresenter @Inject constructor(
|
|||||||
showSoftKeyboard()
|
showSoftKeyboard()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun onDiscordClick() {
|
||||||
|
view?.openDiscordInvite()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun onEmailClick() {
|
||||||
|
view?.openEmail()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,4 +26,10 @@ interface LoginSymbolView : BaseView {
|
|||||||
fun showContent(show: Boolean)
|
fun showContent(show: Boolean)
|
||||||
|
|
||||||
fun notifyParentAccountLogged(students: List<Student>)
|
fun notifyParentAccountLogged(students: List<Student>)
|
||||||
|
|
||||||
|
fun showContact(show: Boolean)
|
||||||
|
|
||||||
|
fun openDiscordInvite()
|
||||||
|
|
||||||
|
fun openEmail()
|
||||||
}
|
}
|
||||||
|
@ -2,12 +2,14 @@ package io.github.wulkanowy.utils
|
|||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
|
import android.net.Uri
|
||||||
import android.util.DisplayMetrics.DENSITY_DEFAULT
|
import android.util.DisplayMetrics.DENSITY_DEFAULT
|
||||||
import androidx.annotation.AttrRes
|
import androidx.annotation.AttrRes
|
||||||
import androidx.annotation.ColorInt
|
import androidx.annotation.ColorInt
|
||||||
import androidx.annotation.ColorRes
|
import androidx.annotation.ColorRes
|
||||||
import androidx.annotation.DrawableRes
|
import androidx.annotation.DrawableRes
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
|
import io.github.wulkanowy.R
|
||||||
|
|
||||||
@ColorInt
|
@ColorInt
|
||||||
fun Context.getThemeAttrColor(@AttrRes colorAttr: Int): Int {
|
fun Context.getThemeAttrColor(@AttrRes colorAttr: Int): Int {
|
||||||
@ -31,4 +33,12 @@ fun Context.openInternetBrowser(uri: String, onActivityNotFound: (uri: String) -
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun Context.openEmail(chooserTitle: String, email: String, subject: String?, body: String?) {
|
||||||
|
val emailIntent = Intent(Intent.ACTION_SENDTO, Uri.fromParts("mailto", email, null))
|
||||||
|
emailIntent.putExtra(Intent.EXTRA_EMAIL, arrayOf(email))
|
||||||
|
if (subject != null) emailIntent.putExtra(Intent.EXTRA_SUBJECT, subject)
|
||||||
|
if (body != null) emailIntent.putExtra(Intent.EXTRA_TEXT, body)
|
||||||
|
startActivity(Intent.createChooser(emailIntent, chooserTitle))
|
||||||
|
}
|
||||||
|
|
||||||
fun Context.dpToPx(dp: Float) = dp * resources.displayMetrics.densityDpi / DENSITY_DEFAULT
|
fun Context.dpToPx(dp: Float) = dp * resources.displayMetrics.densityDpi / DENSITY_DEFAULT
|
||||||
|
@ -25,15 +25,79 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/loginFormContact"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/loginFormContactHeader"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="32dp"
|
||||||
|
android:layout_marginLeft="32dp"
|
||||||
|
android:layout_marginEnd="32dp"
|
||||||
|
android:layout_marginRight="32dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="@string/login_contact_header"
|
||||||
|
android:textSize="14sp"
|
||||||
|
app:fontFamily="sans-serif-medium" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/loginFormContactButtons"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_marginLeft="16dp"
|
||||||
|
android:layout_marginRight="16dp">
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
|
||||||
|
android:id="@+id/loginFormContactEmail"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_marginRight="8dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:text="@string/login_contact_email"
|
||||||
|
app:icon="@drawable/ic_more_messages" />
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
|
||||||
|
android:id="@+id/loginFormContactDiscord"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_marginLeft="8dp"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:text="@string/login_contact_discord"
|
||||||
|
app:icon="@drawable/ic_about_discord" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/loginFormContactDivider"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:background="?android:attr/listDivider" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/loginFormHeader"
|
android:id="@+id/loginFormHeader"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="32dp"
|
android:layout_marginStart="32dp"
|
||||||
android:layout_marginLeft="32dp"
|
android:layout_marginLeft="32dp"
|
||||||
android:layout_marginTop="32dp"
|
|
||||||
android:layout_marginEnd="32dp"
|
android:layout_marginEnd="32dp"
|
||||||
android:layout_marginRight="32dp"
|
android:layout_marginRight="32dp"
|
||||||
|
android:layout_marginTop="48dp"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:text="@string/login_header_default"
|
android:text="@string/login_header_default"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
@ -41,7 +105,7 @@
|
|||||||
app:layout_constraintBottom_toTopOf="@+id/loginFormNameLayout"
|
app:layout_constraintBottom_toTopOf="@+id/loginFormNameLayout"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toBottomOf="@+id/loginFormContact"
|
||||||
app:layout_constraintVertical_chainStyle="packed" />
|
app:layout_constraintVertical_chainStyle="packed" />
|
||||||
|
|
||||||
|
|
||||||
|
@ -19,6 +19,76 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/loginStudentSelectContact"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible">
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/loginStudentSelectContactTopDivider"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="?android:attr/listDivider" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/loginStudentSelectContactHeader"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="32dp"
|
||||||
|
android:layout_marginLeft="32dp"
|
||||||
|
android:layout_marginEnd="32dp"
|
||||||
|
android:layout_marginRight="32dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="@string/login_contact_header"
|
||||||
|
android:textSize="14sp"
|
||||||
|
app:fontFamily="sans-serif-medium" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/loginStudentSelectContactButtons"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_marginLeft="16dp"
|
||||||
|
android:layout_marginRight="16dp">
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
|
||||||
|
android:id="@+id/loginStudentSelectContactEmail"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_marginRight="8dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:text="@string/login_contact_email"
|
||||||
|
app:icon="@drawable/ic_more_messages" />
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
|
||||||
|
android:id="@+id/loginStudentSelectContactDiscord"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_marginLeft="8dp"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:text="@string/login_contact_discord"
|
||||||
|
app:icon="@drawable/ic_about_discord" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/loginStudentSelectContactBottomDivider"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:background="?android:attr/listDivider" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/loginStudentSelectHeader"
|
android:id="@+id/loginStudentSelectHeader"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -27,6 +97,7 @@
|
|||||||
android:layout_marginLeft="32dp"
|
android:layout_marginLeft="32dp"
|
||||||
android:layout_marginEnd="32dp"
|
android:layout_marginEnd="32dp"
|
||||||
android:layout_marginRight="32dp"
|
android:layout_marginRight="32dp"
|
||||||
|
android:layout_marginTop="32dp"
|
||||||
android:layout_marginBottom="32dp"
|
android:layout_marginBottom="32dp"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:text="@string/login_select_student"
|
android:text="@string/login_select_student"
|
||||||
@ -35,7 +106,7 @@
|
|||||||
app:layout_constraintBottom_toTopOf="@id/loginStudentSelectRecycler"
|
app:layout_constraintBottom_toTopOf="@id/loginStudentSelectRecycler"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toBottomOf="@id/loginStudentSelectContact"
|
||||||
app:layout_constraintVertical_chainStyle="packed" />
|
app:layout_constraintVertical_chainStyle="packed" />
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
@ -24,12 +24,81 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/loginSymbolContact"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible">
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/loginSymbolContactTopDivider"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="?android:attr/listDivider" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/loginSymbolContactHeader"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="32dp"
|
||||||
|
android:layout_marginLeft="32dp"
|
||||||
|
android:layout_marginEnd="32dp"
|
||||||
|
android:layout_marginRight="32dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="@string/login_contact_header"
|
||||||
|
android:textSize="14sp"
|
||||||
|
app:fontFamily="sans-serif-medium" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/loginSymbolContactButtons"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_marginLeft="16dp"
|
||||||
|
android:layout_marginRight="16dp">
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
|
||||||
|
android:id="@+id/loginSymbolContactEmail"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_marginRight="8dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:text="@string/login_contact_email"
|
||||||
|
app:icon="@drawable/ic_more_messages" />
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
|
||||||
|
android:id="@+id/loginSymbolContactDiscord"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_marginLeft="8dp"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:text="@string/login_contact_discord"
|
||||||
|
app:icon="@drawable/ic_about_discord" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/loginSymbolContactBottomDivider"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:background="?android:attr/listDivider" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/loginSymbolHeader"
|
android:id="@+id/loginSymbolHeader"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="32dp"
|
android:layout_marginStart="32dp"
|
||||||
android:layout_marginLeft="32dp"
|
|
||||||
android:layout_marginTop="32dp"
|
android:layout_marginTop="32dp"
|
||||||
android:layout_marginEnd="32dp"
|
android:layout_marginEnd="32dp"
|
||||||
android:layout_marginRight="32dp"
|
android:layout_marginRight="32dp"
|
||||||
@ -41,7 +110,7 @@
|
|||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.5"
|
app:layout_constraintHorizontal_bias="0.5"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toBottomOf="@+id/loginSymbolContact"
|
||||||
app:layout_constraintVertical_chainStyle="packed" />
|
app:layout_constraintVertical_chainStyle="packed" />
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
@ -36,6 +36,10 @@
|
|||||||
<string name="login_symbol_helper">Symbol znajdziesz na stronie dziennika w Uczeń -> Dostęp Mobilny -> Zarejestruj urządzenie mobilne</string>
|
<string name="login_symbol_helper">Symbol znajdziesz na stronie dziennika w Uczeń -> Dostęp Mobilny -> Zarejestruj urządzenie mobilne</string>
|
||||||
<string name="login_select_student">Wybierz uczniów do zalogowania w aplikacji</string>
|
<string name="login_select_student">Wybierz uczniów do zalogowania w aplikacji</string>
|
||||||
<string name="login_privacy_policy">Polityka prywatności</string>
|
<string name="login_privacy_policy">Polityka prywatności</string>
|
||||||
|
<string name="login_contact_header">Problemy z logowaniem? Napisz do nas!</string>
|
||||||
|
<string name="login_contact_email">Email</string>
|
||||||
|
<string name="login_contact_discord">Discord</string>
|
||||||
|
<string name="login_email_intent_title">Wyślij email</string>
|
||||||
|
|
||||||
|
|
||||||
<!--Main-->
|
<!--Main-->
|
||||||
|
@ -36,6 +36,12 @@
|
|||||||
<string name="login_symbol_helper">The symbol can be found on the register page in Uczeń -> Dostęp Mobilny -> Zarejestruj urządzenie mobilne</string>
|
<string name="login_symbol_helper">The symbol can be found on the register page in Uczeń -> Dostęp Mobilny -> Zarejestruj urządzenie mobilne</string>
|
||||||
<string name="login_select_student">Select students to log in to the application</string>
|
<string name="login_select_student">Select students to log in to the application</string>
|
||||||
<string name="login_privacy_policy">Privacy policy</string>
|
<string name="login_privacy_policy">Privacy policy</string>
|
||||||
|
<string name="login_contact_header">Trouble signing in? Contact us!</string>
|
||||||
|
<string name="login_contact_email">Email</string>
|
||||||
|
<string name="login_contact_discord">Discord</string>
|
||||||
|
<string name="login_email_intent_title">Send email</string>
|
||||||
|
<string name="login_email_subject" translatable="false">Zgłoszenie: Problemy z logowaniem</string>
|
||||||
|
<string name="login_email_text" translatable="false">Informacje o aplikacji:\n\nUrządzenie: %1$s\nWersja SDK: %2$s\nWersja aplikacji: %3$s\n\nOpis problemu:</string>
|
||||||
|
|
||||||
|
|
||||||
<!--Main-->
|
<!--Main-->
|
||||||
|
Loading…
x
Reference in New Issue
Block a user