android - 如何仅使用 gmail 并按“继续”按钮并将电子邮件保存到数据库?
问题描述
我不想用户注册或登录过程,我只想输入用户的 gmail/电子邮件,然后按“继续”按钮。如果用户按下按钮,我只想在我的数据库中保存 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>
解决方案
推荐阅读
- drop-down-menu - 如何使用 ag 网格根据两个下拉选择显示和隐藏列
- python-3.x - findEssentialMat(openCV)中“焦距= 1.0”的单位是什么?
- javascript - 在 Javascript 中使用 for 循环交换字符串的大小写
- python - 如何确保 BeautifulSoup 不会将逗号视为制表符
- javascript - 如何将 UI 更新推送到 javascript 前端?
- java - 多次收到 API 响应
- excel - 确定具有字母数字值的列中的最大大小和最小大小
- reactjs - 为什么在反应中删除后组件不重新渲染
- python - Sklearn 错误无法将大小为 6912 的数组重塑为形状 (614,154)
- jquery - 谷歌地理编码自动完成限制在马里兰州