[Android] mobile guard swipe to switch the screen, android gesture
Define a gesture identification device
Get the GestureDetector object of the gesture identification device, and use the new GestureDetector (context, listener), parameter: context,
My android learning experience 13 and android learning experience 13
Use of the ToggleButton Control
The ToggleButton control can be identified by its name as a "Switch" control, that is, there are two buttons in different States.
There are three
Multiple select button (CheckBox), multiple select button checkbox
Today we will introduce the Checkbox multi-choice box:
1. Activity
// Check box, [basic control] --- status switch control CompoundButton and its subclass CheckBox, RadioButton,
Keep the current position of the listview.
Keep the position of the listview slide. It is generally used to add comments in the listview sub-item layout or exit the current activity.
Use ListView. getFirstVisiblePosition () to obtain the position
Length units in Android
1. Introduce dp and sp.
Dp is dip. This is basically similar to sp. You can use dp or sp to specify attributes such as length and height. If you set the font, you need to use sp.
Dp is not related to density. sp is not
Android View system (9) custom ViewPreface
After learning the above articles, let's talk about the custom View. The custom View has always been regarded as a master skill, because there are too many situations, and the effect is changeable, but it
Android-using Java code to implement property AnimationAndroid-using Java code to implement property Animation
In addition to defining xml files to set animations, you can also use java code to control animations.Example:
Layout file:
Shortcut Keys for Android StudioAlt + press enter to import the package, automatically correctedCtrl + N lookup classCtrl + Shift + N search for filesCtrl + Alt + L format the codeCtrl + Alt + O optimized imported classes and packagesAlt + Insert
Android touch event (3)-use an instance of the touch event classDirectory Overview
This article mainly introducesAbsTouchEventHandle(Custom touch event processing class) andTouchUtils(Touch event auxiliary tool class) How to Use together.The purpose
My android learning experience 9 and android learning experience 9
Add a background image to the android activity
1.you can download images of Android on the Internet or create images in the png format. (Note that the image size should be suitable
Android rotation page + TabHost instance, androidtabhost
Final effect display:
First, we need a ViewPager control, but we can find that this control is not in the Control List on the left.
Now we need to go to the upgrade package to view
Android rotation control and android rotation control
First, control rotation
1. Create a Master Layout
1. The control used is TextSwitcher (Text rotation)
Then the other corresponding ones are ImageSwitcher (image rotation)1 11 12 17 18 19 20
The CheckBox of ListView is selected/unselected, listviewcheckbox
Define a HashMap list in the Adapter class to save whether each row is selected:
private static HashMap isSelected;
The HashMap list named isSelected is defined, and its getter and
My android learning experience 4 and android learning experience 4
List common Department controls
Today, we will introduce the most commonly used and basic controls.
1. Button
2. TextView text display (equivalent to the Label in the java
Android6.0 permission management
Android 6.0 permission Mallow is added to the runtime permission management for the first time. This allows users to better understand and control the permissions involved in the app. However, it is a tough task for
Android Practical Skills-Analysis of Cache Usage1. Preface
I have mentioned caching in previous blogs, but it is scattered. Recently I have gained a new understanding of data caching, so I will record my understanding of caching, and how I use it
Android style and theme (1): android style theme
Main. the attributes defined by each component in xml code are duplicated. To avoid the hassle of defining repeated attributes of each component in a file: res/values/Style_test.xml source
Atitit. android js keyboard buttons detect the Back key Home key and Menu key events, atitit. androidmenu
Atitit. android js keyboard buttons detect Back key Home key and Menu key events
1.
OnKeyDown
@
Location of the android sdk has not been setup in the preferences, androidpreferences
When you open opens the android sdk and avd manager of eclipse, the following error occurs: error: location of the android sdk has not been setup in the
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