ACCESS_FINE_LOCATION permission .Second, Spinner's SetSelection () method, originates from oneself to take for granted pit!!!The drop-down list control in Android spinner has a method setselection (int position) that shows the first few items. This method may not be effective??? Always show the first item???------------------------------------Split Line----------------------------------When doing two spinner
activity or service life cycle functions. The following example shows how to use the instrumentation API to test activity retention and restore state.
//Start The main activity of the//application under Test mactivity = getactivity (); Get a handle to the Activity object ' s//main UI widget, a Spinner Mspinner = (Spinner) mactivity. findviewbyi
D (Com.android.example.spinner.r.id.spinner01);
S
aboutAdding an Easy Share action.Send text content
Figure 1.ScreenshotACTION_SENDIntent chooser on a handset.
The most straightforward and common use ofACTION_SENDAction is sending text content from one activity to another. For example, the built-in browser app can share the URL of the currently-displayed page as text with any application.This is useful for sharing an article or website with friends via email or social networking. Here is the code to
method returns the Eventloopgroup object directly.We looked back at our initial configuration to find out what the group attribute was.We configured two nioeventloopgroup, one thread passed to the parent class abstractbootstrap. An internal property childgroup initialized to the current serverbootstrap.We're back here . channelfuture regfuture = config (). Group (). Register (channel);A Nioeventloopgroup object, the first single-threaded Nioeventloopgroup object We configured, is now returned
not good for you: you need an exact type match, which is the case without any wildcard characters.Here is a mnemonic to help you remember which wildcard type to use:PECS representative: Producer-extends,consumer-super.In other words, if a parameterized type represents a T producer, it is used if it represents a T consumer . In our Stack example, the pushAll parameters of the method are src generated using an instance of the stack E , so src that the appropriate type is the Iterable popAll met
To restrict the file type when writing code for the open file dialog box today, the following methods are provided in the JDK help documentation:
Jfilechooser chooser = new jfilechooser ();// Note: source for examplefilefilter can be found in filechooserdemo,// Under the demo/jfc directory in the JDK.Examplefilefilter filter = new examplefilefilter ();Filter. addextension ("jpg ");Filter. addextension ("GIF ");Filter. setdescription ("JPG GIF images
1. Email Task: You can call the system Email program to send emails.
Before sending the email, you need to set up an email account to send the email. However, the full version is not set. It seems that the email cannot be sent on the simulator, so you can save the settings. This Task can be used only on a real machine.
EmailComposeTask email = new EmailComposeTask ();
Email. Body = "test my email by wp7 emulator ";
Email. Subject = "test ";
Email. To = "aa@hotmail.com ";
Emai. Cc = bb@hotmail.co
/phone");
Startactivityforresult (Intent, 1);
9 Open multiple Apps Select various types of data to return as URIs. The returned URI can be opened using Contentresolver.openinputstream (URI)This feature can be used to select attachments in a messageExamples are as follows:Select a picture and return the URI as CONTENT://MEDIA/EXTERNAL/IMAGES/MEDIA/47Choose a song that returns a URI of CONTENT://MEDIA/EXTERNAL/AUDIO/MEDIA/51[Java]View PlainCopy
Intent Intent = new Intent ();
version. The accepted attribute value of the file selector setting for the input label declaration on the ACCEPTTYPE,H5 page is the line in the top H5 code: (Android 4.1.2) Take version 4.4W (API 20) as an example: /** * Tell the client to open a file chooser. * @param uploadfile A valuecallback to set the URI of the file to upload. * Onreceivevalue must is called to wake up the THREAD.A * @param accepttype The value of the ' accept ' attribu
If the connection is from the client, register the Niosocketchannel with the selector (if the new thread is the new selector)
If it is a normal IO event, it is handled in the worker thread
Thread pool InitializationTake a look at Nioeventloop before introducing Nioeventloopgroup.You can see that Nioeventloop inherits from Singlethreadeventexecutor, is a single-threaded executor that loops through the thread to listen for IO events. The main methods are// 初始化selectorio.netty.channel
I haven't written a blog for a long time. Today I want to share with you a small function that is very practical.
Use Case: Disable all the child controls in the layout so that the interface can only be viewed but not edited. It is very troublesome to set one control, so I thought of a good method. You can expand more controls as needed, as long as you pay attention to the ViewGroup type or View type of the control.
The Code is as follows:
[Java]/*** Traverse the layout and disable all child
Features:1. No image, no external CSS2. No dependency (jQuery supported, but not required)3. configurable height4. Resolution independence5. VML is supported when the earlier version of IE is not supported.6. Use the Key Frame Animation and setTimeout ()7. compatible with various mainstream browsers, including IE68. MIT Authentication
Spin. js dynamically creates a progress bar, which can be replaced by loading GIF images using ajax.
The spin () method initializes the necessary HTML elements a
Scenario
How can we achieve "ajaxStart" in a specific request?
First, the price for rewriting Ajax methods is too high, and jQuery's own Ajax Events can still be used.
Global events triggered by Ajax are transmitted to all DOM nodes like a standard event. Level: jQuery Events> Ajax Events> Custom Ajax Events.
Implementation
Copy codeThe Code is as follows: Wo = window. Wo || {};
Wo. ajax = {
Spinner: $ ([])
, Init: function (){
Var $
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.