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

Android App Development Lab Sheet: Animation and FABs, Assignments of Mobile Computing

Lab assignement using android atudio

Typology: Assignments

2022/2023

Available from 02/04/2023

diabloexodia
diabloexodia 🇮🇳

5 documents

1 / 7

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
VIT-AP UNIVERSITY, ANDHRA PRADESH
Lab Sheet 5: Animation and FABs
Academic year: 2022-2023 Branch/ Class: B.Tech
Semester: Fall Date: 12/10/2022
Faculty Name: Mr. Kolluri Rajesh School: SCOPE
NAME: Dhyan REGNO: 20BCE7648
**********************************************************************************************************
1.Design a Floating action button demo. Initially only the pink button should
display when the the pink button is click the rest of the three buttons should be
displayed. When each button is clicked then taost message should be displayed.
When the pink button is pressed again the three buttons should hide.
XML CODE :
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.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:id="@+id/plus"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fabb"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginTop="564dp"
android:clickable="true"
app:fabCustomSize="50dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.911"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@android:drawable/ic_input_add"
tools:ignore="SpeakableTextPresentCheck" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/call"
android:layout_width="35dp"
android:layout_height="35dp"
pf3
pf4
pf5

Partial preview of the text

Download Android App Development Lab Sheet: Animation and FABs and more Assignments Mobile Computing in PDF only on Docsity!

VIT-AP UNIVERSITY, ANDHRA PRADESH

Lab Sheet 5: Animation and FABs

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

Semester: Fall Date: 12 / 10 /

Faculty Name: Mr. Kolluri Rajesh School: SCOPE

NAME: Dhyan REGNO: 20BCE

1.Design a Floating action button demo. Initially only the pink button should

display when the the pink button is click the rest of the three buttons should be

displayed. When each button is clicked then taost message should be displayed.

When the pink button is pressed again the three buttons should hide.

XML CODE :

<androidx.constraintlayout.widget.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:id="@+id/plus" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity"> <com.google.android.material.floatingactionbutton.FloatingActionButton android:id="@+id/fabb" android:layout_width="50dp" android:layout_height="50dp" android:layout_marginTop="564dp" android:clickable="true" app:fabCustomSize="50dp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.911" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" app:srcCompat="@android:drawable/ic_input_add" tools:ignore="SpeakableTextPresentCheck" /> <com.google.android.material.floatingactionbutton.FloatingActionButton android:id="@+id/call" android:layout_width="35dp" android:layout_height="35dp"

android:layout_marginBottom="136dp" android:backgroundTint="#FF0000" android:clickable="true" app:fabCustomSize="35dp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.566" app:layout_constraintStart_toStartOf="parent" app:srcCompat="@android:drawable/ic_menu_call" tools:ignore="SpeakableTextPresentCheck" /> <com.google.android.material.floatingactionbutton.FloatingActionButton android:id="@+id/share" android:layout_width="35dp" android:layout_height="35dp" android:layout_marginBottom="68dp" android:backgroundTint="#FF0000" android:clickable="true" app:fabCustomSize="35dp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.674" app:layout_constraintStart_toStartOf="parent" app:srcCompat="@android:drawable/ic_menu_share" tools:ignore="SpeakableTextPresentCheck" /> <com.google.android.material.floatingactionbutton.FloatingActionButton android:id="@+id/send" android:layout_width="35dp" android:layout_height="35dp" android:layout_marginBottom="184dp" android:backgroundTint="#FF0000" android:clickable="true" app:fabCustomSize="35dp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.741" app:layout_constraintStart_toStartOf="parent" app:srcCompat="@android:drawable/ic_menu_send" tools:ignore="SpeakableTextPresentCheck" /> </androidx.constraintlayout.widget.ConstraintLayout>

JAVA CODE:

package com.example.lab6; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Toast; import com.google.android.material.floatingactionbutton.FloatingActionButton;

JAVA CODE(Act2.java):

OUTPUT

2. Design an App to scale one image big and one image small and vice versa

XML CODE :

<androidx.constraintlayout.widget.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=".MainActivity"> </androidx.constraintlayout.widget.ConstraintLayout>

Scale.xml

Toast. makeText (getApplicationContext(),"cleckedf",Toast. LENGTH_SHORT ).show( ); } });

OUTPUT