Floaty

Project Url: kettsun0123/Floaty
Introduction: This is an Android Library for bottom view with custom transition.
More: Author   ReportBugs   
Tags:

Gradle


dependencies {
    implementation 'com.github.kettsun0123:floaty:0.1.0'
}


Features

Platform Download License API

This is an Android Library for bottom view with custom transition. Floaty easily provides a replacing with transition feature.

  • [x] support custom layout view.
  • [x] support in-out animation like snackbar.
  • [x] transition between views when called replace()
  • [x] sample code.
  • [ ] support other gravities.
  • [ ] update README(add api documents).
  • [ ] and more...





Usage

Create Floaty layout file.

<uno.ketts.floaty.FloatyContentLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/layout_floaty_content"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="bottom"
    android:background="@color/whisper"
    android:theme="@style/ThemeOverlay.AppCompat.Dark">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="56dp"
        android:background="@color/whisper"
        tools:ignore="HardcodedText">

        <TextView
            android:id="@+id/text_floaty_small"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Small one"
            android:textSize="14sp"
            android:textColor="@android:color/black"
            android:layout_centerInParent="true"/>

    </RelativeLayout>
</uno.ketts.floaty.FloatyContentLayout>

FloatyContentLayout extend FrameLayout. Make sure to add ViewGroup.


and use in activity file.

button_floaty.setOnClickListener {
            Floaty.make(it, R.layout.layout_floaty_big).setDuration(Floaty.LENGTH_INDEFINITE).show()
        }



When you want to replace view with transition,

button_floaty_replace.setOnClickListener {
            Floaty.make(it, R.layout.hugahuga).setDuration(Floaty.LENGTH_SHORT).setTransition(CustomTransition()).replace()
        }

Sample

Clone this repo and check out the example module.

Change Log

Version: 0.1.0

  • beta release

Author

Licence

Copyright 2018 Yuji Koketsu.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Apps
About Me
GitHub: Trinea
Facebook: Dev Tools