Simple Login Design Tutorial Using Android Studio.

A Login Design is mainly where user full some credentials for an App or Website, Here in this post i will show you a simple Login Design for your Application. Here we create Login and and Sign Up for your App.The Design Look like this.



Here we will have two activities one for Login and other for Sign Up, we will call onClick method to move from one screen to another, Lets see the code.

oooooooooooooooooooooooooooooooooo

MainActivity.java  


  1. import android.content.Intent;
  2. import android.support.v7.app.AppCompatActivity;
  3. import android.os.Bundle;
  4. import android.view.View;
  5. public class MainActivity extends AppCompatActivity {
  6. @Override
  7. protected void onCreate(Bundle savedInstanceState) {
  8. super.onCreate(savedInstanceState);
  9. setContentView(R.layout.activity_main);
  10. }
  11. public void click(View view) {
  12. Intent in = new Intent(MainActivity.this,SecondActivity.class);
  13. startActivity(in);
  14. }
  15. }

activity.xml


  1. <?xml version="1.0" encoding="utf-8"?>
  2. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. xmlns:app="http://schemas.android.com/apk/res-auto"
  4. xmlns:tools="http://schemas.android.com/tools"
  5. android:layout_width="match_parent"
  6. android:orientation="vertical"
  7. android:layout_height="match_parent"
  8. tools:context="com.example.user.application.MainActivity">
  9. <ImageView
  10. android:background="@drawable/back"
  11. android:layout_width="match_parent"
  12. android:layout_height="match_parent" />
  13. <LinearLayout
  14. android:orientation="vertical"
  15. android:layout_width="match_parent"
  16. android:layout_height="wrap_content">
  17. <TextView
  18. android:layout_marginLeft="20dp"
  19. android:layout_marginRight="20dp"
  20. android:padding="5dp"
  21. android:layout_marginTop="120dp"
  22. android:hint="Email"
  23. android:background="#FFF"
  24. android:textSize="30dp"
  25. android:layout_width="match_parent"
  26. android:layout_height="wrap_content" />
  27. <TextView
  28. android:layout_marginLeft="20dp"
  29. android:layout_marginRight="20dp"
  30. android:padding="5dp"
  31. android:layout_marginTop="20dp"
  32. android:hint="Password"
  33. android:background="#FFF"
  34. android:textSize="30dp"
  35. android:layout_width="match_parent"
  36. android:layout_height="wrap_content" />
  37. <Button
  38. android:layout_marginTop="30dp"
  39. android:text="login"
  40. android:textSize="30dp"
  41. android:layout_marginLeft="20dp"
  42. android:layout_marginRight="20dp"
  43. android:layout_width="match_parent"
  44. android:layout_height="wrap_content" />
  45. <TextView
  46. android:backgroundTintMode="multiply"
  47. android:gravity="center"
  48. android:textSize="15dp"
  49. android:textColor="#FFF"
  50. android:layout_marginTop="30dp"
  51. android:onClick="click"
  52. android:text="Not a member?Sign Up now"
  53. android:layout_width="match_parent"
  54. android:layout_height="wrap_content" />
  55. </LinearLayout>
  56. </RelativeLayout>

SecondActivity.java

  1. import android.support.v7.app.AppCompatActivity;
  2. import android.os.Bundle;
  3. public class SecondActivity extends AppCompatActivity {
  4. @Override
  5. protected void onCreate(Bundle savedInstanceState) {
  6. super.onCreate(savedInstanceState);
  7. setContentView(R.layout.activity_second);
  8. }
  9. }

activity_second.xml

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. xmlns:app="http://schemas.android.com/apk/res-auto"
  4. xmlns:tools="http://schemas.android.com/tools"
  5. android:layout_width="match_parent"
  6. android:layout_height="match_parent"
  7. tools:context="com.example.user.application.SecondActivity">
  8. <ImageView
  9. android:background="@drawable/back_second"
  10. android:layout_width="match_parent"
  11. android:layout_height="match_parent" />
  12. <LinearLayout
  13. android:orientation="vertical"
  14. android:layout_width="match_parent"
  15. android:layout_height="wrap_content">
  16. <TextView
  17. android:layout_marginLeft="20dp"
  18. android:layout_marginRight="20dp"
  19. android:padding="5dp"
  20. android:layout_marginTop="120dp"
  21. android:hint="Enter Name"
  22. android:background="@drawable/color"
  23. android:textSize="25dp"
  24. android:layout_width="match_parent"
  25. android:layout_height="wrap_content" />
  26. <TextView
  27. android:layout_marginLeft="20dp"
  28. android:layout_marginRight="20dp"
  29. android:padding="5dp"
  30. android:layout_marginTop="20dp"
  31. android:hint="Email"
  32. android:background="@drawable/color"
  33. android:textSize="25dp"
  34. android:layout_width="match_parent"
  35. android:layout_height="wrap_content" />
  36. <TextView
  37. android:layout_marginLeft="20dp"
  38. android:layout_marginRight="20dp"
  39. android:padding="5dp"
  40. android:layout_marginTop="20dp"
  41. android:hint="Password"
  42. android:background="@drawable/color"
  43. android:textSize="25dp"
  44. android:layout_width="match_parent"
  45. android:layout_height="wrap_content" />
  46. <Button
  47. android:textColor="#FFF"
  48. android:background="#Fe30"
  49. android:layout_marginTop="30dp"
  50. android:text="register"
  51. android:textSize="30dp"
  52. android:layout_marginLeft="20dp"
  53. android:layout_marginRight="20dp"
  54. android:layout_width="match_parent"
  55. android:layout_height="wrap_content" />
  56. <TextView
  57. android:gravity="center"
  58. android:textSize="15dp"
  59. android:textColor="#FFF"
  60. android:layout_marginTop="30dp"
  61. android:text="Already member!Login Me"
  62. android:layout_width="match_parent"
  63. android:layout_height="wrap_content" />
  64. </LinearLayout>
  65. </RelativeLayout>


back.xml

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <shape xmlns:android="http://schemas.android.com/apk/res/android">
  3. <gradient
  4. android:startColor="#25ae90"
  5. android:endColor="#4a6c5e"
  6. android:angle="90">
  7. </gradient>
  8. </shape>

back_second.xml

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <shape xmlns:android="http://schemas.android.com/apk/res/android">
  3. <gradient
  4. android:startColor="#171818"
  5. android:endColor="#4a6c5e"
  6. android:angle="90">
  7. </gradient>
  8. </shape>


For more details check out the Video below. Do subscribe to my channel.

 

Hope this post is helpful,for more useful post like and share with your friends, we also have Youtube channel for more details check out the video below, do like share and subscribe to our channel it will boost our energy and help to improve our work, Have Nice Day.
Simple Login Design Tutorial Using Android Studio. Simple Login Design Tutorial Using Android Studio. Reviewed by gcrt on March 20, 2018 Rating: 5

No comments:

'; (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })();
Powered by Blogger.