Obtain the image size.CodeYou can obtain the image size on the Android platform. The Code is as follows:
1. Display display = getwindowmanager (). getdefadisplay display ();2. log. I ("View", "height:" + display. getheight ());3. log. I ("View",
1. verbosegc generally, Java virtual machines must support the verbosegc option to output detailed garbage collection debugging information. The Dalvik Virtual Machine quietly accepts the verbosegc option and does nothing. The Dalvik virtual
The event types in Android include button events and screen touch events. Touch events are the basic events of screen touch events, so it is necessary to have a deep understanding of them. A simple screen touch action triggers a series of touch
The Network Communication of application software is nothing more than socket and HTTP, where socket can use TCP and UDP. Many methods are derived from HTTP, including basic http get and post requests, then there is the WebService soap.
Among these
·
·
Today, we will categorize how to call common functions:
Display webpage:Uri uri = URI. parse ("http://www.google.com ");Intent it = new intent (intent. action_view, Uri );Startactivity (it );Display map:Uri uri = URI. parse ("Geo: 38.899533,-77.0
Android gallery 3D effect
After reading coverflow on iOS, I felt that the effect was really good. I wanted to implement a program on Android. This program references this core code on the Internet, of course, I have added some other things. If you
Use threads to process long-time "Businesses"
There are several methods:
1) activity. runonuithread (runnable)
2) view. Post (runnable); view. postdelay (runnable, long)
3) Handler
4) asynctask
Android is a single-threaded model, which means that
A few days ago, the project team had a technical problem and wanted to use the method of loading HTML locally and writing cookies by JS.
There is no problem with the idea, but during the test, we found that every time we re-open the app, we couldn't
Note: The following example shows some pieces of mydictionary, which also covers reading and writing files.
1. Statement
private AutoCompleteTextView mytext;
2. Call
Mytext = (autocompletetextview) findviewbyid (R. id. edit); mytext. setthreshold (1
Socket programming 1. Basic Introduction
Socket"
Socket is also known as "socket". It is used to describe IP addresses and ports and is a communication chain handle.
Applications usually send requests to or respond to network requirements through
InAndroid Local Video Player Development-search for local videos (1)In this chapter, we dynamically implement the obtained data through listview.
1. first introduce the layout code. The main layout Code only contains one listview -- jie_video.xml
2.
1. What is service?
The service can be used in multiple applications. For example, when the user starts other activities during multimedia playback, the program must continue playing the video in the background, for example, detecting file changes
1. hold_learningitem.xml
In the preceding layout, several controls in framelayout are added, and Android: clickle = "true" is added to imageview to shield webview click functions.
After the previous Android gallery and gridview methods and imageswitcher implementation of two image browsers with preview and slide methods, I accidentally saw some introduction to gallery.I learned about the 3D effect example and now I will write
Sharedpreferences is a lightweight storage class on the Android platform. It mainly stores some common configurations, such as window status. Generally, reload the window status onsaveinstancestate in the activity and save it using sharedpreferences,
For example, it is clear at a glance
1. Start a thread
// Enable a thread to update data once per second. Public class timethread extends thread {@ overridepublic void run () {do {try {thread. sleep (1000); message MSG = new message (); MSG.
Previously, I tried to decode the video and then play the video. Although all the audio and video can be played, I cannot synchronize the audio and video. Therefore, I used a third-party video library vitamio to implement the video player function,
When reading oplayer, You can see Sliding letters to search for listview content. Therefore, the core function deduction is used as a demo, which is divided into two parts: layout, the other is the code, which is as follows:
Layout:
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