1. Obtain the system SKD version: Build. version. SDK 2.Obtain the wallpaper. The returned value is drawable.: Drawable = getwallpaper (); 3. Get the IP address of the mobile phone: Public String getlocalipaddress () {try {for (enumeration en =
[Works only on Android 2.1]
1. The component which will be added to the main UI is decidedVendor/androidproducts. mk(Take Atmel product as a Referrence: This file namedGeneric. mkLocatedVendor/Atmel/sam9m10).
If you want to add other
The Android-4.0.1_r1 source code is released.
The following briefly describes how to compile a Android-4.0.1_r1
1. GetSource code
# Mkdir mirror-googlesource
# CD Mirror-googlesource
# Repo init -- mirror-u
In the Android software design interface, there are too many textview texts and incomplete display. What should I do? We can add a scroll bar for textview.
Android: Id = "@ + ID/bus_detail_content"Android: layout_width = "fill_parent"Android:
1. Add attributes to the tag in the configuration file of androidmanifest. xml:
Android: theme = "@ Android: style/theme. notitlebar. fullscreen"
2. Add the following two statements between the methods super () and setcontentview () in the
In many cases, Google adopts a large number of MVC Architecture methods when designing Android, so thatCode, Artist and specific logic developers are independent. How to format strings in the resource file values/strings. xml of Android? Here,
Similar to the mutual pass-through value in an activity
Here I use intent and it doesn't use broadcast, because the test data volume is small, it's not needed.
How to start the service? You can use startservice (intent) in the activity. Similarly,
I made a mistake these days.
Other tools are not updated synchronously when ADT is updated.
When installing the APK to the simulator, It is stuck in installing xx.apk, And the simulator has never responded.
At first I thought it was a simulator
An error occurs after the official package is installed.
It takes more than 74 minutes to compile each time,
Prompt information
Host sharedlib: lib64egl_translators (Out/host/linux-x86/obj/lib/lib64egl_translator.so)/Usr/bin/ld: cannot
In actual work, it is often necessary to change the color, style, and background image of some controls based on the artist's design, the following describes how to customize the background color, progress bar color, and slider image in
1. Create the layout file activity_broadcast.xml
2. Create an activity
Public class broadcastactivity extends activity {// set to com. china. UI. new_lifeform, one more message "received broadcast information" before the content is displayed; //
Android allows us to define our own contentprovider object to share data, practice hands, and implement it simply.
To use contentprovider to operate data, you must have a place to store data. You can use a file or SQLite database to save data,
This class is mainly used to query and determine network connection information.
ConnectivityManager cm = (ConnectivityManager) getSystemService(CONNECTIVITY_SERVICE);
Networkinfo getactivenetworkinfo () obtains the network information currently
Global timer alarmmanager
Note the following three points when writing the changewallpaperservice class:
To obtain image resources through inputstream, you need to put the image file in the Res/raw directory instead of the res/drawable directory.
In
Edittext inheritance relationship: View --> textview --> edittext.
Edittext has many attributes. Here we will introduce several attributes:
Android: layout_gravity = "center_vertical"Set the display position of the control: Top by default, which is
Alertdialog dialog = builder. settitle ("message List "). setview (layout ). create (); dialog. show (); // set the size of the window. getwindow (). setlayout (300,200 );
Dialog. Show (); Be sure to put it in front of dialog. getwindow ().
The latest custom work on Android 4.1 has happened to be faced with the problem of setting a third-party dynamic wallpaper as the default start wallpaper. Take the following notes.
The file to be modified is:
Find the following in
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