Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Lab Sheet 1: Basic Views of Android Studio, Assignments of Mobile Computing

A lab sheet for the Basic Views of Android Studio course at VIT-AP University. The lab sheet contains instructions for completing four programming tasks related to Android Studio, including exploring text types, displaying a toast message, reading a name from EditText and displaying it, and performing basic arithmetic operations. sample code in both Java and XML, as well as input and output screenshots for each task. The lab sheet also includes instructions for saving and uploading the completed file.

Typology: Assignments

2022/2023

Available from 02/04/2023

diabloexodia
diabloexodia 🇮🇳

5 documents

1 / 16

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
VIT-AP UNIVERSITY, ANDHRA PRADESH
Lab Sheet 1 : Basic Views of Android Studio
Academic year: 2022-2023 Branch/ Class: B.Tech
Semester: Fall Date: 3/9/2022
Faculty Name: Mr. Kolluri Rajesh School: SCOPE
NAME: Dhyan REGNO: 20BCE7648
**********************************************************************************************************
Instructions:
Fill your Name and REGNO.
Lab 1 question is uploaded in MS TEAM
Complete all the programs, add the code java and XML, input and output
Screenshots after the question on the same document.
Save this File name with your registerno_lab1 eg
18ABC1234_LAB1.doc
Upload it in assignment ->LAB1 in MS TEAM
Lab1:
1. Exploring all types of Texts supported in Android studio. Screen shot the
keyboards that popsup. Observe the difference.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download Lab Sheet 1: Basic Views of Android Studio and more Assignments Mobile Computing in PDF only on Docsity!

VIT-AP UNIVERSITY, ANDHRA PRADESH

Lab Sheet 1 : Basic Views of Android Studio

Academic year: 2022- 2023 Branch/ Class: B.Tech

Semester: Fall Date: 3/9/

Faculty Name: Mr. Kolluri Rajesh School: SCOPE

NAME: Dhyan REGNO: 20BCE764 8

Instructions:

• Fill your Name and REGNO.

• Lab 1 question is uploaded in MS TEAM

• Complete all the programs, add the code java and XML, input and output

Screenshots after the question on the same document.

• Save this File name with your registerno _ lab1 eg

18ABC1234_LAB1.doc

• Upload it in assignment - >LAB1 in MS TEAM

Lab1:

1. Exploring all types of Texts supported in Android studio. Screen shot the

keyboards that popsup. Observe the difference.

Code: XML:

android:text="PHONE" android:textSize="24sp" app:layout_constraintEnd_toStartOf="@+id/editTextTextPersonName" app:layout_constraintHorizontal_bias="0.414" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/textView3" /> <EditText android:id="@+id/editTextTextPostalAddress" android:layout_width="wrap_content" android:layout_height="wrap_content" android:ems="10" android:hint="input your address"

android:inputType="textPostalAddress" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.865" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/editTextPhone" app:layout_constraintVertical_bias="0.225" /> </androidx.constraintlayout.widget.ConstraintLayout>

  1. Display a toast Message

CODE JAVA EditText a1,t1; Button b1=findViewById(R.id.button2); a1=findViewById(R.id.id_1); b1.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { TextView t=findViewById(R.id.textView6); String s =a1.getText().toString(); t.setText("hello " +s);

} });

  1. Read username and password and check for validity, and display login successful or failure. CODE Java : public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); String p="dhyan" , u="20bce7648"; EditText uname=findViewById(R.id.uname);

app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" app:layout_constraintVertical_bias="0.0" />