0% found this document useful (0 votes)
20 views6 pages

Mad MP

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views6 pages

Mad MP

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

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:-
i. User can easily zoom the image in and out also rotate the image clockwise and
anticlockwise in the mobile.
ii. It reduces the efforts.

3.0Course Outcomes Addressed:-


1) Interpret features of Android Operating System.
2) Configure Android environment and development tools.
3) Develop rich user interfaces by using layouts and controls.
4) Use User Interface components for android application development.

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.
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.

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 -
i5 Processor, 8GB Ram
2 Android Studio Version:- 3.5/above. 1 -

8.0Outputs of the Micro-Projects:


Activity_main.xml-

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


<LinearLayout 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"
android:orientation="vertical"
tools:context=".MainActivity" >

<ImageView
android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="236dp"
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"
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>

Rotateanticlockwise.xml-
<?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"
android:pivotX="50%"
android:pivotY="50%"
android:duration="5000"/>

</set>

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">
<rotate android:fromDegrees="0"
android:toDegrees="360"
android:pivotX="50%"
android:pivotY="50%"
android:duration="5000"/>

</set>

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;


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 =
AnimationUtils.loadAnimation(getApplicationContext(), R.anim.zoomout);
img.startAnimation(animZoomOut);
}
});
tglbtn.setOnClickListener(new View.OnClickListener()
{
public void onClick(View v) {
Animation animRotateAnticlockwise =
AnimationUtils.loadAnimation(getApplicationContext(), R.anim.rotateanticlockwise);
img.startAnimation(animRotateAnticlockwise);
}
});
tglbtn.setOnClickListener(new View.OnClickListener()
{
public void onClick(View v) {
Animation animRotateClockwise =
AnimationUtils.loadAnimation(getApplicationContext(), R.anim.rotateclockwise);
img.startAnimation(animRotateClockwise);
}
});
}
}

Manifest code:
<?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>
</activity>
</application>

</manifest>
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.

You might also like