In the android project, you only need to perform the unit test in the following three aspects:
1. Configure the following in the project list file:
2. The test class inherits the Android. Test. androidtestcase class.
In Android development, the biggest headache is multi-screen adaptation of images. Of course, we can add an image for each screen, but that will increase the size of the app.
Especially if both portrait and landscape screens are supported, they
it is very simple. We only need to enable auto-start upon startup. Android auto-start may be the simplest in the mobile operating system. We only need to listen to a broadcast (broadcast) started upon startup. First, write a receiver (that is, a
(1) The first is the implementation of transparent interfaces.
You can modify attributes in XML for transparent interface implementation.First, add androidmanifest. xml
JavaCode:Android: Label = "@ string/app_name"Android: theme = "@
1. compile a class that inherits application public class appclose extends application {private list mainactivity = new arraylist (); public list mainactivity () {return mainactivity ;} public void addactivity (Activity Act) {mainactivity. add
Text message sending. Some models can send text messages to specified mobile phones in the background without prompting them. Some models may remind users to decide whether to send messages or not, I think this is for security reasons.
To send a
Bytes ~
Android. Support. v4.viewpager class in API
The 4 + support package is initially provided for us. It enables us to slide left and right to display data in the form of a 'page. We can inherit
PagerAdapterTo generate a page view. Let's take a
Because the space of the seekbar and ratingbar controls is relatively simple, code is directly pasted here.
Use of seekbar:
Content of the Main. xml file:
Android: Orientation = "vertical"Android: layout_width = "fill_parent"Android: layout_height =
Before using tabhost, let's take a simple look at its source code.
Main variables include:
Private tabwidget mtabwidget;
Private framelayout mtabcontent;
Private list mtabspecs = new arraylist (2 );
That is to say, our tabhost must have these three
1. Install JDK.
Ubuntu11.04 does not own JDK source, so you cannot install it directly through sudo apt-Get install sun-java6-jdk
(1) first, you need to add the Java SDK source, which can be implemented through the following command:
Sudo
You must know: 1. Know that R. Java under gen is do not modify. (unchangeable !)
2. For each control in Main. XML, if an ID address is added to the control, the unique ID will be added to R. java.
3. added the control to main. xml. to display the
1. If the display area of skin is too large, the keyboard may be incomplete, causing inconvenience
The simulator also reports a warning: emulator window was out of view and was recentred
We can solve this problem through the-scale option. It is okay
You are welcome to reprint it, but please keep the source. Http://blog.csdn.net/notice520
I haven't updated my blog for a long time. I want to write something with pure brightness.
Today, let's talk about how to use the tools provided in Android
In Android, The onclick of a view is independent. That is, after a view processes The onclick, the message is not transmitted to the onclick of the parent view. If it is not processed, the message is not transmitted! Onitemclick is not even called
public static Bitmap createReflectedImage(Bitmap originalImage) { final int reflectionGap = 4; int width = originalImage.getWidth(); int height = originalImage.getHeight(); Matrix matrix = new Matrix(); matrix.preScale(1, -1);
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