Skip to main content

Posts

Showing posts from April, 2023

AMP PRACTICAL 10

  Aim: Create an android application to show the notification Activity_Main.xml <?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=".MainActivity"> <ImageView android:id="@+id/imageView" android:layout_width="40dp" android:layout_height="40dp" android:layout_margin="8dp" android:layout_marginTop="16dp" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" app:srcCompat="@drawable/a1" /> <Button android:text="click" android:layout_width="wrap_content" android:layout_h...

AMP PRACTICAL 9

  Aim: Create an android Application that open the website www.google.com in the browser on the click of a button (program on internet) Activity_Main.xml <?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=".MainActivity">   <EditText android:id="@+id/editText1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_centerHorizontal="true" android:layout_marginTop="44dp" android:ems="10"/> <Button android:id="@+id/button1" android:layout_width="wrap...

AMP PRACTICAL 8

  Aim: Create the media API in android to play an audio file. Activity_main.xml <?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=".MainActivity">   <Button android:id="@+id/btnPlay" android:layout_width="197dp" android:layout_height="75dp" android:layout_alignParentEnd="true" android:layout_alignParentRight="true" android:layout_alignParentBottom="true" android:layout_marginEnd="87dp" android:layout_marginRight="87dp" android:layout_marginBottom="468dp" android:text="Play Audio" android:onClick="playAu...

AMP PRACTICAL 7

  Aim: Create an Android application to pass the data (Program Intent passing) Activity_Main.xml <?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=".MainActivity">   <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical">   <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="10dp" android:gravity="center_horizontal" android:text="Input yourName"></TextView> <TableLayout android:id="...

AMP PRACTICAL 6

  Aim: Create an application for time picker Dialog Activity_main.xml   <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout 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.sonal.myapplication.MainActivity"> <TextView android:id="@+id/textView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_centerHorizontal="true" android:text="@string/time_pick" android:textAppearance="?android:attr/textAppearanceMedium"/> <Button android:id="@+id/set_button" android:...