1. Basic settings1.1 AndroidManifest. xml settingsAdd sub-elements to
Android: anyDensity = "true": When an application is installed on a terminal of different density, the program loads Resources in the xxhdpi, xhdpi, hdpi, mdpi, and ldpi
Problem: The ListView is nested in ScrollView. The ListView displays only one more row.
Bytes --------------------------------------------------------------------------------------------------
Solution: I have posted the core code here.
Publicclass
When debugging a program, parameter output is helpful for us to know whether the entire program operates according to our own logic.
There are many methods for outputting information in the java program on the Android platform on the console:
1.
GL_NEAREST and GL_LINEAR
The former indicates "using the color of the pixel closest to the coordinate in the texture as the pixel color to be drawn ",
The latter indicates that "the pixel colors to be drawn are obtained using the weighted average
I. Basic Knowledge:
Id = "@ + id/edtInput", which is a bridge between the UI and codeLayout_width = "fill_parent", automatically filled to the screen widthLayout_width = "wrap_content", automatically filled into the control size Controls in
Android applications can be installed on local built-in storage, or on External Storage (SD card ). After API 8, that is, Android2.2, we can install APK on external storage. This is an optional feature that can be configured in the manifest file of
Android starts MediaScannerService to scan multimedia files in the system, and then adds the information of these multimedia files to the multimedia database, the application obtains the multimedia information from the multimedia database instead of
For instance, if you build a social app that can share messages or photos with the user's friends, it's in your best interest to support the ACTION_SEND intent so users can initiate a "share" action from another app and launch your app to perform
Use Density-independent PixelsOne common pitfall you must avoid when designing your layouts is using absolute pixels to define distances or sizes. defining layout dimensions with pixels is a problem because different screens have different pixel
I. Main Ideas
1. Use the GridView control to display the following information to implement screen lock thumbnail preview.
2. Read lock screen data from the settings. db database of the Data System
3. Use Image merging to display the Image Selection
In the previous project, we needed to decode the h264 video, use ffmpeg, and decode yuv. The best display method is to display the video through opengl es 2.0, if opengl es 2.0 is not used, yuv2rgb must be used to draw the image. I only know two
The simplest way to monitor device state changes is to create a BroadcastReceiver for each state you're monitoring and register each of them in your application manifest. then within each of these receivers you simply reschedule your recurring
When you're altering the frequency of your background updates to reduce the effect of those updates on battery life, checking the current battery level and charging state is a good place to start.The battery-life impact of parameter Ming
A piece of code is used in the project. The code can be found online to effectively retrieve the height of the status bar and record the memo.
[Java]/*** Get the Status Bar Height** @ Return*/Public int getStatusBarHeight (){Class C = null;Object
Permission:
...
Video:
Private void dispatchTakeVideoIntent (){Intent takeVideoIntent = new Intent (MediaStore. ACTION_VIDEO_CAPTURE );StartActivityForResult (takeVideoIntent, ACTION_TAKE_VIDEO );}
Check whether the video can be processed:
Public
The SearchView and action bar are only available on Android 3.0 and later. to support older platforms, you can fall back to the search dialog. the search dialog is a system provided UI that overlays on top of your application when invoked.
Recently, due to the security of some projects, you need to encrypt the database. The first thought is to encrypt the database through AES and then decrypt the database at runtime. The other is to encrypt the content in the database.
Soon these two
In android, to accept broadcast information, we have to implement this broadcast receiver. We can inherit BroadcastReceiver to have a broadcast receiver. There is not enough receiver. We have to rewrite the onReceiver method in BroadcastReceiver,
Problem description:
When the View. invalidate () method is called, the View is requested to re-draw (). However, I have read the invalidate () and related methods, and there is no direct relationship with draw. How does invalidate () redraw a View?
In the previous article, Android boot broadcast uses the Android boot function. However, Android 4.0 sometimes receives boot broadcast, but sometimes does not. After analysis, it is found that if the application has never been enabled during
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service