Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 3. Layout > Determine the Visibility of Elements in a Sequence-Based La...

recipe 3.14. Determine the Visibility of Elements in a Sequence-Based Layout

3.14.1. Problem

You want to determine the visibility of an element within a container with a sequence-based layout delegate and possibly scroll the element into view.

3.14.2. Solution

Use the fractionOfElementInView() method of a sequence-based layout such as VerticalLayout or HorizontalLayout to determine the visibility percentage value of an element within the container’s viewport and set the container’s scroll position based on the corresponding coordinate offset value returned from the getScrollPositionDeltaToElement() method of a LayoutBase-based layout.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial