Mad Labit3681
Mad Labit3681
(2021 REGULATION)
For Information Technology 6th Sem scheme and its subjects, do visit IT 6th Sem 2021
regulation scheme. The detailed syllabus of mobile application development laboratory is as
follows.
Course Objectives:
List of Experiments:
Text Books:
Reference Books:
Windows install
System requirements
Disk Space: 2.5 GB (does not include disk space for IDE/tools).
Git for Windows 2.x, with the Use Git from the Windows Command
Prompt option.
If Git for Windows is already installed, make sure you can run git commands from the
2. Under the “Get the Flutter SDK” section, click the “Download for Windows”
button.
flutter.
1. Open the Start menu and search for “Edit environment variables for your account”.
Under “User variables”, scroll down to find the “Path” variable and click on “Edit”.
Click on “New” and add the path to the Flutter SDK’s bin directory. For example, if you
following path:
C:\Users\<your_username>\flutter\bin
flutter doctor
The flutter doctor command will check your system for any missing dependencies or
issues with your Flutter installation. If everything is installed correctly, you will see a
2.18.0-197.1) [✓] Android tools [✓] Git [✓] Visual Studio Code
If you want to develop Flutter apps for Android, you will need to perform some
Android apps. You can download Android Studio for free from the Android Developer
website: https://developer.android.com/studio/.
The Android SDK is a collection of tools and libraries that are used to develop Android
apps. You can set up the Android SDK by following the instructions in the Android
Studio documentation.
If you haven’t already, you will need to agree to the Android SDK licenses. You can do
this by opening Android Studio and going to File > Settings > Appearance & Behavior
> System Settings > Android SDK. Then, select the Android SDK and click the Accept
butt
Emulators and VMWare & XCode Setup for Flutter App Development
Emulators and VMWare & XCode are essential tools for Flutter app development.
Emulators allow you to test your apps on simulated devices without the need for
physical devices. VMWare & XCode are required for iOS development.
Emulators
devices. This allows you to identify and address potential issues before deploying your
Android Emulator
Flutter provides a built-in emulator for Android devices. To launch the emulator, open a
.
Creating a New project:
Open Android Stdio and then click on File -> New -> New
project.
Then type the Application name as “ex.no.1″ and click Next.
Then select the Minimum SDK as shown below and click Next.
Then select the Empty Activity and click Next.
<TextView
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="30dp"
android:gravity="center"
android:text="Hello World!"
android:textSize="25sp"
android:textStyle="bold" />
<Button
android:id="@+id/button1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:gravity="center"
android:text="Change font size"
android:textSize="25sp" />
<Button
android:id="@+id/button2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:gravity="center"
android:text="Change color"
android:textSize="25sp" />
</LinearLayout>
Now click on Design and your application will look as given below.
Then delete the code which is there and type the code as given below.
Code for MainActivity.java:
package com.example.exno1;
import android.graphics.Color;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
Aim:
Procedure:
Open Android Stdio and then click on File -> New -> New project.
Then select the Minimum SDK as shown below and click Next.
Then delete the code which is there and type the code as given below.
Code for Activity_main.xml:
<LinearLayout
android:id="@+id/linearLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp">
<EditText
android:id="@+id/editText1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:inputType="numberDecimal"
android:textSize="20sp" />
<EditText
android:id="@+id/editText2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:inputType="numberDecimal"
android:textSize="20sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/linearLayout2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp">
<Button
android:id="@+id/Add"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="+"
android:textSize="30sp"/>
<Button
android:id="@+id/Sub"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="-"
android:textSize="30sp"/>
<Button
android:id="@+id/Mul"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="*"
android:textSize="30sp"/>
<Button
android:id="@+id/Div"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="/"
android:textSize="30sp"/>
</LinearLayout>
<TextView
android:id="@+id/textView"
android:layout_width="match_parent
"
android:layout_height="wrap_content"
android:layout_marginTop="50dp"
android:text="Answer is"
android:textSize="30sp"
android:gravity="center"/>
</LinearLayout>
Now click on Design and your application will look as given below.
Then delete the code which is there and type the code as given below.
package com.example.devang.exno3;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// set a listener
Add.setOnClickListener(this);
Sub.setOnClickListener(this);
Mul.setOnClickListener(this);
Div.setOnClickListener(this);
}
@Override
public void onClick (View v)
{
float num1 = 0;
float num2 = 0;
float result = 0;
String oper =
"";
// defines the button that has been clicked and performs the corresponding operation
// write operation into oper, we will use it later for output
switch (v.getId())
{
case R.id.Add:
oper = "+";
result = num1 + num2;
break;
case R.id.Sub:
oper = "-";
result = num1 - num2;
break;
case R.id.Mul:
oper = "*";
result = num1 * num2;
break;
case R.id.Div:
oper = "/";
result = num1 / num2;
break;
default:
break;
}
// form the output line
Result.setText(num1 + " " + oper + " " + num2 + " = " + result);
}
}
Output:
Result: