9. Create a rounded corner ImageThe main principle is to use a mask to create a rounded corner box and place the image below:
1. Bitmap myCoolBitmap = ...;
2. int w = myCoolBitmap. getWidth (), h = myCoolBitmap. getHeight ();
3. Bitmap rounder =
1. How to run a single android instance
We all know that the Android platform does not have a task manager, and the internal App maintainer has an Activity history stack to display and destroy windows, startActivity may use the
12. Introduction to timer TimerTask in Android
On the Android platform, you can use the built-in TimerTask class in Java for repeated periodic execution. TimerTask consumes less resources than Thread, besides using the Timer, AlarmManager provided
JNI: Java Native Interface is called locally in JAVA. Why is this technology required? There are two reasons:1. virtual machines running JAVA programs are written in Native language, while virtual machines run on specific platforms. Therefore,
People who use touch-screen mobile phones all have this kind of mistake: When the dial is wrong, the wrong person is called out step by step. At this time, they are busy hanging up. So for the above scenario design, I made such a small exercise,
Previous: http://www.bkjia.com/kf/201202/118919.html
An application using the loader typically contains the following components:
An Activity or Fragment.
An instance of LoaderManager.
A CursorLoader that loads the data supported by ContentProvider.
The unit test of android is very easy to use. It can detect whether your function classes or methods are correct without relying on complicated operations.Unit Test Configuration:
1. The unit test class inherits AndroidTestCase
2. Add
Previous: http://www.bkjia.com/kf/201202/120057.html[Java]Establish unit tests for java projects.Note that the function name of the unit test method must start with test. Otherwise, an error is returned.Import java. io. ByteArrayOutputStream;Import
1. Introduction
Google or Baidu is often used when we access the internet. If we enter the information we want in the input box, other prompts related to it will appear, which is very convenient. In Android, The AutoCompleteTextView implemented by
DT is the Eclipse plug-in used for Android development. The key to ADT's normal use on Eclipse is that their versions must be compatible. Therefore, it is recommended to install the ADT plug-in online. It will automatically find the appropriate
This article describes how to capture the current screen on an Android phone or tablet and save the captured screen to a directory folder in the SDCard. The implementation code is as follows:[Html]/*** Get and save the current screen*/Private void
1. compile environment ConfigurationSource: http://source.android.com/source/initializing.html or google. I configured the usb part as follows: Execute lsusb to view the usb device currently linked to the system: $ Lsusb Bus 005 Device 001: ID
1. Set the compilation option to make-j5 TARGET_ARCH = x86 TARGET_PRODUCT = generic TARGET_SIMULATOR = false TARGET_BUILD_TYPE = release TARGET_ OS = linux LOCAL_PRELINK_MODULE = false.
2. Set line 91 in build/core/envsetup. mk to x86 (this step can
Previous: http://www.bkjia.com/kf/201203/121466.htmlAs shown in the previous Activity, start is the second Activity. I think it is easy to understand the program, but I should give the code first.First look at the list_item.xml file:1 23 4 android:
FillBefore refers to the first frame when the animation ends, and fillAfter refers to the last frame when the animation ends. The most critical issue is that these two parameters cannot be set in , , , . This is useless and must 1) set it in the
You need to write a page with the top unchanged and the following tabs, the content displayed in the middle can be changed, and the ActivityGroup is used for implementation. The jump between pages in the middle is implemented using the following
In essence, the broadcast mechanism of the Android system is a message subscription/publishing mechanism. Therefore, the first step to use this message-driven model is to subscribe to messages. for Android applications, subscribing to a message is
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