swipe

How to get several ViewPagers into a ScrollView?

泄露秘密 提交于 2019-12-01 00:15:21
I am trying to implement a layout, which contains a list of ViewPagers. Each ViewPager is swipeable independently. See the link to the picture below. picture of the layout I tried with ScrollView and a LinearLayout with ViewPagers inside it, but I only get one ViewPager shown. Is it even possible to get several ViewPagers on one screen? my code so far: main.xml <?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout android:layout_width="match_parent"

Want smooth transition or slide between pictures in an NSArray using UISwipeGesture

吃可爱长大的小学妹 提交于 2019-11-30 22:17:42
I have a UIImageView as one of my tabbarcontroller views, and I've added a UISwipeGestureRecognizer (right and left) to navigate through a series of photos in an NSArray. However, when swiping it jumps from photo to photo with no smooth transition. I'm not after anything fancy, but even a slide animation would be okay, like as one photo slides in, the other is sliding out the other side. Is this possible with the UISwipeGestureRecgonizer and an NSArray? The standard solution is to use a UIScrollView with pagingEnabled = YES and multiple image views inside the scroll view. If you want to work

video 轮播视频

核能气质少年 提交于 2019-11-30 20:57:46
<video controls :src="product.videoUrl" :poster="resURL + defaultImg"></video>//controls 显示播放器//poster  添加封面图片 //vue<van-swipe :autoplay="2000" :touchable="true"> <van-swipe-item v-if="product.videoUrl != ''"> <video controls :src="product.videoUrl" :poster="resURL + defaultImg"></video> </van-swipe-item> <van-swipe-item v-for="(image, index) in product" :key="index"> <img :src="image" mode="widthFix"/> </van-swipe-item> </van-swipe> //小程序 <swiper > <swiper-item v-if="videoo"> <video class="video" :src="videoo" bindplay="playVideo" controls="{{true}}" poster="{{resURL + defaultImg}}"></video>

UISwipeGestureRecognizer not working

假装没事ソ 提交于 2019-11-30 20:56:56
问题 I have a UIView inside of a UIScrollView, both created using IB. The UIView scrolls horizontally inside the UIScrollView. I want to detect left and right 2 finger swipes. Borrowing from the sample code I found in SmpleGestureRecognizers, I have put the following code in the viewDidLoad method of the UIScrollView's ViewController... UIGestureRecognizer *recognizer; UISwipeGestureRecognizer *swipeRightRecognizer, *swipeLeftRecognizer; recognizer = [[UISwipeGestureRecognizer alloc]

Setting width of SeekBar to make “swipe to unlock” effect

老子叫甜甜 提交于 2019-11-30 18:50:54
I am attempting to make a swipe to unlock feature using a SeekBar. The look I am aiming for is shown here: This is composed of two images, a background, and a button. I put both the background and the SeekBar in a FrameLayout so that the SeekBar should sit on top of the background. Like so: <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center_vertical" > <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:text="Testing 123.

Android how to add swipe Gesture on LinearLayout without onDown true

被刻印的时光 ゝ 提交于 2019-11-30 14:10:21
问题 I'm working on Gesture activity in android I used class to detect the swipe action is public class ActivitySwipeDetector implements View.OnTouchListener { static final String logTag = "ActivitySwipeDetector"; private Activity activity; static final int MIN_DISTANCE = 100; private float downX, downY, upX, upY; public ActivitySwipeDetector(Activity activity){ this.activity = activity; } public void onRightToLeftSwipe(){ Log.i(logTag, "RightToLeftSwipe!"); Toast.makeText(activity,

Android fragment tab host + viewpager swipe?

最后都变了- 提交于 2019-11-30 13:33:36
问题 I currently have a fragment tab host, made by this tutorial http://maxalley.wordpress.com/2013/05/18/android-creating-a-tab-layout-with-fragmenttabhost-and-fragments/ The only difference is that I'm using this inside a fragment. So I have a fragment with the tabs, each tab has another fragment.. <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <TabWidget android:id="@android:id/tabs" android:layout_width="fill_parent"

How do I disable the full swipe on a tableview cell in iOS11

馋奶兔 提交于 2019-11-30 11:38:30
UITableViewDelegate.h // Swipe actions // These methods supersede -editActionsForRowAtIndexPath: if implemented // return nil to get the default swipe actions - (nullable UISwipeActionsConfiguration *)tableView:(UITableView *)tableView leadingSwipeActionsConfigurationForRowAtIndexPath:(NSIndexPath *)indexPath API_AVAILABLE(ios(11.0)) API_UNAVAILABLE(tvos); - (nullable UISwipeActionsConfiguration *)tableView:(UITableView *)tableView trailingSwipeActionsConfigurationForRowAtIndexPath:(NSIndexPath *)indexPath API_AVAILABLE(ios(11.0)) API_UNAVAILABLE(tvos); However, I am returning nil in my

Android how to add swipe Gesture on LinearLayout without onDown true

一个人想着一个人 提交于 2019-11-30 09:51:15
I'm working on Gesture activity in android I used class to detect the swipe action is public class ActivitySwipeDetector implements View.OnTouchListener { static final String logTag = "ActivitySwipeDetector"; private Activity activity; static final int MIN_DISTANCE = 100; private float downX, downY, upX, upY; public ActivitySwipeDetector(Activity activity){ this.activity = activity; } public void onRightToLeftSwipe(){ Log.i(logTag, "RightToLeftSwipe!"); Toast.makeText(activity, "RightToLeftSwipe", Toast.LENGTH_SHORT).show(); //activity.doSomething(); } public void onLeftToRightSwipe(){ Log.i

ListView swipe/slide animation

て烟熏妆下的殇ゞ 提交于 2019-11-30 09:07:08
问题 I have a ListView control to display items and I want provide a swipe/slide gesture to select an item. I use the GestureRecognizer class to recognize the cross slide gesture but I also want to animate this gesture by moving the seelcted item horizontally. For example, this should look like on this image from an iOS app: I searched the web but I cannot find any useful link how to animate this gesture within a ListView control. 回答1: You could create a behavior that listens to the