Handler principle analysis and use (2). handler Principle
In the principle analysis and use of Handler (I), I introduced a simple and common example of using Handler. Here is an example, of course, different from the previous example, it is also
Android uploads text files to the server through httppost .,
/*** Upload text to the server, such as log * @ param urlstr request url * @ param uploadFile LOG Path */mnt/shell/emulated/0/LOG/log. log * @ param newName log Name LOG. log * @ return
Download Android files, Android
There are not many main code for file download. You can use the native DownloadManage to implement this function:
Add permissions to AndroidManifest the network access permission is required. You need to add the
MyApplication and myapplication in Android
Package liu. basedemo; import android. app. activity; import android. app. application; import java. lang. ref. weakReference; import java. util. stack;/*** MyApplication basic * Created by Liu Nan on 2016/7
BaseActivty and androidbaseactivty in Android
Base Interface
IBaseActivity
Package liu. basedemo. base;/*** base class interface * Created by Liu Nan on 2016/7/28 0028.23: 05 */public interface IBaseActivity {/*** return view layout (used in
Android and Android
overridePendingTransition(R.anim.slide_in_right,R.anim.slide_out_left);
The first parameter is the animation to enter.
The second parameter is the exit animation.
Enter Animation
Slide_in_right.xml
Slide_out_left.xml
Exit
Sessionid and volleysessionid of the Volley framework(Lazy, write brief) customize a Request class public class MyRequest extends Request to store the sessionid @ Overrideprotected Response of the last connection parseNetworkResponse
Add a github Project
Download git installation> https://git-scm.com/downloads
Create a git directory right-click the Directory and select Git Bash Here
Create an identityGit config -- global user. name your github user nameGit config -- global
Android ScrollView monitors two ways to slide to the top and bottom (complete custom control implementation), androidscrollview
The Android ScrollView listener slides to the top and bottom of the page. Although many materials have been posted on the
Android -- ListView pull-down refresh, android -- listview
I sorted out the previously written small projects and refreshed the ListView drop-down list. Although it is small, I still want to remember it .. It is suitable for beginners to
Android development Preference usage, androidpreference
1. Preference is a base class provided by androidSDK from API1. It is used to display the interface to users.2. When Preference is used to display an activity, this activity must inherit the
AlertDialog six creation methods and alertdialog six
AlertDialog six creation methods
To create AlertDialog, follow these steps:
1. Create an AlertDialog. Builder object
2. Call the setTitle method of the Builder object to set the title and setIcon
Android ViewPager: Precautions for setting listening. androidviewpager
First, implements View. OnClickListener
This is because Item is more convenient.
Pay attention to the setting of the listener. If the ID in the onCreate direct findViewById
[Android] exercise style theme custom activity switching animation, androidactivity
I have practiced custom styles and themes, inherited and modified the default styles of the android system, and practiced the xml definition of Fade-in and fade-out
Common attributes of TextView controls in android software development, androidtextviewTextView control text property, set the displayed text textColor: Set the text color textSize: Set the text font size autoLink: Set the text to phone, URL
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