Rectangle 27 0

Here is how PageTurner does it. It takes a single scroll view to display the long text string. But, the scroll gestures are overridden. So when you do a "swipe left gesture" it will do a Page Flip animation and scroll the view downwards (by screen height). So the user feels as if the page has turned when essentially you have just manually scrolled to the bottom of the view. Ingenius isn't it? And you don't have to worry about the font size, paragraph spacing, words being cut, etc. The app is available on google play.

How i can show a long textview(string ) into multiple page of android ...

android
Rectangle 27 0

What you can do is use two UIViews, one for the first side, one for the second side.

Show the first view, hide the second view, and set the second view's frame to have a width of 0.

Then, when your first view is visible, animate its frame to have a width equal to 0. Hide the first view, unhide the second view, and animate the second view's frame to the desired frame.

Edit : This does not appear to work well if you have labels in your views, as this is a 2D flip. Sorry about that. @Maverick's answer could work pretty well in your case.

ios - How to flip a view with a label on the front side and another la...

ios uiview uilabel
Rectangle 27 0

Call this method in your viewController, your viewController view flips and viewController life cycle method calls and simply change the image of UIImageView you want to display in -(void)viewdidload method.

[UIView  beginAnimations: @"Showinfo"context: nil];
    [UIView setAnimationCurve: UIViewAnimationCurveEaseInOut];
    [UIView setAnimationDuration:0.75];
    UIView *parent = self.view.superview;
    [self.view removeFromSuperview];
    self.view = nil; // unloads the view
    [parent addSubview:self.view]; //reloads the view from the nib
    [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight
    forView:self.navigationController.view cache:NO];
    [UIView commitAnimations];

    Please vote up if you find it helping

ios - How to flip a view with a label on the front side and another la...

ios uiview uilabel
Rectangle 27 0

XmlPullParser parser = context.getResources().getXml(R.xml.data_file);
int eventType = parser.getEventType();
while (eventType != XmlPullParser.END_DOCUMENT) {
            if (eventType == XmlPullParser.START_TAG) {
                String tagName = parser.getName();
                ...
            }
            eventType = parser.next();
}

If you store xml in assets - use AssetsManager to obtain XmlPullParser for it.

xml parsing - how to parse xml files of text in a flip view in android...

android xml-parsing viewflipper
Rectangle 27 0

Why don't you just use the .transform property on the views? I've used it to create all sorts of zoom/fade/stretch/flip transitions, and it can be used with [UIView animateWithDuration:].

If you insist on using layers, be aware that animateWithDuration: does NOT use CALayer animation under the covers and as a result will always be at least a couple frames off of the other animation.

ios - Issue mixing CAAnimation with View Animation in UIViewController...

ios core-animation uiviewanimation
Rectangle 27 0

modalTransitionStyle is only available for 3.0+. If you want to have a similar transition you will have to create the animation transition yourself. Take a look at the following UIView function

+ (void)setAnimationTransition:(UIViewAnimationTransition)transition forView:(UIView *)view cache:(BOOL)cache

Flip View for 2.2.1 iPhone SDk - Stack Overflow

iphone
Rectangle 27 0

Hey i have made a standard sample to work with your problem..you are binding your flipview Itemssource to Images ( collection of strings i think in your case ..) so first make a ObservableCollection named Images..like this.in your page.cs( or in your view model if you are using in that case you have to send message to your viewmodel.) like this..

public ObservableCollection<string> Images { get; set; }

in your page constructor do this..

public BasicPage1()
    {
        this.InitializeComponent();
        Images = new ObservableCollection<string>();


        this.DataContext = this;
    }
protected override void OnNavigatedTo(NavigationEventArgs e)
    {
        //XDocument xdoc = XDocument.Load("XMLFile1.xml");
        //IEnumerable<flipimage> images = from img in xdoc.Descendants("Image") select new flipimage(img.Element("ImageTitle").Value, img.Element("ImageUrl").Value);

        string url = "/Assets/teacher-symbol.png";
        Images.Add(url);
        Images.Add(url);
        Images.Add(url);
        Images.Add(url);
        Images.Add(url);
        Images.Add(url);
      //  flipviewcontrol.Items.Add(url);

        //flipviewcontrol.DataContext = images;
    }
<FlipView HorizontalAlignment="Left" VerticalAlignment="Top" x:Name="flipviewcontrol" ItemsSource="{Binding Images}" Grid.Row="1">
        <FlipView.ItemTemplate>
            <DataTemplate>

                <Image HorizontalAlignment="Left"  Source="{Binding}" Height="762" VerticalAlignment="Top" Width="1360" x:Name="imagecontrol"/>
            </DataTemplate>
        </FlipView.ItemTemplate>

    </FlipView>

for your query..you have to do this..for your other images..

private void flipviewcontrol_SelectionChanged(object sender, SelectionChangedEventArgs e)
    {
        string url = "/Assets/usericondash.png";
        Images.Add(url);
    }

Thanks .Every thing is fine but in OnNavigatedTo() method i am getting only selected item image url how to show other images when click on next in filpview?how to do that?

