Final review of mobile application development (do not transfer the review for personal use)

Mobile Application Development Final Review

question type

Multiple choice questions 15*2=30

Fill in the blank question 13*2=26 (alternatives are given in the question, just choose the correct one)

Short answer questions 4*6=24

Program design fill-in-the-blank questions 10*2=50 (alternatives have been given in the question, just choose the correct one)

Mainly investigate the notifications in the experiment: notification, service. The addition, deletion, modification and query operations of the database are combined with some operations on the interface.

Chapter One

common mobile phone system

ios, Android, Hongmeng.

android

insert image description here

Android Architecture

Android is a software platform and operating system based on Linux. It adopts a software stack (Software Stack) architecture, which consists of the Linux kernel layer, hardware abstraction layer, and system runtime library layer (also known as middleware) from bottom to top. layer), application framework layer and system application layer.
insert image description here

The Android program is packaged and released to the application store, and the extension used is .apk.

AndroidStudio depends on gdk and sdk (software development kit).

Chapter two

Android project structure, what folders are there

resource: can find all files
insert image description here
insert image description here
insert image description here

Units defined in Android

insert image description here
insert image description here
Know when to use these units.

Functions of the manifest file

insert image description here
insert image description here
insert image description here
All four components need to be registered in the manifest file.
How are the four components registered?
About the labels of the four major components.

Master the four major components, understand and recognize P20

insert image description here
insert image description here

first program written

Experiment 1

How to get the foreground interface components

insert image description here

How to set android id for component in foreground

insert image description here

third chapter

View class: the base class for all visual components

Common properties of common components

insert image description here

The properties used by the TestView component and the Buuton component are the same

insert image description here
insert image description here
insert image description here

For example, to set the button as an OK button and center it, you need to use

insert image description here

How to set the controls to be centered or left in the layout?

Commonly used methods. For example, to obtain the password entered by EditText in the foreground in the background, use GetText. P37

Login to register for events
insert image description here

insert image description here

insert image description here
insert image description here
insert image description here

Information prompt box component Toast

insert image description here

Can use one or two sentences to describe the characteristics of several layouts.

insert image description here

linear layout

insert image description here
insert image description here
insert image description here

relative layout

insert image description here

How to use relative layout to realize the position of a component relative to other components

insert image description here

LogTag: Android's built-in tool for outputting logs

A brief introduction to
the log tool class in Android is Log (android.util.Log), which provides the following 5 methods for us to print logs.

Log. v(). Used to print the most trivial and least meaningful log information. The corresponding level is verbose, which is the lowest level in Android logs.
Log. d(). It is used to print some debugging information, which should be helpful for you to debug programs and analyze problems. Corresponding level debug, one level higher than verbose.
Log. i(). It is used to print some important data, which should be what you really want to see and can help you analyze user behavior information. The corresponding level info is one level higher than the debug level.
Log. w(). It is used to print some warning information, indicating that the program may be potentially dangerous in this place. It is best to fix these places where warnings appear. The corresponding level warn is one level higher than info.
Log. e(). It is used to print the error information in the program, such as the catch statement entered by the program. When an error message is printed, it usually means that there is a serious problem with your program and must be fixed as soon as possible. The corresponding level error is one level higher than warn.
Reprinted from: Android Study Notes (5): Use of Android's built-in log tool

Chapter Four

How to set touch screen events? P76

insert image description here

Button set click event

insert image description here
insert image description here

chapter Five

ListView

insert image description here
insert image description here
insert image description here

Three steps for ListView to display data

insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here

Show what kind of Adapter a thing should use

insert image description here
insert image description here

The Spiner in the second chapter also needs the Adapter to set the data source: ArrayAdapter

insert image description here
insert image description here
insert image description here

progress bar component

insert image description here
insert image description here
insert image description here
insert image description here
insert image description here

Star rating component RatingBar

insert image description here

auto complete text box

insert image description here

AlertDialog

insert image description here

insert image description here
insert image description here

Chapter Six

Intent

insert image description here

The data transmitted by Intent is of simple type, complex data cannot be transmitted

Activity life cycle

insert image description here

What method is called when one state goes to another

insert image description here

The three states of Activity, when each state transitions

insert image description here

insert image description here

The main activity opens the child activity, and the three steps to obtain the return value should be mastered

insert image description here

The characteristics of explicit startup and implicit startup (summarized by yourself)

1. Display and directly write which one you want to start, generally use the data between the activities in the application to start.
2. Implicitly start according to the matching of category data, which is common in starting certain specific actions in the system, such as making a phone call.

insert image description here

How to end the current Activity

finish

//关闭当前activity方法一
    finish();
    
//关闭当前界面方法二
    android.os.Process.killProcess(android.os.Process.myPid());
    
//关闭当前界面方法三
    System.exit(0);
 
//关闭当前界面方法四
    this.onDestroy();

What methods are there in the Service life cycle and when to call them

insert image description here
insert image description here

The difference between the two startup methods

Start: Simple, the service instance cannot be obtained, and the service can only be stopped after obtaining the service. The intermediate state of the service could not be obtained.

BindService

insert image description here

How to use BindService and Notification in the experiment must be mastered. understand thoroughly.

Service
accelerates and decelerates

Example of binding service: rewrite the unbind method, the service satisfies: get the method activity of the instance:,

Service
accelerates and decelerates

BroadcastReceiver

Service
acceleration and deceleration
broadcastinsert image description here

Steps for usage

Static registration Dynamic registration

Steps to use the service

1. Write various inheritance services

2. Register in the manifest file

3. Use start bind

last chapter

Four data storage methods and their characteristics

features

simple file storage

Built-in database:

insert image description here
Code library building, the key method
insert image description here
insert image description here

SQLite CRUD

ContentProvider

insert image description here

Guess you like

Origin blog.csdn.net/m0_46161051/article/details/126515143