Как использовать только gmail и нажать кнопку «Продолжить» и сохранить почту в базе данных? - PullRequest
0 голосов
/ 03 февраля 2019

Я не хочу, чтобы пользователь регистрировался или входил в систему, и я хочу ввести только пользователь gmail / email и нажать кнопку «Для продолжения».Если пользователь нажимает кнопку, я хочу сохранить только адрес Gmail в моей базе данных.Как я делаю это на Java-коде?

Вот мой простой XML-код ....

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context=".MainActivity">


    <TextView
        android:id="@+id/textView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Enter your gmail here"
        android:textColor="@color/colorPrimary"
        android:textSize="30dp"
        android:layout_gravity="center"
        android:textAlignment="center"
        android:layout_marginTop="200dp"/>

    <EditText
        android:id="@+id/editText"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="20dp"
        android:inputType="textEmailAddress"
        android:hint="Enter your Gmail here"
        android:layout_marginLeft="40dp"
        android:layout_marginRight="40dp"/>

    <Button
        android:id="@+id/button"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="To Contunue"
        android:textAllCaps="false"
        android:layout_marginTop="8dp"
        android:layout_marginLeft="70dp"
        android:layout_marginRight="70dp"/>

    </LinearLayout>
...