Mobile App Dev 2021W: Assignment 4: Difference between revisions

From Soma-notes
No edit summary
No edit summary
Line 11: Line 11:
<li>[4] Add the name of the picture as a title above the image, centered.  It should be in a Display3 bold font.  You'll need to assign each picture a name.</li>
<li>[4] Add the name of the picture as a title above the image, centered.  It should be in a Display3 bold font.  You'll need to assign each picture a name.</li>
<li>[2] When you click on the image title, have it open up a DuckDuckGo image search for that title in the system web browser.  We can do this with a specially crafted URL.  For example, if the image title is kittens, we can initiate the search by visiting the page https://duckduckgo.com/?q=kittens&iax=images&ia=images   
<li>[2] When you click on the image title, have it open up a DuckDuckGo image search for that title in the system web browser.  We can do this with a specially crafted URL.  For example, if the image title is kittens, we can initiate the search by visiting the page https://duckduckgo.com/?q=kittens&iax=images&ia=images   
<li>[4] Add a touch event handler that allows the picture to be dragged to different positions on the screen.  As the image is moved the X and Y fields should be updated.</li>
<li>[4] Add a touch event handler that allows the picture to be dragged to different positions on the screen.  As the image is moved the X and Y fields should be updated. (Note that adding a touch event handler to the picture will prevent the calling of the onClick handler.  This is expected behavior.)</li>
<li>[2] When the device is rotated, is the position of the image preserved after it is dragged?  Why or why not?</li>
<li>[2] When the device is rotated, is the position of the image preserved after it is dragged?  Why or why not?</li>
<li><b>[BONUS 2]</b> Modify your touch event handler so it cycles pictures on clicks as before <i>and</i> updates the position on drag.
</ol>
</ol>

Revision as of 03:18, 3 April 2021

This assignment is not yet finalized.

In this assignment you will be further analyzing and adding features to PicViewer2.zip from Tutorial 8. This assignment has 20 points in seven questions and is due on April 12, 2021 at 11:30 AM. Please submit your answers via cuLearn using this template.

Tasks/Questions

  1. [2] Update PicViewer2 so all the fields use a PicWatcher with clamp functions as specified in Tutorial 8. Include the full code of MainActivity.kt as your answer to this question.
  2. [2] Remove the title bar from the screens. Make sure your solution works for both light and dark modes.
  3. [4] Add a title screen with a continue button. The title should be "Picture Viewer Demo". When the title screen's continue button is pressed the main activity should be shown.
  4. [4] Add the name of the picture as a title above the image, centered. It should be in a Display3 bold font. You'll need to assign each picture a name.
  5. [2] When you click on the image title, have it open up a DuckDuckGo image search for that title in the system web browser. We can do this with a specially crafted URL. For example, if the image title is kittens, we can initiate the search by visiting the page https://duckduckgo.com/?q=kittens&iax=images&ia=images
  6. [4] Add a touch event handler that allows the picture to be dragged to different positions on the screen. As the image is moved the X and Y fields should be updated. (Note that adding a touch event handler to the picture will prevent the calling of the onClick handler. This is expected behavior.)
  7. [2] When the device is rotated, is the position of the image preserved after it is dragged? Why or why not?
  8. [BONUS 2] Modify your touch event handler so it cycles pictures on clicks as before and updates the position on drag.