original, if you need to repost, please indicate the author and source. Thank you!
AndroidThis word has dominated our eyes for a while. Before thatAndroidNo one will be connected to the mobile Internet andGoogleThese two hot words are linked. However, sinceGoogleLaunch your own mobile operating systemAndroidSince,Android,GoogleAnd mobile Internet.10Years agoWindows, Microsoft andPCLike the operating system, it has become the most eye-catching combination today.
Speaking Android It does not cause any ambiguity at all. She is Google The most proud mobile operating system. Although Android It is not the first operating system of a smartphone. Of course, it is not the last operating system of a smartphone. But she was born less than two years ago to become a mobile operating system that is expected to surpass everything. Even in the United States 2010 Year 2 Quarterly Android Mobile phone sales have exceeded what is regarded as the king of sales IPhone . It has become the fastest growing sales system today. Of course, AndroidIn addition to being famous Android Free Open Source. Free for anyone and any organization Android Instead of paying Google A penny. Thanks to these benefits Android More and more mobile phone manufacturers. Even the lianfa branch, known as the "King of shanzhai", is being developed and supported. Android Chip, if successful, Android Mobile phone prices are expected to fall 1000 Less than RMB, if most AndroidIf the mobile phone is really at this price, it will become Android Another killer.
Android In addition to its objective advantages Android A major factor in success. When I write this article, Android The latest version 2.2 . After trial, feel For Android 2.2 The browser speed is greatly improved compared with the previous version. , Android 2.2 The world's fastest mobile browser . In For Android 2.2 Added a new Just-in-time (JIT) Technology, used in For Android 2.2 Running inProgramIs faster than the previous version. 2.5 Times.
Android The increase in browser speed will also provide more choices for our applications. . Traditional Android Application UI All AndroidComponent. With a faster browser PC Fields are surging Ajax It can be combined with a mobile browser to show users more beautiful interfaces. Start Ajax , May engage in Web Developers are not unfamiliar. In recent years, many popular Ajax Framework. Where EXT JS Is the best among them. EXT JS Mainly used for design Web Interface, which is widely used Javascript And EXT JS Technology, but it is easy to use. For example, EXT JS It is easy to simulate Windows XP Of course, this interface is based on Web . In "Everyone has fun: Ext js + Android + SSH Integrated Development Web And mobile SNS In the book EXT JSTechnical Implementation SNS System, the interface is imitated Windows XP See figure 1 .
ApparentlyEXT JSOfWebPrograms are better than traditionalWebThe program is much more brilliant. SincePCYes. Why not use a cell phone? After the author's test,EXT JSYou can alsoAndroidEmbedded in the mobile browser, let's take a look2As shown in.
If the reader of this article is a developer, you need to use Android SDK webview components to display what we need. Play fun for everyone: ext JS + Android + SSH integrated development Web and mobile SNS version SNS , A Android -based SNS . In Android version SNS , using webview component to display the content in HTML Format returned by the server. Of course, if the reader can also embed Ajax , ext JS and other advanced features.
AndroidOfWebviewAlthough powerful, it often depends onAndroidComponent. The general usage of these components is unnecessary here, and there are many interesting usage methods in these components. For exampleQq For androidDevelopers may find that when entering a chat record, you can directly put the emoticon imageEdittextComponent (3). It may be difficult for many beginners to implement this function, but it is actually easier to implement this function.
We generally use Edittext Of Settext Method To Set Edittext For exampleCodeDirection Edittext Added a string.
Edittext = (Edittext) findbyview (R. Id. edittext );
Edittext. settext ("Test Data ");
you can insert the image to edittext . If you have read Android/ophone development handouts, in many cases, text tags (similar to HTML are used in the book, but it only contains limited HTML language functions ). There is a tag in these tags. With this tag, you can easily insert an image into edittext . However, the use of tag is one more step than the use of other tags, this is to implement an imagegetter interface through which, you can obtain a drawable object. Let's take a look at the following code:
imagegetter = New imagegetter ()
{
@ Override
Public Drawable getdrawable (string source)
{
Int ID = Integer. parseint (source );
Drawable d = Getresources (). getdrawable (ID );
D
. Setbounds ( 0 , 0 , D. getintrinsicwidth (), d
. Getintrinsicheight ());
Return D;
}
};
The above code passes throughImagegetterInterfaceGetdrawableMethod returnsDrawableObject, whereSourceThe parameter value isLabelSRCAttribute Value. We need to use the following codeLabel.
Edittext. append (html. fromhtml ("
+ Faces [new random (). nextint (6)] + "'/>", imagegetter, null ));
Where Faces Is Int Type array, saving the corresponding Drawable Resource ID Value. In use Use Html. fromhtml Method To encapsulate these labels. Label. Fromhtml Method 2 Parameter (s) specified Imagegetter Object Label SRCAttribute to obtain the corresponding Drawable Object. Pass Edittext. append Insert Method The system automatically The label is converted to the corresponding image and displayed in Edittext . Let's take a look at our results ( 4 ).
This article shows you howAndroidIn,EXT JS,EdittextThe text-and-text hybrid sorting function is also available to readers.AndroidIn the colorful world. ActuallyAndroidMore than that. The rest will be left for readers to explore.