just add the new images url to this collection..on your flipview selectionChangedEvents..i have updated My code.

if it is helpful for your work you can mark it right or up this answer..

can we show the images in the order of they were placed in gridview.In grid view images are placed in particular order.randomly i am clicking the item and sending that url to next page showing in flipview.whenever click on selected change event of filp view need to show after the items of selected item as they were placed in grid view.can you give idea for this?in selected change how to add after the selected item image urls.when ever back click on filp need to show it's previuos all items.

How to Show Previous page selected item in flip view control in anothe...

windows-8 windows-8.1 flipview
Rectangle 27 0

Use the below code for adding flip animation to a view in android.

final ObjectAnimator animation = ObjectAnimator.ofFloat(view, "rotationY", 0.0f, 360f);
            animation.setDuration(3000);
            animation.setRepeatCount(ObjectAnimator.INFINITE);
            animation.setInterpolator(new AccelerateDecelerateInterpolator());
            animation.start();
            view.startAnimation(animation);

java - Android how to apply flip rotation animation on each element of...

java android android-layout android-animation android-imageview
Rectangle 27 0

Apple supply a whole bunch of methods down at the CoreGraphics level for drawing PDF content directly. As far as I'm aware, none of it is neatly packaged up at the UIKit level, so it may not be a good fit for your project at this point, especially if you're not as comfortable down at the C level. However, the relevant function is CGContextDrawPDFPage; per the normal CoreGraphics way of things there are other methods to create a PDF reference from a data source and then to get a page reference from a PDF. You'll then need to deal with scaling and translating to the view you want, and be warned that you'll need to perform a horizontal flip because PDFs (and OS X) use the lower left as the origin whereas iOS uses the top left. Example code, off the top of my head:

UIGraphicsBeginImageContext(thumbnailSize);
CGPDFDocumentRef pdfRef = CGPDFDocumentCreateWithProvider( (CGDataProviderRef)instanceOfNSDataWithPDFInside );
CGPDFPageRef pageRef = CGPDFDocumentGetPage(pdfRef, 1); // get the first page

CGContextRef contextRef = UIGraphicsGetCurrentContext();

// ignore issues of transforming here; depends on exactly what you want and
// involves a whole bunch of normal CoreGraphics stuff that is nothing to do
// with PDFs
CGContextDrawPDFPage(contextRef, pageRef);

UIImage *imageToReturn = UIGraphicsGetImageFromCurrentImageContext();

// clean up
UIGraphicsEndImageContext();
CGPDFDocumentRelease(pdfRef);

return imageToReturn;

At a guess, you'll probably want to use CGPDFPageGetBoxRect(pageRef, kCGPDFCropBox) to get the page's crop box and then work out how to scale/move that to fit your image size.

Probably easier for your purposes is the -renderInContext: method on CALayer (see QA 1703) the old means of getting a screenshot was UIGetScreenImage, but that was never really official API and was seemingly temporarily allowed only because of the accidental approval of RedLaser. With the code in the QA you can rig yourself up to get a UIImage from any other view without that view having to be on screen. Which possibly resolves some of your issue with screen capturing? Though it means you can support OS 4.x only.

In either case, PDFs just don't draw that quickly. You probably need to populate the table then draw the thumbnails on a background thread, pushing them upwards when available. You can't actually use UIKit objects safely on background threads but all the CoreGraphics stuff is safe.

objective c - How can I programatically generate a thumbnail of a PDF ...

iphone objective-c cocoa-touch
Rectangle 27 0

I figured it out. One must make a tableView class, mainView class and a flipView class. The tableView-didSelectRowAtIndex method pushes to mainView. The mainView class you have to create the flip mechanism, I used the modalTransitionalStyle approach. The flipView contains the back button methods.

iphone - Having problem loading data from AppDelegate using UITableVie...

iphone
Rectangle 27 0

Simple ViewAnimator that will animate between two or more views that have been added to it. Only one child is shown at a time. If requested, can automatically flip between each child at a regular interval.

It is possible to assign different animations. See here for examples or here on SO.

But it depends on what actually you want to flip and animate. You can draw different shapes and drag or animate them.

I have gone through Curl effect as well as flip effect in android where pages of a book are turned but what i need is turn effect on book means when we have a book with first and last cover as hard bound then the turning style will be different from curl and flip effect. So please can any one tell me how to implement this and any supporting links or tutorials or examples (are appreciated ) Thank you

How to do page flip/turn/curl effect in android - Stack Overflow

android flip cocos2d-android
Rectangle 27 0

You can create a webview, either make it invisible or make it one view of ViewFlipper, and load the desired URL in it. Implement WebViewClient's onPageFinished for your webview. After receiving the callback (onPageFinished) wait for some arbitrary time (if you wish) and make your webview visible or flip to it and reload the URL. Reloading is important as page might have some javascript for redering certain section of webpage and if webview is not visible then it won't get executed. First load will make sure that all the required resources are cached, so second load will be instant.

html - Android: Pre-loading web page, then showing full screen - Stack...

android html webview
Rectangle 27 0

