Fragment, androidfragment
Fragment is lightweight and faster than Activity. It is suitable for page jumps in the same APP.
1: Enable a fragment in MainActivity:
public class MainActivity extends AppCompatActivity implements
Android implements image Flash Animation and Android image Flash Animation
When you use an APP, some apps will have a small microphone after you click the voice search interface. The microphone will flash like a radar, it means you are listening to
Android's first knowledge of AnimationDrawable, animationdrawable
Drawable animation can load Drawable resources to implement frame animation. AnimationDrawable is the basic class for implementing Drawable animations.
Here, we use AnimationDrawable
Android ProgressBar preliminary application, androidprogressbar
Here, you can use ProgressBar to instantly display the download progress.
Problems encountered on the way:
1. URLs cannot be opened in the main thread, and Toast can only be used in the
GetFragmentManager () and getSupportFragmentManager (), getfragmentmanager
Fragment is indispensable in Android development. Currently in practical use, there are v-4 package support Fragment and Fragment under the app package, the two packages of
CircleImageView and Cardview, circleimageview
Effect:
Circular portraits are common in our daily apps, because they are more beautiful.
Using a circular image, we may crop the image into a circular image and then use it in the app,
The custom
It is implicitly started to determine whether a matching Intent exists and to determine whether a matching intent exists.
1. resolveActivity of PackageManager
Public abstract ResolveInfo resolveActivity (Intent intent, int flags );
Fragment works with RadioGroup to implement click switching layout. fragmentradiogroup
Here we use
compile 'com.jakewharton:butterknife:7.0.1'compile 'org.greenrobot:eventbus:3.0.0'
MainActivity Layout
Main Code
Private void
AsyncTask and androidasynctask for Android LearningWe have mentioned in "Handler message passing mechanism of Android learning" (http://www.cnblogs.com/zhouhb/p/5812447.html), Android only allows the UI thread to modify the UI components in the
SingleInstance and singleinstance modes in Activity Startup Mode
Finally, in the last startup mode, an activity specified as singleInstance mode will enable a new return stack to manage this activity (if the singleTask mode specifies different
(Go to) [original] Android custom View password box example, androidviewCompliance rules
Expose all attributes or behaviors that affect the visible appearance in your view.
Add and set styles using XML
Controls the appearance and behavior of
SingleTop and activitysingletop in Activity Startup Mode
When the Startup Mode of the activity is specified as singleTop, if it is found that the stack top of the returned stack is already the activity during the startup activity, it is considered
SingleTask and activitysingletask in Activity Startup Mode
For SingleTop mode, even if an active instance exists in the stack, the system still creates the activity if it is not at the top of the stack. If you set the startup mode to SingleTask mode,
Android listens to ScrollView slide, androidscrollview
We need to monitor the slide of the ScroView, such as the sliding distance, whether to slide to the top or bottom of the layout. Unfortunately, the SDK does not have the corresponding method,
An example of how to implement the elastic sliding of a View.
Elastic sliding Principle
A large slide is not a few small slides and completed within a period of time. Better User Experience
There are many implementation methods, including Scroller,
Title Bar transparency changes, title bar transparency
How does one monitor the slide of A ScrollView?
@ Override public void onScrollChanged (ObservableScrollView observableScrollView, int x, int y, int oldx, int oldy) {Log. d (TAG,
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