Skip to content

murphman29/Simple-Android-Application

Repository files navigation

Project Name: SIMPLE ANDROID APPLICATION Developer's Name: Jared Murphy

What is it? The Simple Android Application is meant to be an app that allows expression of creativity. The app allows the user to generate random colors for the text they create and also the ability to draw anything that his or her heart desires.

Special Deployment Instructions?

No special deployment instructions will be necessary for this application to run with basic functionality on an Android. For the "save drawing" function to work, once must first have a directory with the native path "/phone/". If you do not care to save your work, simply drag and drop the output.JSON and app-debug.apk files onto an Android device and start getting creative!

How to use: Upon opening the application, the user is greeted with a screen that contains some really cool features

alt text.

At the very top, there is a textbox which prompts the user for text. Changing the text within the box is completely optional and not necessary to reach full enjoyment of the app. Immediately below that box is a button which reads "Change Colour". If this button is pressed, the information within the textbox will change to a completely random color and, if you really liked the generated color, you could take note of the RGB values that appear below the button and use them for whatever you wanted to!

alt text

When ready to move on, more exciting features await when the "Time to Draw!" button is pressed. Another activity will then launch that contains 4 buttons and a drawing panel in the middle.

alt text

-The "Tap to change colour!" button can be pressed to choose the color of your drawing (More details in "Change color cont."

-The "Nuke It!" button will completely erase everything that is currently on the canvas

-The "Save Masterpiece" button will save the drawing to your machine as a .png image unless specified otherwise

-The "Stop Drawing" button will bring you back to the original screen.

Change Color Cont.

This view features three sliding bars representing r, g, and b respectively. Moving these bars and pressing "Confirm" will change everything drawn to the color generated by the values provided.

alt text

Dissection of the application:

MainActivity.java-- Contains all functional code for the first screen the user sees when opening the application.

  Main) Creates references to objects that were created using XML in activity_main.xml. (Buttons, TextBox, TextField)

  changeColor) Generates 4 random values between 0 and 255 and merges them together to make a random rgb color. The color is         then applied to the user's textfield and the values displayed on screen are updated in the updateValues() method. 

  updateValues) Updates the TextView with the RGB values generated in changeColor. This was separated from changeColor to allow for code-reusability. 

drawingBoard.java-- Contains all functional code for the screen which houses the drawing canvas and 4 buttons. This class is merely to provide functionality to the buttons that are present.

CanvasView.java-- Contains the code needed to make the drawing portion of drawingBoard work correctly. There exist methods for changing the color, placing strokes based on change in finger position, and actions listeners that detect such changes. 

ChooseColour.java -- Contains the code used for changing the color of the canvas in drawingBoard.

activity_main.xml-- Contains all XML notation for the opening screen

activity_drawing_board.xml-- Contains all XML notation for the drawing screen

Colors.xml-- Contains a few colors that are used throughout the app, such as the button background colors. 

BONUS Why some design choices were made:

Save function: The save function was dropped into the drawingBoard application because it most easily allowed for interaction with the CanvasView object as a whole. If implemented as a CanvasView method, it would have been a very complicated process to save the picture. The image created is saved as image%RANDOMNUMBER%.jpg to limit the liklihood that that there would be a duplicate.

Graphics: The graphics of this app are put together in a very 'boxy' way, thanks to RelativeView -The very large "Time to Draw!" button was actually made that way to draw more attention to it. -The black and pink colors featured on this application's buttons really brought it to life, I thought

Nuke it! This feature was implemented as part of CanvasView because it was easily executable within the class via function call

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors