Today, I encountered a very strange problem. The Android project I wrote was correct. After opening eclipse this time, there was a big red cross on the project:
View DetailsProgram, No errors, only a few warnings.
Open Window-show view-problems,
The new version often gets stuck when it comes to smart prompts. There are many ways to solve this problem, but many do not work. Today we finally solved the problem:
Http://www.cnblogs.com/zenghanxi/archive/2010/08/13/1799229.html
The
Basic sharing methods:
Intent intent = new intent (intent. action_send); // starts the sharing and sending attributes.
Intent. settype ("text/plain"); // share the data type sent
Intent. setpackage (packagename );
Intent. putextra (intent.
1. What is XMPP?
Extensible messaging and presence protocol, in simple terms, is a protocol for sending and receiving and processing messages, but the messages sent by this Protocol are neither binary nor strings, but XML.2. What is Im?
Instant
Create an asyncloadedimage class that inherits the asynctask asynchronous loading class and call the publishprogress method to update onprogressupdate to store the thumbnail information to the adapter. Listener adapter change to asynchronously load
See examples of Android photo taking, video recording, and Recording Code
Public class mycameraactivity extends activity {/** called when the activity is first created. * // @ override public void oncreate (bundle savedinstancestate) {super.
Layout File
Layout effect:
Obviously, this does not meet our expectations. The following example uses Android: stretchcolumns to automatically stretch
Here we simply add an attribute Android: stretchcolumns = "*" to tablelayout, indicating that
Code and example:First, add the following content to the manifest file:
To allow the program to obtain the permission to use the camera and auto focus function.
Cameratestactivity. Java
Import Android. App. activity;Import Android. OS. Bundle;Import
Using listview and arrayadapter layout is the simplest of listview layout. First, we will create a component to display data, such as main. xml
The activity code is as follows:
Package cn.com. android. GRID; import android. app.
Simpleadapter, as a dataset, mainly fills the listview and gridview containers with data and summarizes several filling methods. The principle is very simple. You can directly look at the code and
1. Single Row display of listview(Simple_list_item_1
ViewfilpperIt is a view container class officially provided by Android. It inherits from the viewanimator class and is used for page switching. You can also set the time interval for automatic playback.Viewanimator inherits framelayout, So multiple
Gallery is a view container class officially provided by Android. It inherits from the absspinner class and is used to achieve page slide effect.
From the inheritance relationship above, we can see that the absspinner class inherits from
The Android system comes with two controls: the gridview and the gallery, which are displayed on the gridview mesh and browsed by gallery. The two controls can be combined to truly achieve the gallery browsing image effect.
In this example, two
Easy to understand:MarginIs the outer border,BorderBorder,PaddingIs the inner border.
If the distance between the top, bottom, and left is different, you can set it using the following attributes.
Margin:
Android: layout_margintopandroid:
1.SharedpreferencesIntroduction
To save software configuration parameters, the Android platform provides a sharedpreferences class, which is a lightweight storage class and is especially suitable for saving software configuration parameters. Use
The so-called no picture, no truth, first look:
The Java code is as follows:
Package YC. Android. fonts;Import Android. App. activity;Import Android. Graphics. typeface;Import Android. OS. Bundle;Import Android. widget. textview;Public class
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