LAB1 - Name Harsh Patel Lab Number 1 Course Number ITMD 455-555 Date Screen Shots 1 Menu list of smartphone where you can see application is installed

LAB1 - Name Harsh Patel Lab Number 1 Course Number ITMD...

This preview shows page 1 - 5 out of 7 pages.

Name: Harsh Patel Lab Number: 1 Course Number: ITMD 455-555 Date: 01/23/2017 Screen Shots: 1) Menu list of smartphone where you can see application is installed and named TempConverter.
Image of page 1
2) First screen after opening the application. 3) Converted 30 degree Celsius to Fahrenheit which is 86.0
Image of page 2
4) If the value is >90 (greater than 90) 5) If the value is <0 (less than 0)
Image of page 3
Source Code: 1) MainActivity.java Note: All comments are defining line of code which is above the comment. package com.example.harsh.tempconverter ; import android.graphics.Color ; import android.os.Bundle ; import android.support.v7.app.AppCompatActivity ; import android.view.View ; import android.widget.Button ; import android.widget.EditText ; import android.widget.ImageView ; import android.widget.RadioButton ; import android.widget.Toast ; /** * Created by Harsh on 1/23/2017. */ public class MainActivity extends AppCompatActivity { private EditText text ; private ImageView iv ; @Override protected void onCreate (Bundle savedInstanceState) { //One of the Lifecycle event which starts when app starts. super .onCreate(savedInstanceState) ; setContentView(R.layout. activity_main ) ; text = (EditText) findViewById(R.id. editText ) ; iv = (ImageView) findViewById(R.id. imageView ) ; iv .setVisibility(View. INVISIBLE ) ; //Setting startUp imageView Invisible Button btn = (Button) findViewById(R.id. button ) ; btn.setOnClickListener( new View.OnClickListener() { //This method will be called when User clicks on the button @Override public void onClick (View v) { RadioButton celsiusButton = (RadioButton) findViewById(R.id. radioButton ) ; RadioButton fahrenheitButton = (RadioButton) findViewById(R.id. radioButton2 ) ; if ( text .getText().length() ==
Image of page 4
Image of page 5

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture