Giter VIP home page Giter VIP logo

swipepage's Introduction

SwipePage

滑动关闭页面

截图

images images

使用方法

  <com.wiser.swipeactivity.SwipeFrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      android:id="@+id/fl_swipe"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:background="@color/design_default_color_secondary"
      app:sf_enable_drag="true"
      app:sf_friction="2"
      app:sf_percent_spring="4"
      app:sf_duration="200"
      app:sf_orientation="vertical"
      app:sf_close_act="true"
      tools:context=".MainActivity">

      <TextView
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:text="swipe页面"
          android:gravity="center"
          android:textColor="@color/design_default_color_primary"
          android:textSize="30sp"
          app:layout_constraintBottom_toBottomOf="parent"
          app:layout_constraintEnd_toEndOf="parent"
          app:layout_constraintStart_toStartOf="parent"
          app:layout_constraintTop_toTopOf="parent" />

</com.wiser.swipeactivity.SwipeFrameLayout>

操作指南

  • sf_friction:摩擦力
  • sf_percent_spring:滑动百分比距离关闭 4/height 默认是高度的1/4
  • sf_enable_drag:是否能拖拽
  • sf_duration:动画时长
  • sf_close_act:是否关闭Activity
  • sf_orientation:滑动方向
    • horizontal
    • vertical

swipepage's People

Contributors

wiser-wong avatar lengxiaoyu513 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.