Skip to content

MeilCli/AndroidPageLayout

Repository files navigation

AndroidPageLayout

NuGet version
PageLayout for Xamarin.Android

This layout is ViewPager-like layout but non used Adapter

Required

  • MonoAndroid7.0 (if older version? should update Xamarin.Android)

Install

Install-Package Meilcli.Android.PageLayout

How diferrent from ViewPager?

  • Non Adapter! Page's view is adding while containing in PageLayout
  • Support multiple page.
  • Support NestedScrollView in Page (PageLayout implements NestedScrollingParent)
  • Support vertical and horizontal orientation.

API Document

API Document

Usage

How use in your Project? see sample AndroidPageLayout.App!!!

How add to layout.xml?

First, add this code to root layout in xml

xmlns:app="http://schemas.android.com/apk/res-auto"

Second, add PageLayout and child view in xml

<androidpagelayout.PageLayout 
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:page_orientation="vertical">
    <TextView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:text="Page1"
        android:gravity="center"
        app:page_view="true" />
</androidpagelayout.PageLayout>

How customize orientation?

Set page_orientation in PageLayout

app:page_orientation="vertical"
app:page_orientation="horizontal"

How add Page in PageLayout?

Set page_view to true in PageLayout's child view

app:page_view="true"

How show multiple page?

Set page_multi_size in PageLayout

app:page_multi_size="2"

Activity Transition and Twitter-like image viewer

See sample

License

This library is under MIT License.

And, this library use SlideLayout