You are on page 1of 6

MSBTE Solution App

Part – B Micro-Project Report


Application using Animation

1.0Rationale:
This is a simple application on animation to zoom the image in and out and also rotate the
image clockwise and anticlockwise in the mobile.
 This report consists of a codes and applications interface.

2.0Aims/Benefits of the Micro-Project:-


The aim of the project is a simple application which will have the ability to zoom the
image in and out also rotate the image clockwise and anticlockwise.
 Benefits of the Micro-project:-

P
i. User can easily zoom the image in and out also rotate the image clockwise and
anticlockwise in the mobile.

AP
ii. It reduces the efforts.

3.0Course Outcomes Addressed:-


n
tio
1) Interpret features of Android Operating System.
2) Configure Android environment and development tools.
lu

3) Develop rich user interfaces by using layouts and controls.


So

4) Use User Interface components for android application development.


TE

4.0Literature Review:
The Prepared Micro-Project is concerned with the installation and Configuration of Android
Studio IDE and java jdk for developing an Animation application.
SB

In this App we are going use of multiple Android UI components to design and step by step
Developing a Basic Animation application in Android Studio.
M

5.0 Actual Methodology Followed:


a) Literature Survey.
b) Creating frame.
c) Creating code.
d) Testing the application.

6.0 Actual Resources Required:-


Sr. Name of Specifications Qty Remarks
No. Resource/material
1 Computer Windows 10 Professional, 1 -

Downloaded From MSBTE Solution App


MSBTE Solution App

i5 Processor, 8GB Ram


2 Android Studio Version:- 3.5/above. 1 -

8.0Outputs of the Micro-Projects:


Activity_main.xml-

P
AP
n
tio
lu

<?xml version="1.0" encoding="utf-8"?>


<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
So

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"
TE

android:orientation="vertical"
tools:context=".MainActivity" >

<ImageView
SB

android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="236dp"
M

app:srcCompat="@mipmap/ic_launcher" />

<ToggleButton
android:id="@+id/toggleButton"
android:layout_width="match_parent"
android:layout_height="71dp"
android:text="Zoom anticlockwise" />

<ToggleButton
android:id="@+id/toggleButton2"
android:layout_width="match_parent"
android:layout_height="64dp"
android:text="zoom in" />

</LinearLayout>

Zoomin.xml-
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<scale
xmlns:android="http://schemas.android.com/apk/res/android"

Downloaded From MSBTE Solution App


MSBTE Solution App

android:duration="1000"
android:fromXScale="2"
android:fromYScale="2"
android:pivotX="50%"
android:pivotY="50%"
android:toXScale="4"
android:toYScale="4"/>
</set>

Zoomout.xml-
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<scale
android:duration="2500"
android:fromXScale="1.0"
android:fromYScale="1.0"
android:pivotX="50%"
android:pivotY="50%"
android:toXScale=".2"
android:toYScale=".2"/>
</set>

P
Rotateanticlockwise.xml-

AP
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="@android:anim/cycle_interpolator">
<rotate android:fromDegrees="360"
android:toDegrees="0" n
android:pivotX="50%"
tio
android:pivotY="50%"
android:duration="5000"/>
lu

</set>
So

Rotateclockwise.xml-
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/cycle_interpolator">
TE

<rotate android:fromDegrees="0"
android:toDegrees="360"
android:pivotX="50%"
SB

android:pivotY="50%"
android:duration="5000"/>

</set>
M

MainActivity.java-
package com.example.micro_19;

import androidx.appcompat.app.AppCompatActivity;

import android.bluetooth.BluetoothAdapter;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import android.widget.ToggleButton;

import static android.bluetooth.BluetoothAdapter.getDefaultAdapter;

Downloaded From MSBTE Solution App


MSBTE Solution App

public class MainActivity extends AppCompatActivity {


ImageView img;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
img = (ImageView) findViewById(R.id.imageView);
final ToggleButton tglbtn=(ToggleButton)findViewById(R.id.toggleButton);
final ToggleButton tglbtn1=(ToggleButton) findViewById(R.id.toggleButton2);
final ImageView img=(ImageView)findViewById(R.id.imageView);
tglbtn1.setOnClickListener(new View.OnClickListener(){
public void onClick(View v)
{
Animation animZoomIn =
AnimationUtils.loadAnimation(getApplicationContext(), R.anim.zoomin);
img.startAnimation(animZoomIn);
}
});
tglbtn1.setOnClickListener(new View.OnClickListener()
{
public void onClick(View v) {
Animation animZoomOut =

P
AnimationUtils.loadAnimation(getApplicationContext(), R.anim.zoomout);
img.startAnimation(animZoomOut);

AP
}
});
tglbtn.setOnClickListener(new View.OnClickListener()
{
public void onClick(View v) { n
Animation animRotateAnticlockwise =
tio
AnimationUtils.loadAnimation(getApplicationContext(), R.anim.rotateanticlockwise);
img.startAnimation(animRotateAnticlockwise);
}
lu

});
tglbtn.setOnClickListener(new View.OnClickListener()
So

{
public void onClick(View v) {
Animation animRotateClockwise =
AnimationUtils.loadAnimation(getApplicationContext(), R.anim.rotateclockwise);
TE

img.startAnimation(animRotateClockwise);
}
});
}
SB

Manifest code:
M

<?xml version="1.0" encoding="utf-8"?>


<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.micro_19">
<uses-permission android:name="android.permission.ZOOM_In"/>
<uses-permission android:name="android.permission.ZOOM_OUT"/>
<uses-permission android:name="android.permission.ROTATE_ANTICLOCKWISE"/>
<uses-permission android:name="android.permission.ROTATE_CLOCKWISE"/>

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />


</intent-filter>

Downloaded From MSBTE Solution App


MSBTE Solution App

</activity>
</application>

</manifest>

P
AP
n
tio
lu
So
TE
SB
M

Downloaded From MSBTE Solution App


MSBTE Solution App

9.0Skill Developed / Learning outcome of this Micro-Project:


1.Learn to create an application using classes and methods.
2.Understand the concepts of service.

9.0 Applications of this Micro-Project:


By using this project, user can easily zoom the image in and out and also rotate the image
clockwise and anticlockwise in the mobile.

P
AP
n
tio
lu
So
TE
SB
M

Downloaded From MSBTE Solution App

You might also like