Android: theme = "@ Android: style/theme. Dialog" shows an activity as a dialog box.Android: theme = "@ Android: style/theme. notitlebar" Do Not Display Applications Program Title BarAndroid: theme = "@ Android: style/theme. notitlebar. fullscreen"
When I used the switch control in Android today, I found a problem that I couldn't get the desired display effect after running it on some machines.
Run graphical layout of eclipse later. The following error is displayed: Missing styles. Is the
Debugging
1. FirstProgramUpload to the simulator. Suppose we use ADB to push Hello/data/hello to upload the program to the/data directory of the simulator. Make sure that you have the executable permission for hello.
2. Run gdbserver: hello on
I. decompile resource files
1. Download the attachment apktool.rar and decompress it to any directory.
2. Open the command window and run cmd. Go to the extract directory of apktool.
Input: apktool d F: 12apk (command line: the file to be
Java has divided object references into four levels since jdk1.2, so that the program can control the object lifecycle more flexibly. The four levels are from high to low: strong reference, soft reference, weak reference, and virtual reference.
Here
AndroidDisplaymetircsClass to easily obtain the resolution.
Andorid. utilDisplaymetrics under the packageClass provides a general information about the display, such as the display size, resolution, and font.
To obtain displaymetricsFirst,
First, let's talk about how to connect your mobile phone to your computer:
If you have a wireless network router at home, you can directly intervene your mobile phone in the wireless network. If you only have a mobile phone and a laptop, you can
Let's talk about the principle. As you know, android can monitor databases. However, I personally feel that this monitoring is not powerful. No matter how the monitoring is implemented, the final result returned is whether the database has changed
In Android, many permissions are defined for some system-related operations, such as phone calls, text messages, and file writing, to ensure security. To ensure application security and stability, we can customize some permission mechanisms to
In Android, menus can be divided into options menu (generated by the menu key) and context menu (generated by pressing the screen for a long time)
The following is an example;
1, Options menu (generated by the menu key ),
@Overridepublic boolean
1. Call the system music player
private void playAudio(String audioPath){Intent intent = new Intent(); intent.setAction(android.content.Intent.ACTION_VIEW); intent.setDataAndType(Uri.parse(audioPath), "audio/mp3");
It is easy to use in recent projects. The following is a summary:
There are two ways to set the branch standby mode for Android
The first is simply implemented by setting the windowmanager attribute:
Set in activity oncreat () method
Getwindow ().
There are two ways to handle dialog box events:
There are two methods for event listening in the dialog box:
1. Listen to the dialog event;
To listen to the back key event, you only need to implement the dialoginterface. onkeylistener interface.
The
Android applications frequently process images. Especially when a program loads a large number of images and high-resolution images, oom exceptions are most likely to occur. Below are some of my memory loading methods.
Method 1:
public Bitmap
Use broadcast intent to control the built-in music player in Android
Zhengzhiren
Http://blog.csdn.net/ZhengZhiRen/archive/2011/01/13/6134730.aspx
The music player that comes with Android can only be regarded as an application on the system and
Recently, some commonly used buttons have been added to the status bar, including home, menu, and Back buttons,
Simulate messages when the physical button is pressed,
Refer to the following two articles to add custom buttons on the status
Experiment 1: use Java. util. Timer.Create a timer in onstart (), update the counter every 5 seconds, and start. Java code?
12345678
mTimer = newTimer(); mTimer.schedule(newTimerTask() { @Override
1: first create a class of xxprovider, which belongs to extendscontentprovider.
2: In this xxprovider, The databasename and databaseversion of the database to be created are preferred.
3: Create the database authority. It is worth noting that this
This article from: http://android.tgbus.com/
Avoid floating point number
Before the emergence of the Pentium CPU, the game designers did the most integer operations. With the arrival of the Pentium, the floating point computing processor has become
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