Back to project page built.io-todo-android.
The source code is released under:
Terms of Use & Licensing<br />Hand Drawn Web Icon Set is free and it will always be free. You can use it for both commercial and non-commercial projects. You can modify the icons anyway you like. Howe...
If you think the Android project built.io-todo-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.example.todoapp; /* w w w.j a va 2 s .c om*/ import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.Intent; import android.os.Bundle; import com.raweng.built.BuiltError; import com.raweng.built.BuiltUser; import com.raweng.built.userInterface.BuiltUILoginController; public class LoginActivity extends BuiltUILoginController{ private ProgressDialog progressDialog; BuiltUser user; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); user = BuiltUser.getSession(); if(user != null){ Intent startTodoIntent = new Intent(LoginActivity.this, TodoActivity.class); startTodoIntent.putExtra("userUid", user.getUserUid()); startActivity(startTodoIntent); finish(); } progressDialog = new ProgressDialog(LoginActivity.this); progressDialog.setMessage("Loging In..."); progressDialog.setTitle("Please Wait..."); progressDialog.setCancelable(false); progressDialog.setCanceledOnTouchOutside(false); //set progress dialog. setProgressDialog(progressDialog); } @Override public void loginSuccess(BuiltUser user) { try { //Save the session of logged in user. user.saveSession(); } catch (Exception e) { e.printStackTrace(); } Intent startTodoIntent = new Intent(LoginActivity.this, TodoActivity.class); startTodoIntent.putExtra("userUid", user.getUserUid()); startActivity(startTodoIntent); finish(); } @Override public void loginError(BuiltError error) { AlertDialog.Builder alertDialog = new AlertDialog.Builder(LoginActivity.this); alertDialog.setTitle("Error").setMessage("ErrorMessage : "+error.getErrorMessage()+" ,\nResponseType : "+ error.getResponseType()).show(); } }