We need to get a snapshot of the picture when we need to take a snapshot of the picture when we do the photo album and upload the related application.
Android has a bitmapfactory class that can handle this kind of requirement.
The following steps
Starting with the menu key, the following 3 methods are involved:
1, Oncreateoptionsmenu (Menu menu)2, Onprepareoptionsmenu (Menu menu)3, onoptionsitemselected (MenuItem Item)
Method Name Trigger TimeOncreateoptionsmenu The first time the menu
Activity A and B
A Get Data Activity B returns the activity of the data
Click on the button on a, show the contact list in B on the textview of a and use the selected data to Baseadapter
1: In the main configuration file to declare bactivity and
Use ScrollView to achieve, the effect will be much better
Copy Code code as follows:
Android:id= "@+id/scrollview1"
Android:layout_width= "Match_parent"
android:layout_height= "150DP"
Android:fadingedge= "Vertical"
android:scrollbars= "
Similarly, in order to prevent users from sending malicious frequent activation codes, the application needs to send the activation code time interval to limit, then need to use the countdown, probably the process is this: the page initialization,
TextView is often used to display plain text, but sometimes you need to make style, event-related settings for some of the text. Android system through the Spannablestring class to the specified text related processing, the actual application of
Copy Code code as follows:
/**
* Get and save screenshots of the current screen
*/
private void Getandsavecurrentimage ()
{
1. Building Bitmap
WindowManager WindowManager = Getwindowmanager ();
Display display =
The HelloWorld directory structure is:
src: The logical code that holds the application, and the code is written manually.Gen: Store resource code, where the code is generated automaticallyAssets: storage mp3 and other video resourcesbin:
I was in the development of the time encountered such a demand, that is, in the ListView slide, need to the top of the column from transparent slowly to become opaque state, is the following effect
The first time to think very simple, nothing
Copy Code code as follows:
public class Readbitmap {
public void ReadByte (context C, String name, int indexint) {
Byte[] B = null;
int[] Intarrat = C.getresources (). Getintarray (Indexint);
try {
Assetmanager am = null;
am =
1.android use WebView to invoke the JS code on the Web page.Android can be achieved through webview and JS interaction, in the program calls JS code, just want to webview control of the support JS property set to True, and then through the Loadurl
The return result is stored in mapdirection, Mapdirection contains the details of the path, including each step of the path, length, time, direction, and so on.
Java code:
Copy Code code as follows:
Packageeoe.demo;
Simple to do a little note, save later forget ~ ~
1, EmulatorThe simulator is actually an ARM environment simulator based on QEMU, whose source code is in External/qemu, and the compiled directory is/host/linux-x86.Export
Run the effect chart firstFirst of all, we want to put a picture of their favorite into the SDcard, in short, as long as we can get the picture on it.
I am here in the sdcard, you can use mouse click to import in Eclipse, more convenient, can also
Viewflipper and Viewpager are very similar, are a view container. You can add more than one view inside, but Viewpager can toggle view by sliding left and right, while Viewflipper does not have this function, so it is necessary to listen for
Today is the tabhost combined with Viewpager to achieve the home page at the bottom of the effect of navigation, although there are many such a demo online, but, I still have to write their own practice to send out, yes! is so willful;
First on the
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