Address: http://blog.csdn.net/you_and_me12/article/details/7262915
Edit (scale down, graffiti, etc.) the image and save it as an image of the specified format and size.
Post Code first:
Bitmap bmp = Bitmap.createBitmap(480, 800,
Set transparency (this is the transparency of the form itself, not the background) 1 windowmanager. layoutparams Lp = getwindow (). getattributes (); 2 LP. alpha = 0.3f; 3 getwindow (). setattributes (LP); Alpha is between 0.0f and 1.0f. 1.0 is
AndroidLayoutLinearlayout(Linear layout)
Linear layout is relatively simple and easy to understand. Let's take a look at the following code:
XML layout File
Android: Orientation = "vertical" Android: layout_width = "fill_parent" Android:
1. In this example, we will focus on the Internet network access methods and image display problems provided by the Android platform.Create the base of the entire project according to the following configuration and the method described in
The solution for adjusting screen brightness is as follows:
1. You can obtain the windowmanager. layoutparams attribute of the current activity and set its screenbrightness value;
ScreenbrightnessThe value range is [0, 1]. You can perform the
Here, I will record the problems I encountered when developing cocos2dx for Android. Maybe many people are as confused as I am, but I can record a little bit, I hope to make it into a series to help everyone. Of course, I still helped myself at the
1. Install ndk and ADT
Ndk is used to compile C ++ code, while ADT is used to compile Java code and generate an APK package.
Although ndk can be run through cywin in windows, the command line parameter is too long (when there are many files ).
In Android, you can customize classes and inherit from container classes such as viewgroup to display the layout you need.
If you add a control to viewgroup but it cannot be displayed, the following example can be used for reference.
(Mainly
To develop a network-based application on the Android platform, you must determine the current network connection status. The following code, as an example, describes in detail how to judge the current network situation.
First, let's look at a
Android has its own player. We can use the implicit intent to call it: specify data as the URI object of the audio to be played by inputting an action as action_view and specify the format information, then we can call the player to play the
Currently, shared functions are often available in both applications and games. Sharing not only shares text, but also shares the screen of an application or game so that images and texts can be combined to attract more users.
To share images,
1. Basic Concepts
Intent indicates the intention. Pending indicates the upcoming or coming thing.The pendingintent class is used to handle upcoming events. For example, in Notification, it is used to jump to a page, but not to jump to the page
The tabhost tab is often used in Android applications. Here, we will show you how to use the tabhost tab in the apidemo example ,,,There are three common methods:1. Create each tab page from a layout ID
public class Tabs1 extends TabActivity {
My environment: XP
1. Install simulators. There are a lot of online devices, so I won't be so embarrassed.2. Create a simulator named android2.2. Memory card 512 mClose after startup.3. Give the simulator root permission.Su and superuser.apk
Bitmapfactory. Options: http://developer.android.com/reference/android/graphics/bitmapfactory.options.html;
The related information is as follows:
This table is extracted from the android SDK documentation. After a brief look, you can see what it
This topic describes services. There are two articles:
Basic knowledge of Android 05: Service 01 of four components
Android basic knowledge 05: four major components-service 02: Remote Call
Android basic knowledge 05: four major components-service 03
In the previous article, I explained why reflection is not easy to use.Com. Android. InternalThe internal API of the package and the hidden API marked as @ hide, because android. the jar file does not contain internal APIs or hidden APIs, so that
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