0% found this document useful (0 votes)
16 views3 pages

Practical No. 10 Shweta Mad

The document contains XML layouts for two Android activities, including a login interface and a student login interface, along with a Java class for the main activity. It also includes a colors.xml file defining color resources for the application. The layouts feature elements like EditTexts for username and password input, Buttons for login actions, and TextViews for titles and hints.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views3 pages

Practical No. 10 Shweta Mad

The document contains XML layouts for two Android activities, including a login interface and a student login interface, along with a Java class for the main activity. It also includes a colors.xml file defining color resources for the application. The layouts feature elements like EditTexts for username and password input, Buttons for login actions, and TextViews for titles and hints.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Practical No:-10

Name:-Shweta ChavanPatil Roll No:-3207

Activity.xml:-
android:layout_marginLeft="20dp"
<?xml version="1.0" encoding="utf-8"?> android:layout_marginTop="35dp"
<LinearLayout android:layout_marginRight="20dp"
xmlns:android="http://schemas.android.com/apk/re android:backgroundTint="#5c6bc0"
s/android" android:padding="10dp"
android:layout_width="match_parent" android:text="Log In"
android:layout_height="match_parent" android:textColor="#ffffff"
android:background="#3b5998" android:textSize="16sp"
android:orientation="vertical"> android:textStyle="bold" />

<ImageView <RelativeLayout
android:layout_width="80dp" android:layout_width="match_parent"
android:layout_height="80dp" android:layout_height="match_parent">
android:layout_gravity="center"
android:layout_marginTop="80dp" <LinearLayout
android:src="@drawable/img" /> android:layout_width="match_parent"
android:layout_height="wrap_content"
<EditText android:layout_alignParentBottom="true"
android:layout_width="match_parent" android:orientation="vertical">
android:layout_height="wrap_content"
android:layout_marginLeft="20dp" <TextView
android:layout_marginTop="80dp" android:id="@+id/txtSignUp"
android:layout_marginRight="20dp" android:layout_width="wrap_content"
android:backgroundTint="#d3d3d3" android:layout_height="wrap_content"
android:hint="Username or Email"
android:inputType="textEmailAddress" android:layout_gravity="center_horizontal"
android:maxLines="1" android:text="Sign Up for Facebook"
android:padding="10dp" android:textColor="#ffffff" />
android:textColor="#ffffff"
android:textColorHint="#d3d3d3" /> <TextView
android:id="@+id/txtForgotPassword"
<EditText android:layout_width="wrap_content"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp" android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp" android:layout_marginTop="15dp"
android:layout_marginRight="20dp" android:layout_marginBottom="15dp"
android:backgroundTint="#d3d3d3" android:text="Forgot Password?"
android:hint="Password" android:textColor="#ffffff" />
android:inputType="textPassword" </LinearLayout>
android:maxLines="1"
android:padding="10dp" </RelativeLayout>
android:textColor="#ffffff"
android:textColorHint="#d3d3d3" /> </LinearLayout>

<Button
android:id="@+id/btnLogin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
java file:-

package com.pkk.login; Output:-


import
androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
public class MainActivity extends
AppCompatActivity {
@Override
protected void onCreate(Bundle
savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}

Colors.xml:-
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="purple_200">#3b5998</color>
<color name="purple_500">#FF6200EE</color>
<color name="purple_700">#FF3700B3</color>
<color name="teal_200">#FF03DAC5</color>
<color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
</resources>
2.
Activity.xml public class MainActivity extends
<?xml version="1.0" encoding="utf-8"?> AppCompatActivity {
<LinearLayout
xmlns:android="http://schemas.android.com/apk/re @Override
s/android" protected void onCreate(Bundle
android:layout_width="match_parent" savedInstanceState) {
android:layout_height="match_parent" super.onCreate(savedInstanceState);
android:orientation="vertical" setContentView(R.layout.activity_main);
android:padding="32dp" }
android:gravity="center"> }
<TextView
android:id="@+id/titleText" Output:-
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Student Login"
android:textSize="24sp"
android:textColor="#000000"
android:layout_marginBottom="20dp"
android:gravity="center" />
<EditText
android:id="@+id/username"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Enter Username"
android:inputType="text"
android:padding="10dp"
android:layout_marginBottom="20dp"
android:background="@android:drawable/edit_te
xt" />
<EditText
android:id="@+id/password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Enter Password"
android:inputType="textPassword"
android:padding="10dp"
android:layout_marginBottom="20dp"

android:background="@android:drawable/edit_text
" />
<Button
android:id="@+id/loginButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Login"
android:backgroundTint="#4CAF50"
android:textColor="#ffffff" />
</LinearLayout>

Java file:-
package com.pkk.studentlogin;
import
androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy