Android Development| 2026 high Quality Revision, Exams of Information Integration

Android Development| 2026 high Quality Revision Android Development| 2026 high Quality Revision

Typology: Exams

2025/2026

Available from 03/14/2026

christine-boyle
christine-boyle šŸ‡ŗšŸ‡ø

3.6

(7)

3.9K documents

1 / 19

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Android Development| 2026 high
Quality Revision
dp - Correct answer Measurement for pixels
alpha - Correct answer Level of transparency
String - Correct answer Class (not primitive) made of chars
sp - Correct answer text pixel measurement
public - Correct answer java code for accessible across entire application
static - Correct answer Method relates to whole class and not just
instances
void - Correct answer java code for return nothing
gravity - Correct answer How your content aligns in element
extends - Correct answer java code for passing attributes
protected - Correct answer java code for privately accessible to specific
package
println - Correct answer Java code stands for Print Line
AS: create public View class called view that returns nothing > call it with
clickFunction > Log "info" "Button pressed" - Correct answer public void
clickFunction(View view) {
Log.f("Info", "Button Press");
}
Where do you input the function name of a button that responds when
clicked? - Correct answer The onClick property section
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13

Partial preview of the text

Download Android Development| 2026 high Quality Revision and more Exams Information Integration in PDF only on Docsity!

Android Development| 2026 high

Quality Revision

dp - Correct answer Measurement for pixels alpha - Correct answer Level of transparency String - Correct answer Class (not primitive) made of chars sp - Correct answer text pixel measurement public - Correct answer java code for accessible across entire application static - Correct answer Method relates to whole class and not just instances void - Correct answer java code for return nothing gravity - Correct answer How your content aligns in element extends - Correct answer java code for passing attributes protected - Correct answer java code for privately accessible to specific package println - Correct answer Java code stands for Print Line AS: create public View class called view that returns nothing > call it with clickFunction > Log "info" "Button pressed" - Correct answer public void clickFunction(View view) { Log.f("Info", "Button Press"); } Where do you input the function name of a button that responds when clicked? - Correct answer The onClick property section

AS: find the email ID > edit text - Correct answer EditText email = (EditText) findViewById(R.id.email); AS: get email ID text > parse to string > log email text - Correct answer Log.i("Info", email.getText().toString()); Toast - Correct answer Java code that prints message to screen. AS: make toast for MainActivity > message "Toast Worked" - Correct answer Toast.makeText(MainActivity.this, "Toast Worked", Toast.LENGTH_LONG).show(); Where do images get stored in Android Studio? - Correct answer The drawable folder ImageView - Correct answer Name of images AS: find image1 ID > ImageView - Correct answer ImageView image = (ImageView) findViewById(R.id.image1); AS: get image2 from drawable > set image resource of image ID as image

  • Correct answer image.setImageResource(R.drawable.image2); AS: get text > parse to string > parse to double - Correct answer Double doubleName= Double.parseDouble(stringName.getText().toString()); AS: parse double ID'd euroAmount as 2 decimal string - Correct answer String.format("%.2f", euroAmount) Java: create class called "HelloWorld" > print "Hello World!" - Correct answer public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World"); } } What are classes in Java? - Correct answer Type of object definition

Java: create List named listName > add new array constructor to list > add numbers to list > remove number to list > log an index > log entire array as string - Correct answer List listName = new ArrayList(); listName.add(1); listName.add(2); listName.add(3); System.out.println(listName.get(2)); listName.remove(2); System.out.println(listName.toString()); Map - Correct answer Java code that maps a property to an object (or hashes one) Java: store a new map in favorites > put favColor blue > put a favNum 7 > log favColor > remove favNum > log map size - Correct answer Map favorites = new HashMap(); favorites.put("color", "blue"); favorites.put("num", 7); System.out.println(favorites.get("color")); favorites.remove("num"); System.out.println(favorites.size()); Java: tells us number of items in hash - Correct answer map.size(); AS: convert string to integer - Correct answer Integer.parseInt(); AS: solution to Error:Execution failed for task ':app:buildInfoDebugLoader' bug - Correct answer Go to Run > Click clean and rerun Where do you do version control with git and github in AS? - Correct answer Under the VCS tab Java: create if statement > if x is less than 5 > log x is less than 5 > else if x is greater than 5 > log x is greater than 5 - Correct answer if (x < 5) { System.out.println("x is less than 5"); } else { System.out.println("x is greater than 5"); }

Java: create a for loop > count by 2s > start at 0 > end at 10 - Correct answer for (x = 0; x <= 10; x += 2) {} Java: create a while loop > count by 1s > start at 0 > end at 10 - Correct answer int x = 0; while (x <= 10) { x++ } Java: create a for each loop > create a String called name for each index in the family array > log the names - Correct answer for (String name : family) { System.out.println(name); } while loop - Correct answer Loop iterates through an array while a condition is true for loop - Correct answer Loop iterates through an array for a specific set of conditions for each loop - Correct answer Loop iterates through an array and peforms an action on each index How do you make each property in an object a string when creating a list? - Correct answer Use the identifier in front of List on both sides of the equal operator Java: create a list called family > make list contain strings > add 2 family members - Correct answer List family = new ArrayList(); family.add("Tony"); family.add("CJ"); How can you align elements in AS? (4) - Correct answer 1) center of screen

  1. relative to another element
  2. corners
  3. margin away from the above

What can you use grid layout for in AS? - Correct answer You can define views inside the layout to keep elements together AS: method used to retrieve a tagged element - Correct answer getTag(); AS: import media player file > create new audio named audio > play audio - Correct answer import android.media.MediaPlayer; MediaPlayer audio = MediaPlayer.create(this, R.raw.laugh); audio.start(); AS: media player start > stop > pause - Correct answer .start(); .stop(); .pause(); AS: find video view called videoView > set the video path to demo/video > start the video - Correct answer VideoView videoView = (VideoView) findViewById(R.id.videoView); videoView.setVideoPath("android.resource://" + getPackageName() + "/" + R.raw.demo/video); videoView.start(); AS: create new media controller named mediaController for video controls > Set mediaController as the anchor for the video view > set mediaController as the Media Controller for video view - Correct answer MediaController mediaController = new MediaController(this); mediaController.setAnchorView(videoView); videoView.setMediaController(mediaController); AS: Add your own code to a method that already exists - Correct answer @Override

AS: call AudioManager called audioManager > get Audio Manager service in context Audio Service > set int max volume to stream music > set int current volume to steam music > set max volume to max > set progress to current volume > set stream volume in onProgressChanged to progress - Correct answer AudioManager audioManager; audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE); int maxVolume = audioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC); int curVolume = audioManager.getStreamVolume(AudioManager.STREAM_MUSIC); volumeControl.setMax(maxVolume); volumeControl.setProgress(curVolume); audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, progress, 0); AS: get ID name of button clicked - Correct answer Id = view.getResources().getResrouceEntryName(id); AS: get file name for raw file - Correct answer int resourcesId = getResources().getIdentifier(ourId, "raw", "com.joncorrin.basicphrases"); AS: create new Handler > create new Runnable > run a log every second - Correct answer final Handler handler = new Handler(); Runnable run = new Runnable(); @Override public void run() { Log.i("test", "run"); handler.postDelayed(this, 1000); } handler.post(run);

connection.connect(); InputStream inputStream = connection.getInputStream(); Bitmap myBitmap = BitmapFactory.decodeStream(inputStream); return myBitmap; } catch (MalformedURLException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } return null; } } AS: Execute image downloader class to download images on specific URL

  • Correct answer ImageDownloader task = new ImageDownloader(); Bitmap myImage; try { myImage = task.execute("https://url.com").get(); downloadImage.setImageBitmap(myImage); } catch (InterruptedException e) { e.printStackTrace(); } catch (ExecutionException e) { e.printStackTrace(); } Java: Create a string with three names > split strings into array on spaces - Correct answer String string = "Jon Tony CJ"; String[] splitString = string.split(" "); .split(""); - Correct answer Method splits string into an array Java: convert string into a substring for any indexes - Correct answer String river = "Mississippi"; String riverPart = river.subString(2, 5); Java: create a Pattern with regex > use matcher to match Pattern to string > use while loop to print while matcher finds pattern - Correct answer String river = "Mississippi";

Pattern p = Pattern.compile("Mi(.*?)pi"); Matcher m = p.matcher(river); while (m.find()) { System.out.println(m.group(1)); } AS: Create download content from URL class - Correct answer public class DownloadTask extends AsyncTask { @Override protected String doInBackground(String... urls) { String result = ""; URL url; HttpURLConnection urlConnection = null; try { url = new URL(urls[0]); urlConnection = (HttpURLConnection) url.openConnection(); InputStream in = urlConnection.getInputStream(); InputStreamReader reader = new InputStreamReader(in); int data = reader.read(); while (data != -1) { char current = (char) data; result += current; data = reader.read(); } return result; } catch (MalformedURLException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } return null; } } AS: Call download content from URL in onCreate - Correct answer DownloadTask task = new DownloadTask(); String result = null;

AS: create a JSON array - Correct answer //JSON has to be setup as an array with objects and properties JSONArray arr = new JSONArray(strings); AS: create a loop to iterate through JSON array and get each part as an object - Correct answer for (int i =0; i add marker title - Correct answer mMap.addMarker(new MarkerOptions().position(everest).title("Mount Everest")); AS: Move map camera to everest - Correct answer mMap.moveCamera(CameraUpdateFactory.newLatLng(everest)); AS: use blue default icon for google map marker - Correct answer mMap.addMarker(new MakrerOptions().position(everest).title("Marker").icon(BitmapDescriptorFact ory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE))); AS: zoom in on everest in map - Correct answer mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(everest, 1)); AS: Set map type to hybrid - Correct answer mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID)); AS: Set user permissions for fine location - Correct answer AS: Create location manager - Correct answer LocationManager locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);

AS: Create location listener - Correct answer LocationListener locationListener = new LocationListener() {creates onLocation changed, statusChanged, onProviderEnabled, onProviderDisabled methods} AS: Check if location permission is granted > if it's not, request it > if it is, update location - Correct answer if (ContextCompat.checkSelf(Permission(this, Manifest.permission.ACESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) { ActivityCompat.requestPermissions(this, new String[] {Manifest.permission.ACCESS_FINE_LOCATION}, 1); } else { locationManager.requestLocationUpdates(LocationManager.GPS_PROVID ER, 0, 0, locationListener); } AS: Listen for updates to location if permission is granted - Correct answer public void onRequestPermissionsResult(...) { super.onRequestPermissionsResult(...); if(grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) { if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) { locationManager.requestLocationUpdate(LocationManager.GPS_PROVID ER, 0, 0, locationListener); }} AS: Request location update on device using a build less than API 23 marshmellow - Correct answer if (Build.VERSION.SDK_INT < 23) { locationManager.requestLocationUpdates(LocationManager.GPS_PROVID ER, 0, 0, locationListener); }

Toast.makeText(MainActivity.this, address, Toast.LENGTH_SHORT).show(); //Same for all parts of address, just keep adding and put spaces in between AS: create code for button to switch over to another acitivity - Correct answer Intent intent = new Intent(getApplicationContext(), MainActivity.class); startActivity(intent); AS: method for passing variable to other activities - Correct answer intent.putExtra("var", "var passed"); AS: method for getting variable from another activity - Correct answer intent.getStringExtra("var"); AS: create a new shared preferences instance > put username string: jon in it > get that string - Correct answer SharedPreferenes sharedPreferences = this.getSharedPreferences("com.joncorrin.appName", Context.MODE_PRIVATE); sharedPreferences.edit().putString("username", "Jon").apply(); String username = sharedPreferences.getString("username", "defaultValue"); AS: Create new menu resource file - Correct answer AS: Add new items to menu in xml - Correct answer AS: Link menu to main activity - Correct answer @Override public boolean onCreateoptionsMenu(Menu menu) { MenuInflater menuInflater = getMenuInflater(); menuInflater.inflate(R.menu.main_menu, menu); return super.onCreateOptionsMenu(menu); }

AS: log item selected on item selection in menu - Correct answer @Override public boolean onOptionsItemSelected(MenuItem item) { super.onoptionsItemSelected(item); switch (item.getItemId()) { case R.id.settings: Log.i("Menu item", "ItemName"); return true; case R.id.settings: Log.i("Menu item", "ItemName"); return true; default: return false; } } AS: create a yes/no alert - Correct answer new AlertDialog.Builder(this) .setIcon(android.R.drawable.ic_dialog_alert) .setTitle("Are you sure?") .setMessage("Do you want to do this?") .setPositiveButton("Yes", new DialogInterface.onClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i){ Toast ...; } } .setNegativeButton("No", null) .show(); } AS: Create a new Users SQLite database - Correct answer SQLiteDatabase myDatabase = this.openorCreateDatabase("Users", MODE_PRIVATE, null); AS: Create a users table myDatabase.execSQL("CREATE TABLE IF NOT EXISTS users(name VARCHAR, age INT(3))"); AS: Insert data into Users table

@Override public void done(ParseException e) { if (e == null) { Log.i("SaveInBackground", "Success"); } else { Log.i("SaveInBackground", "failed" + e.toString()); } } }); AS: Get data from Parse server - Correct answer ParseQuery query = ParseQuery.getQuery("Score"); query.getInBackground("ObjectID", new GetCallback() { @Override public void done(ParseObject object, ParseException e) { if (e == null && object != null) { Log.i("Value", object.getString("username")); } }}); AS: Add a new color variable in res/values/color.xml - Correct answer #666666 AS: Change the color of the navbar - Correct answer #0A65D9