Skip to content
Snippets Groups Projects
Commit 9aac2574 authored by ShubhamM97's avatar ShubhamM97
Browse files

Designed the Login and the Sign Up Screens. Buttons to display dummy messages.

parent 08b76f25
No related branches found
No related tags found
No related merge requests found
...@@ -11,14 +11,16 @@ ...@@ -11,14 +11,16 @@
android:theme="@style/AppTheme"> android:theme="@style/AppTheme">
<activity <activity
android:name=".Dashboard" android:name=".Dashboard"
android:label="@string/app_name" android:label="DashBoard"
android:theme="@style/AppTheme.NoActionBar"> android:theme="@style/AppTheme.NoActionBar"></activity>
<activity android:name=".LoginActivity">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity> </activity>
<activity android:name=".SignUpActivity"></activity>
</application> </application>
</manifest> </manifest>
\ No newline at end of file
package com.example.taskboxx;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;
public class LoginActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
}
public void Login(View view){
Toast.makeText(this, "Login Successful", Toast.LENGTH_SHORT).show();
Intent dashboardintent = new Intent(this,Dashboard.class);
startActivity(dashboardintent);
}
public void gotoSignUp(View view){
Toast.makeText(this, "Great Idea!", Toast.LENGTH_SHORT).show();
Intent signupintent = new Intent(this,SignUpActivity.class);
startActivity(signupintent);
}
}
package com.example.taskboxx;
import android.content.Intent;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;
public class SignUpActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sign_up);
}
public void SignUp(View view){
Toast.makeText(this, "Registered!", Toast.LENGTH_SHORT).show();
Toast.makeText(this, "Please Log In to Proceed", Toast.LENGTH_SHORT).show();
Intent loginintent = new Intent(this,LoginActivity.class);
startActivity(loginintent);
}
}
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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"
tools:context="com.example.taskboxx.LoginActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_below="@+id/Pass_textLayout"
android:paddingLeft="125dp"
android:paddingRight="125dp"
android:layout_marginTop="20dp">
<Button
android:id="@+id/login"
style="@style/Widget.AppCompat.Button.Borderless"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#EEEEEE"
android:onClick="Login"
android:text="Login" />
</LinearLayout>
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/RollNo_textLayout"
android:layout_centerInParent="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
<EditText android:id="@+id/input_RollNo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="30dp"
android:layout_marginLeft="30dp"
android:inputType="text"
android:hint="College Roll No." />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:id="@+id/Pass_textLayout"
android:layout_below="@+id/RollNo_textLayout"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
<EditText android:id="@+id/input_password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="30dp"
android:layout_marginLeft="30dp"
android:inputType="textPassword"
android:hint="Password" />
</android.support.design.widget.TextInputLayout>
<ImageView
android:id="@+id/Amrita_Logo"
android:layout_width="160dp"
android:layout_height="160dp"
android:layout_above="@+id/RollNo_textLayout"
android:layout_centerHorizontal="true"
android:layout_marginBottom="30dp"
app:srcCompat="@mipmap/ic_launcher" />
<TextView
android:id="@+id/launch_signup"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="37dp"
android:text="Don't Have an Account? Create one"
android:onClick="gotoSignUp"/>
</RelativeLayout>
<?xml version="1.0" encoding="utf-8"?>
<ScrollView 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="wrap_content"
tools:context="com.example.taskboxx.SignUpActivity">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/Explanation"
android:textColor="#AA000000"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="25dp"
android:layout_marginRight="25dp"
android:layout_marginTop="25dp"
android:text="Enter the following details to Sign up for TaskBoxx, your personal project and task manager!" />
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/SignUpName_textLayout"
android:layout_below="@+id/Explanation"
android:layout_marginTop="20dp"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
<EditText android:id="@+id/input_Name_SignUp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="30dp"
android:layout_marginLeft="30dp"
android:inputType="text"
android:hint="Name" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:layout_width="250dp"
android:layout_height="wrap_content"
android:id="@+id/SignUpRollNo_textLayout"
android:layout_below="@+id/SignUpName_textLayout"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
<EditText android:id="@+id/input_RollNo_SignUp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:layout_marginLeft="30dp"
android:inputType="text"
android:hint="Roll No." />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:layout_width="200dp"
android:layout_height="wrap_content"
android:id="@+id/SignUpDept_textLayout"
android:layout_below="@+id/SignUpRollNo_textLayout"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
<EditText android:id="@+id/input_Dept_SignUp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:layout_marginLeft="30dp"
android:inputType="text"
android:hint="Department" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:layout_width="150dp"
android:layout_height="wrap_content"
android:id="@+id/SignUpCGPA_textLayout"
android:layout_below="@+id/SignUpRollNo_textLayout"
android:layout_toRightOf="@+id/SignUpDept_textLayout"
android:layout_toEndOf="@+id/SignUpDept_textLayout">
<EditText android:id="@+id/input_CGPA_SignUp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="30dp"
android:layout_marginLeft="10dp"
android:inputType="text"
android:hint="CGPA" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/SignUpSem_textLayout"
android:layout_below="@+id/SignUpName_textLayout"
android:layout_toEndOf="@+id/SignUpRollNo_textLayout"
android:layout_toRightOf="@+id/SignUpRollNo_textLayout">
<EditText android:id="@+id/input_Sem_SignUp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="30dp"
android:layout_marginLeft="10dp"
android:inputType="number"
android:hint="Sem" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/SignUpAOI_textLayout"
android:layout_below="@+id/SignUpDept_textLayout"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
<EditText android:id="@+id/input_AOI_SignUp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="30dp"
android:layout_marginLeft="30dp"
android:inputType="text"
android:hint="Areas of Interest" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/SignUpemail_textLayout"
android:layout_below="@+id/SignUpAOI_textLayout"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
<EditText android:id="@+id/input_email_SignUp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="30dp"
android:layout_marginLeft="30dp"
android:inputType="textEmailAddress"
android:hint="Contact Email Address" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/SignUpContact_textLayout"
android:layout_below="@+id/SignUpemail_textLayout"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
<EditText android:id="@+id/input_Contact_SignUp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="30dp"
android:layout_marginLeft="30dp"
android:inputType="number"
android:hint="Contact No." />
</android.support.design.widget.TextInputLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_below="@+id/SignUpContact_textLayout"
android:paddingLeft="125dp"
android:paddingRight="125dp"
android:layout_marginTop="20dp">
<Button
android:id="@+id/SignUp"
style="@style/Widget.AppCompat.Button.Borderless"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#EEEEEE"
android:onClick="SignUp"
android:text="Sign Up" />
</LinearLayout>
</RelativeLayout>
</ScrollView>
\ No newline at end of file
...@@ -5,7 +5,7 @@ buildscript { ...@@ -5,7 +5,7 @@ buildscript {
jcenter() jcenter()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:2.3.0' classpath 'com.android.tools.build:gradle:2.3.1'
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment