swipe

Different menu for different tabs in tab+swipe application for android project

南笙酒味 提交于 2019-12-20 10:43:21
问题 I am a beginner to android applications and java, basically I am a PHP developer. I've a project for a tab+swipe application, Reseller.java package com.idevoc.onsitereseller; import java.util.ArrayList; import android.app.ActionBar; import android.app.ActionBar.Tab; import android.app.Activity; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentActivity; import android.support.v4.app.FragmentManager; import android.support.v4.app

Android ListView Swipe for Action like Twitter List

ぃ、小莉子 提交于 2019-12-20 09:25:05
问题 I'm trying to implement the "swipe for action" feature - like you can see in the "new" twitter app. A closer description you find at swipe for action description. Now, are there any ideas/solution how to implement this feature? Thanks! 回答1: Use a GestureDetector in each row, and wrap the row contents itself in a ViewFlipper . On a swipe, switch children of the ViewFlipper . I have a ViewSwiper that combines a GestureDetector and ViewFlipper , but it is designed to work in either direction (e

Snapchat-like swipe navigation between views in Xcode 6 and Swift)

拥有回忆 提交于 2019-12-20 08:19:13
问题 I've been trying to implement swipe navigation between View Controllers in my app using the Swipe Gesture Recognizer and embeded Navigation Controller, but it doesn't look even close to the Snapchat's nav. What would be the most efficient and appropiate way to implement such functionality? I'm quite a newbie to Swift and programming really, and I would appreciate every helpful comment. 回答1: The short version is to use a container view controller with a scrollview inside the controller. You

SWRevealViewController and TableView - swipe to delete not working

大兔子大兔子 提交于 2019-12-19 10:08:14
问题 I added the SWRevealViewController to my app, along with the hamburger stack to access my menu. My app has a UITableView for the main application view. I want to allow users to delete items from the list using the swipe to delete function. I enabled the swipe to delete and added a method call to handle this. I noticed that the method never gets called. Not sure how to get this to work. Any help would be greatly appreciated. I was asked for a code example. I have not made any changes to the

How to get several ViewPagers into a ScrollView?

时光怂恿深爱的人放手 提交于 2019-12-19 04:10:53
问题 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=

Returning true and false in OnTouch?

梦想的初衷 提交于 2019-12-19 03:46:44
问题 Does it matter if i return true or false in onTouch() of an OnTouchListener ? I can't see any difference between returning true or false in this example: Android Swipe on List 回答1: The return value determines if you consumed the touch event. In other words true means that this touch event is interesting to you and all follow up calls of this touch event like ACTION_MOVE or ACTION_UP will be delivered to you. If you return false than the touch event will be passed to the next View further up

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

时间秒杀一切 提交于 2019-12-19 03:15:53
问题 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? 回答1: The standard solution is to use a

How to change activity with left-right swipe

徘徊边缘 提交于 2019-12-18 12:54:17
问题 How to change activity with left-right swipe? I did not find the manual anywhere. Example: 回答1: Regarding your first link, its called ViewPager . Follow one of the awesome tutorial it will definitely help. 回答2: You're looking for a ViewPager. See this part of the documentation for details on sliding screens with it. 来源: https://stackoverflow.com/questions/14965124/how-to-change-activity-with-left-right-swipe

iOS Advanced Gestures: Getting Swipe Direction Vector

∥☆過路亽.° 提交于 2019-12-18 04:41:28
问题 Looking through the documentation, it seems that the new advanced gestures API doesn't determine the direction of a swipe beyond the basic { left, right, up, down }. I need the start point of the swipe and the direction. Is there anyway to retrieve this other than coding my own advanced gesture library from scratch out the basic gestures? And if this is my only option, could anyone point me to some open source code that does this? 回答1: Got it! Documentation is here, under ' Creating Custom

Swipe Direction in ViewPager

久未见 提交于 2019-12-18 04:34:18
问题 I have an Android app that uses ViewPager and FragmentStatePagerAdapter. I however need to add a new feature in which I have to know the swipe direction to move from one fragment view to another, left or right. (i.e, when I swipe left, I would do one thing, and when I swipe right I would do something else). Please note, I do not need the events to happen AFTER the swipe is over. I have to do those events as the swipe occurs. I thought of using setOnPageChangeListener() but it does not tell me