I too had something very similar situation, on click of a button on ViewController1 I have to move to another ViewController2. I used this code,

//code this in ViewController1
-(IBAction)flipView:(id)sender
{
    ViewController2 *view2 = [[ViewController2 alloc] initWithNibName:@"ViewController2" bundle:nil];
    [UIView beginAnimations:@"animation" context:nil];
    [UIView setAnimationDuration:1.0];
    [[self navigationController] pushViewController:view2 animated:YES];
    [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:self.navigationController.view cache:NO]; 
    [UIView commitAnimations];
    [view2 release];
}

//code this in ViewController2 on click of back button
-(IBAction)flipView:(id)sender
{
    [UIView beginAnimations:@"animation" context:nil];
    [UIView setAnimationDuration:1.0];

    [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.navigationController.view cache:NO]; 
    [[self navigationController] popViewControllerAnimated:YES];
    [UIView commitAnimations];  
}

But in this code I am using 2 classes, if it is fine to you, use this code. Hopes it solves your problem to some extent.

Thank you for your reply. If I'm understanding this correctly, what you are describing is basically a flip between two view controller. Something like the standard modal segue. See my updated image. Sorry about the confusion.

ios - How to flip a view with a label on the front side and another la...

ios uiview uilabel
Rectangle 27 0

Check out SwipeView within this project https://github.com/fry15/uk.co.jasonfry.android.tools It does exactly what you want it to do and is super simple to implement.

gesture - How to make an Android view that flips between views on swip...

android gesture
Rectangle 27 0

Thanks Ephraim, I used view flipper in my project and used that library that you have mentioned. It looks great and it help me out. Please any one who want to animate his view like rotate should use this library.

java - Android how to apply flip rotation animation on each element of...

java android android-layout android-animation android-imageview
Rectangle 27 0

A lot of the other tutorials and sample codes don't produce believable 3D flips. A simple rotation on the y-axis isn't what's done in iOS.

ViewFlipper viewFlipper = getViewFlipperForItem(i);
AnimationFactory.flipTransition(viewFlipper, FlipDirection.LEFT_RIGHT);

Where getViewFlipperForItem is a method you implement to get the ViewFlipper on that cell. I suggest you add each cell as a ViewFlipper (or ViewAnimator) and add the images you intend to flip within the ViewFlipper (or ViewAnimator). If this isn't clear to you, let me know.

java - Android how to apply flip rotation animation on each element of...

java android android-layout android-animation android-imageview
Rectangle 27 0

You can try FlexPaper, it supports Android and iOS

Your product does appear to be relevant to the question, but you need to disclose that you are affiliated with the publisher.

How to create Flip Page View on android? - Stack Overflow

flip
Rectangle 27 0

Having run into the same problem I agree with Eric and Sam: either transitionWithView or transitionFromView will both do what you want as given above as long as you create a container view of the appropriate size that you wish to flip. Otherwise the whole window view will flip.

So if view1 is the subview you begin with and you want to flip to view2 then add

UIView *containerView = [[UIView alloc] initWithFrame:appropriateSize];
[containerView addSubView:view1];

And then the simplest way to animate is probably:

[UIView transitionFromView:view1 
                    toView:view2 
                  duration:2.0   
                   options:UIViewAnimationOptionTransitionFlipFromLeft   
                completion:nil];

iphone - Transition behavior using transitionFromView and transitionWi...

iphone uiview views ios transitions
Rectangle 27 0

I know this is an old question but ViewPager is created for this exact same purpose. ViewPager is part of android compatibility package and more can be found at http://android-developers.blogspot.com/2011/08/horizontal-view-swiping-with-viewpager.html

It's what the market app uses. It looks awesome!

Is ViewPager a replacement for ViewFlipper?

Sign up for our newsletter and get our top new questions delivered to your inbox (see an example).

gesture - How to make an Android view that flips between views on swip...

android gesture
Rectangle 27 0

Take a look at HorizontalPager. It's actually based on RealViewSwitcher, which in turn is based on the Android homescreen's code, and supports snap-to paging with drag feedback, as well as nested vertically-scrolling subviews. Gesture support for fast swipes isn't all it should be, but this may get you part of the way there (and I'd welcome contributions back).

EDIT: As of 2012 you're much better off using Google's ViewPager - it's in the compat library.

Best of all it's simple, with only one source file. It sub-classes from ViewGroup so you just add your pages as children in the XML. Set mTouchSlop = 0 for better swipe recognition.

@MelindaGreen I'd switch to ViewPager these days. I'm not maintaining HorizontalPager any more. While ViewPager is much more complex, it should cover all the same uses and then some; I'd only use HorizontalPager if you wanted to do something really custom that ViewPager doesn't support and you wanted a simpler base class to start from.

@Yoni, The added complexity is a big deal for me, so I'm more than willing to use a simple version with problems than to accept the maintenance cost of the 'correct' way. I've already made a bunch of changes to HorizontalPager and may well republish it along with other such utilities that I've written or adopted. Hint: call the user's callback from snapToScreen() rather than computeScroll() for snappier UI feedback.

gesture - How to make an Android view that flips between views on swip...

android gesture