Docsity

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

Toggle sidebar
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" />