Posts

Showing posts from February, 2021

Temperature Converter App : Android Basic App

Image
  1. Start Android Studio First, open Android Studio. You should see this window. Go ahead and click "Start a new Android Studio Project". An Android Studio Project typically means the code and files for one Android Application. 2. Choose your Project On the next page you will be presented with several device platform tabs, each with different templates for adding an Activity. From the "Phone and Tablet" tab choose  "Empty Activity, " and click  "Next"  again. 3. Configure Android Project Configure your project  For this app use this configuration: Name:  TempConverter Package : com.example.android.diceroller Project location : < Your choice of where to save this project on your computer > Language:  Java Minimum API:  leave the default values 4. Now Design the App Design your app using Android Studio. Design Code : activity_main.xml <? xml version ="1.0" encoding ="utf-8" ?> <androidx.constraintlayout.widget.Co

Gallery Application Java Code

Java Code Gallay Application package com.example.gallery ; import androidx.appcompat.app.AppCompatActivity ; import android.app.WallpaperManager ; import android.graphics.Bitmap ; import android.graphics.BitmapFactory ; import android.os.Bundle ; import android.view.View ; import android.widget.Button ; import android.widget.ImageView ; import android.widget.Toast ; import java.io.IOException ; public class MainActivity extends AppCompatActivity { Integer imgarr [] = { R . drawable . img1 , R . drawable . img2 , R . drawable . img3 , R . drawable . img4 , R . drawable . img5 , R . drawable . img6 , R . drawable . img7 }; int currimg = 4 ; public void previous ( View view ){ if ( currimg == 0 ){ currimg = 4 ; } currimg --; ImageView iv = ( ImageView ) findViewById ( R . id . imagedsply ); iv . setImageResource ( imgarr [ currimg ]); } public void next ( View view ){ if ( currimg =

Installing Android Studio

Image
  Installing Android Studio One of the great things about Android development is that the tools run on all the popular platforms; Macs, Windows, and Linux machines, including some powerful Chromebooks. Download Android Studio Going to the  studio website  will take you to the correct download link for your platform. You can read more information about installing Android Studio  here . Android Studio is a large application; currently, the base installer is 927 - 1007 megabytes. Make sure you have several gigabytes of free storage on your machine to install Studio as well as the SDK and emulator images you'll need and want for development. Also, it can take a while to download. Check the  System Requirements  part of the download page for more information on what you'll need to run Studio. The Android Emulator The Android Emulator relies on a technology called virtualization and takes advantage of the graphics processor in your development machine for high performance. Virtualiza

Making your First App: Dice Roller App

Image
The exercises for these lessons were done with  Android Studio Version 3.3 . 1. Welcome to Android Studio First, open Android Studio. You should see this window. Go ahead and click "Start a new Android Studio Project". An Android Studio Project typically means the code and files for one Android Application. 2. Choose your Project On the next page you will be presented with several device platform tabs, each with different templates for adding an Activity. From the "Phone and Tablet" tab choose  "Empty Activity, " and click  "Next"  again. 3. Configure Android Project For this app use this configuration: Name:  Dice Roller Package : com.example.android.diceroller Project location : < Your choice of where to save this project on your computer > Language:  Java Minimum API:  leave the default values We've decided to build this project for "Phone and Tablet" with Minimum SDK of API 19. As of the time we wrote this course, that