Lauren Bricker
CSE 340 Spring 2021
Code for the Spot The Heron case study.
AppCompatActivity#onCreate(Bundle savedInstanceState)
is called. This method:loadImage(int image)
to load the first image (0th index) in the list of file namesCode for the Spot The Heron case study.
loadImage(int image)
methodfindViewById(R.id.heronView)
switchImage(boolean forward)
method is called.Android Version | Web Version |
---|---|
![]() |
![]() |
Content | Structure | Style | Behavior |
---|---|---|---|
![]() |
|||
Words and Images | HTML | CSS | JavaScript |
Content | Structure | Style | Behavior |
---|---|---|---|
![]() |
![]() |
||
Words and Images | HTML | CSS | JavaScript |
Content | Structure | Style | Behavior |
---|---|---|---|
![]() |
![]() |
![]() |
|
Words and Images | HTML | CSS | JavaScript |
Content | Structure | Style | Behavior |
---|---|---|---|
![]() |
![]() |
![]() |
![]() |
Words and Images | HTML | CSS | JavaScript |
Java != JavaScript
Java | JavaScript | HTML/CSS |
---|---|---|
Compiled | Interpreted | Rendered Data |
Type safe | Not type safe | N/A |
<img />
, <hr />
, <br />
, <link />
<!DOCTYPE html><html lang="en"> <head> <meta charset="utf-8"> <title></title> </head> <body> </body></html>
<title></title>
(which nests inside your <head></head>
)<h1></h1>
.. <h6></h6>
<p>
<ol></ol>
, <ul></ul>
, with list elements <li></li>
<hr />
<strong></strong>
which defaults to a bold style and emphasis <em></em>
which defaults to italicized in most browsers.<header></header>
: The header or banner that displays the title of the page<main></main>
: The bulk of the content of the page<footer></footer>
: The footer is optional but you can put contact info and copyright date in there.<a href="filename"></a>
<img src="img.jpg" alt="Description!"/>
<!-- -->
<link href=“style.css” rel=“stylesheet” />
Mind blowing demo time!
Android | Web |
---|---|
Java | HTML/CSS/JS |
Layouts | CSS Flexbox or Grid |
Interactor Hierarchy | Document Object Model (DOM) |
Content Description | alt text |
Paint objects on a canvas | CSS |
onCreate |
window.addEventListener("load", init); |
View.OnClickListener#onClick |
domElement.addEventListener("click", callback); |
High level tools and the the Toolkit are generally packaged as part of a toolkit but really should be thought of as separate things. (You can program the toolkit without the tools. )
You can do web programming with a notepad editor and a browser, nothing more.
Keyboard shortcuts
↑, ←, Pg Up, k | Go to previous slide |
↓, →, Pg Dn, Space, j | Go to next slide |
Home | Go to first slide |
End | Go to last slide |
Number + Return | Go to specific slide |
b / m / f | Toggle blackout / mirrored / fullscreen mode |
c | Clone slideshow |
p | Toggle presenter mode |
s | Start & Stop the presentation timer |
t | Reset the presentation timer |
?, h | Toggle this help |
Esc | Back to slideshow |