



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




menu home back and sometimes search TERM 2
DEFINITION 2 src/ - java source files anything you writegen/ - java files created during compilation (do not modify)libs/ - compiled code used for application 3rd partres/ - resources images and GUI layoutsassets/ - similar to res TERM 3
DEFINITION 3 requires that parts of your code be in a named package Packages use reverse domain name scheme which must be 2 names deep TERM 4
DEFINITION 4 specifies version and features, you can also change the iconIncludes libraries as well "runtime configuration"Also includes your permissions, anything that can be seen as a security risk must be listed. If the permission isn't requested then an exception was thrown. TERM 5
DEFINITION 5 res/drawable-*/ this is where shapes, gradients and images are here. Has subfolders for different screen resolutions which can scale images or use different images for various screens.
res/layout - defines the GUI xml layoutres/menu - descriptions of menus for appsres/values - strings used in the app which makes translations easier and cleaner TERM 7
DEFINITION 7 every widget and resource gets an id so that it can be referenced in the layout.res/layout/main.xml = > R.layout.mainfor the widgets etc. R.id.widgetLabel TERM 8
DEFINITION 8 Activities - a single screen with user interfaceServices - runs in the background, it calls an activity but it does not have it's own user interface.Content Providers - manage shared sets of application dataBroadcast Receivers - respond to system wide notifications such as low power TERM 9
DEFINITION 9 Each app has 1 activitythe activity class contains a model instance and a view instance it is the controller in the Android programs.They do not have a constructor instead the onCreate is used to initialize it.It sets up GUI initializes data and connects the views and controllers.It must call super.onCreate(SavedInstanceState) and then setContentView(R.layout.activity.main) all within the onCreate method. TERM 10
DEFINITION 10 you can override onSaveInstanceState that way activities can write their state to that bundle in case they are terminated.
a subclass of ViewThey must have a constructor which takes a Context and an AttributeSet. This constructor must call super(Context, AttributeSet). You must also override the onDraw method which takes a canvas as a parameter.Your update method within your observer class should call postInvalidate() or invalidate which will tell the program to redraw itself. TERM 17
DEFINITION 17 override public boolean onTouchEvent(MotionEvent e) this use logical operations to decide what to do, MotionEvent.ACTION_DOWN and MotionEvent.ACTION_MOVE andMotionEvent.ACTION_UP is what we have used. to test thes use touchDown(x, y); touchUp(); touchMove(x, y); drag(x1, y1, x2, y2); and click for any necessary buttons that need to be clicked.You test you view by thoroughly testing your activity. There is not a test class specifically for your view. TERM 18
DEFINITION 18 they use float type because it uses less memory, float is good for fractional scaling to different screens. There is not reason to use double because the screen cannot show the precision. how to convert int to float, float x = 50;how to convert double to float, float x = 50.7f; TERM 19
DEFINITION 19 this lets the user control the color, fill type (style), stroke width, TypeFace and text style and size for font as well. You use this to describe the objects to be drawn except for the shape. TERM 20
DEFINITION 20 The colors are represented by numbers from 0-255 because each color is 8 bits and 2 raised to the 8th is 256 so there are 256 spaces for binary when describing the specific color.To create a color use the static methodsColor.argb(int alpha, int red, int green, int blue) andColor.rgb(int red, int green, int blue)alpha is the transparency.for common colors you can use static fields
Makes curves smoother by fading out the color on edges a bit.