In versions earlier than 2.1, there is only one drawable. In version 2.1, there are three types: drawable-mdpi, drawable-ldpi, and drawable-hdpi. These three types are mainly used to support multi-resolution.
Differences between drawable-hdpi,
This article is original. If you need to reprint it, please indicate the author and the source. Thank you!
Download Sina Weibo Client
This client is version 0.9. Being improved. The current functions mainly include browsing Weibo (home page) of
In Android, there are two ways to take photos. One is to call the camera that comes with the system and then use the photo data it returns. Another method is to use the camera class and other related classes to implement camera functions. This
*/Simulate a callProgramWhat do we need?
1. Draw the android UI
2. The interface is equipped
In our design on the UI, we found that there are two string strings, one text box and one button.
First add two strings to the res-values-strings.xml
In AndroidProgramIn addition, you can also start the program from the command line, using the command line tool AM.
The start method is
Wangwei @ wwg41d3 :~ $ ADB Shell$ Su
# Am start-N {package name}/{package name}. {activity name}
The
Android horizontal and vertical screens have two problems to solve:
I. layout problems
Ii. Reload
1. layout Problem: if you do not want to allow the software to switch between the horizontal and vertical screens, the simplest way is in the
Android is based on Java, and Java decompilation tools are powerful, so it applies to normal APK applications.ProgramIt can basically achieve 100% decompilation and restoration.
Therefore, if developers do not prepare their own open-source
After a hard time and a busy afternoon, I finally figured out how to embed advertisements on the Android software interface. Below I will take the embedded rice advertisement as an example to summarize:
Step 1 download the meter ad SDK and import
Today I learned how to create and delete shortcuts. We can create shortcuts in two ways.
(1 ):Use an activity and click menu> Add> select shortcut> select created application on the home page.ProgramShortcutSee the following results:
The
Re-installation failed due to different application signatures.
You must perform a full uninstall of the application. Warning: This will remove the Application Data!
Please execute 'adb uninstall com. example. Android. APIs 'in a shell.
[From]: http://iaiai.iteye.com/blog/1102958
To set border rounded corners, you can define an XML file in the drawable-mdpi directory: Java
Code
"1.0"Encoding ="UTF-8"?>
Http://schemas.android.com/apk/res/android">
"#000000"/>
From: ddms view threads status
SometimesProgramRunning deadlocks or freezing of semaphores is a tough issue.CodeIt is difficult to analyze and locate the problem. At this time, you can use ddms to view the running status of threads.
Connect the
The tabactivity class has expired.
To use tab, you can directly inherit the activity, but you must modify it accordingly.
Tabhost = gettabhost (); changed
Tabhost = (tabhost) findviewbyid (Android. R. Id. tabhost );
Add
Basics of listview and adapter
Working principle:
For each item in the list, listview requires the adapter to "give me a view" (getview ).
A New View is returned and displayed.
What if we want to display hundreds of millions of
The 4.0 project that has been compiled and updated recently has been compiled well before. The following error occurs today:
Target sharedlib: libwebcore (Out/Target/product/xxxx/obj/shared_libraries/libwebcore_intermediates/linked/Libwebcore. So)
If you want to bring up an alertdialog, write the followingCode
Alertdialog. Builder Alert = new alertdialog. Builder (this); alert. settitle ("warning"); alert. setmessage ("wrong time! "); Alert. Show ();
The prototype of the constructor
1. The test class must be extends androidtestcase.
2. the test method must start with test and throw an exception.
3. Create a new class to be tested in the test method, and then test its function.
(Often usedAssert. assertequals (A, B );)
The edittext control in the editing box of Android is often used in normal programming. Sometimes, some restrictions are added to the editing box. For example, you can only enter numbers and the maximum number of input texts, you cannot enter
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