The example in this article describes the ViewPage method for judging the left and right direction of the slide in Android programming. Share to everyone for your reference, specific as follows:
Package com.meityitian.app.views;
Import Android.content.Context;
Import Android.support.v4.view.ViewPager;
Import Android.util.AttributeSet;
Import Android.util.Log;
Import Com.meityitian.app.utils.Debug
Android imitation qq pull-down refresh and left sliding list ---- PullToRefresh, SwipeMenuListView Open-Source Project Integration, swipemenulistview
Github link: https://github.com/licaomeng/Android-PullToRefresh-SwipeMenuListView-Sample
PullToRefresh is a perfect open-source project for pull-down refresh. SwipeMenuListView is an open-source project that slide
In my blog, the last time viewpager was used to achieve sliding between left and right. See the article: Android uses viewpager to achieve sliding between left and right..
This time I will use viewflipper to achieve this effect. Well, let's take a look at the effect first:
This effect is achieved after the results are read.1. layout File
The main interfac
Android uses Horizontalscrollview to achieve title drive content left and right cutting screenAdd Relativelayoutxmlns:android= "Http://schemas.android.com/apk/res/android"Xmlns:tools= "Http://schemas.android.com/tools"Android:layout_width= "Match_parent"Android:layout_height= "Match_parent"Tools:context=". Mainactivity " > HorizontalscrollviewAndroid:id= "@+id
initializationSwipebackhelper.getcurrentpage (ThisGets the current page. Setswipebackenable (TrueSets whether to slide. Setswipeedge (200)The range that can be slid. Px. 200 is the screen for the left 200px. Setswipeedgepercent (0.2f)The range that can be slid. Percentage. 0.2 is represented as the screen on the left 20%. Setswipesensitivity (0.5f)The degree of sensitivity to lateral swipe gestures. 0 is s
1. Example description• Android-support-v4.jar, a software package officially provided to us by Google that is compatible with low-version Android devices and contains APIs that can only be used in Android 3.0 and later versions. Viewpager is one of them. With viewpager, we can do many things, from the simplest navigation to page switching menus. • Viewpager allo
During debugging, the following error occurs: Java. Io. ioexception: Unable to upload file: no space left on device.
The reason is that my APK is too big. The solution is as follows:
Find the simulator directory under the AVD directory
C: \ Documents and Settings \ qijianzhou \. Android \ AVD \ advv4.avd
Modify the config. ini file
Add disk. datapartition. size = 1024
HW. LCD. density = 120
Sdcard. s
Imitation QQ pseudo-3D card sliding control is done, ready to make a big adjustment to the application UI, so there is a demand above;Rarely used Actionbar, then a burst of find grep in the source, minute lock Actionbarview.java----------Body----------1,actionbar the program icon and program name in the upper left corner (default)2, the program icon ID is: Android. R.id.home; ImageView; You can do what you
) { - Super(FM); + This. FM =FM; A } at - @Override - PublicFragment GetItem (intarg0) { - returnFragments.get (arg0); - } - in @Override - Public intGetCount () { to returnfragments.size (); + } - the}Define the fragment content to be displayed, and place a button in it1 PackageCom.example.viewpagerdemo;2 3 ImportAndroid.os.Bundle;4 Importandroid.support.v4.app.Fragment;5 ImportAndroid.view.LayoutInflater;6 ImportAndroid.view.View;7 Imp
Android disables the sliding of the left and right sides of ViewPager
Sometimes there are some "weird" requirements during development, such as embedding ListView in ViewPager or embedding another ViewPager, when sliding, the embedded XXView cannot be moved. Now, we will disable sliding of the ViewPager on the outermost layer so that the embedded XXView can get the sliding event. There are also many online
First of all to show you beautiful photos, the effect of interested friends can continue reading oh.
Viewpager This small demo is to be able to scroll around the picture, the following with index, slide to the last page in the right slide to the first page, the first page to the left slide to the last page, the above is the effect of the picture, with beautiful pictures is my consistent style, hehe
1. First look at some layout under the XML
In Android apps, there are many ways to exit an activity, such as setting a return navigation key at the top and clicking on the return key to exit. Of course, perhaps now also noticed that many of the app has adopted a left-sliding exit, such as the micro-letter Chat interface exit, etc., are used to the left-sliding exit.
With the love of technology, I have re
Related articlesAndroid Popwindow Implementation left pop-up menu layerHttp://www.jb51.net/article/33533.htm13 Essentials of mobile app designHttp://www.jb51.net/article/33534.htmThis article tells about the trend of mobile app design for the next 2013 years, and it feels quite reasonable. WP8 's plane interface design has achieved great success, many applications are to take the same design, such as Zaker, and similar to the display of this article t
Sometimes, in order to achieve the requirements of the project, complete the design of the user interaction experience, do not change these view to their desired effect.
Android native ListView does not support sliding around, but see the micro-letter phone book, the contact can be left and right to operate, through their own ideas and ideas, and to achieve.
Ideas:1. Get the x,y position where the finger
Android Activity screen switching animation-slide switch between left and rightIf there is no X axis at the bottom of the mobile phone screen, and the Y axis on the left of the screen, when the Activity value is-100% p on the X axis, it is right on the left of the screen (Position 1 ), when the X axis value is 0% p, it
Android uses ViewPager to achieve left-side circular sliding and carousel effects. androidviewpager
ViewPager is a common android component. However, when we use ViewPager, we cannot achieve infinite circular sliding between left and right. When sliding to the border, we will see an animation that cannot flip pages, th
Android uses ViewPager to achieve left-side circular sliding and carousel Effect
ViewPager is a common android component. However, when we use ViewPager, we cannot achieve infinite circular sliding between left and right. When sliding to the border, we will see an animation that cannot flip pages, this may affect the u
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.