Java 如何在我的应用程序的登录页面中使用忘记的密码
我遵循本教程在我的android应用程序中使用登录页面,在本教程中没有关于忘记密码的解释,我想在我的应用程序中添加这些功能。 MYLogin.javaJava 如何在我的应用程序的登录页面中使用忘记的密码,java,android,Java,Android,我遵循本教程在我的android应用程序中使用登录页面,在本教程中没有关于忘记密码的解释,我想在我的应用程序中添加这些功能。 MYLogin.java public class UserLoggedInPage extends Activity { /* (non-Javadoc) * @see android.app.Activity#onCreate(android.os.Bundle) */ @Override protected void o
public class UserLoggedInPage extends Activity {
/* (non-Javadoc)
* @see android.app.Activity#onCreate(android.os.Bundle)
*/
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.loggedin);
}
/* (non-Javadoc)
* @see android.app.Activity#onBackPressed()
*/
@Override
public void onBackPressed() {
super.onBackPressed();
Intent i = new Intent(UserLoggedInPage.this, DatabaseActivity.class);
startActivity(i);
finish();
}
xml文件
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/background"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/title"
android:gravity="center"
android:textSize="20sp"
android:textColor="#000000"
/>
<TableLayout
android:id="@+id/layout1"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:padding="30dp"
>
<TableRow
android:id="@+id/row1"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
>
<TextView
android:id="@+id/txtUsername"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/txtUname"
android:padding="10dp"
android:textColor="#000000"
></TextView>
<EditText
android:id="@+id/editUsername"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_weight="0.5"
android:padding="10dp"
style="@android:style/Widget.EditText"
android:textColor="#000000"
>
</EditText>
</TableRow>
<TableRow
android:id="@+id/row2"
>
<TextView
android:id="@+id/txtPassword"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/txtPassword"
android:padding="10dp"
android:textColor="#000000"
></TextView>
<EditText
android:id="@+id/editPassword"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_weight="0.5"
android:padding="10dp"
style="@android:style/Widget.EditText"
android:password="true"
android:textColor="#000000"
></EditText>
</TableRow>
<TableRow
android:id="@+id/row3"
android:layout_gravity="center"
>
<Button
android:id="@+id/buttonLogin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/buttonLogin"
android:layout_gravity="center"
android:layout_weight="1"
></Button>
<Button
android:id="@+id/buttonNewUser"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/buttonSignUp"
android:layout_gravity="center"
android:layout_weight="1"
></Button>
</TableRow>
<TableRow
android:id="@+id/row3"
android:layout_gravity="center"
>
<Button
android:id="@+id/buttonShowAll"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/buttonShowAll"
android:layout_gravity="center"
android:layout_weight="1"
></Button>
</TableRow>
</TableLayout>
</LinearLayout>
****Can anyone tell,how to use forgot password in my application,or give some links or tutorial to learn how to put forgot password in android,i am new to android****
****谁能告诉我,如何在我的应用程序中使用忘记的密码,或者给我一些链接或教程来学习如何在android中使用忘记的密码,我是android新手****
您可以添加额外的链接/按钮作为“忘记密码”。
在此按钮上单击,创建新活动,在其中您提供一个edittext,他可以在其中插入用户名并选中按钮,以检查数据库中是否存在此用户名
检查用户提供的用户名,进行比较,然后将结果显示出来。抱歉,我们不是来帮您完成工作的。我想为我的应用程序集成登录页面,这就是为什么我尝试放置登录页面,我得到了本教程作为参考,但我觉得缺少一件事,那就是忘记密码,我不知道该怎么做,如果你有任何链接或你知道的方法,告诉我将遵循这一点。你的问题或目标只是android中的一个基本问题。如果你没有任何想法,那可能是因为你没有学习或者太懒了,没有学习基础知识。这里的人愿意帮助您解决问题,但不愿意承担您作为开发人员的工作责任。@硬编码,我有一个疑问,如果我在登录页面中提供忘记密码的按钮/链接,它必须转到另一个包含用户名或电子邮件的活动,如果他们提供正确的用户名或电子邮件,哪一个是正确的,它将从数据库获取pwd或发送重置链接到邮件哪一个是好的,以及如何做到这一点?@硬编码你能告诉我一些学习基本android及其功能和UII的链接吗?我是android新手,你能给出一些如何做到这一点的链接吗,我同意你,这是你讲的好概念,我想在登录页面中放置一个忘记密码的按钮或链接,如果我单击此按钮,它必须打开一个具有用户名或电子邮件的活动,如果他提交,它将显示他的密码,如何执行此操作?请告诉我,感谢你给我的好主意,如果用户提供正确的用户名,它将如何从db检索密码,这是可能的吗?或者如果用户提供他的电子邮件id,它必须发送重置密码的链接它是好的还是那一个好的?我们如何做哪一个是容易和正确的你真的需要做研究。。在android上做更多的工作。现在,您可以通过下面的链接将值与数据库检查进行比较。。所有基本信息:是否可以从db获取pwd并显示它?