Giter VIP home page Giter VIP logo

backdroplayout's Introduction

backdroplayout's People

Contributors

akram09 avatar roiacult avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

backdroplayout's Issues

Reverse height

Hello! I have a problem with method

private fun getTransitionHeight(): Float {
return Math.min(getBackLayout().height.toFloat(),height - peeckHeight)
}

So, for correct work user must insert in peeckHeight height of front layout. But if I want to dropdown depending of background content height I need to insert height to global top like here:

return Math.min(getBackLayout().height.toFloat(),peeckHeight)

I think it will be better if you do a parameter to make it optional. Thanks.

implement Backdrop on a Fragment

toolbar menu icon doesn't appear if I implement Backdrop on a Fragment
how can i solve this

another request : can I toggle the Backdrop's front and back views programmatically?

Unnecessary utils

inline var View.isVisible: Boolean
    get() = visibility == View.VISIBLE
    set(value) {
        visibility = if (value) View.VISIBLE else View.GONE
    }

from androidx.core.view.isVisible alerady exists.

front background color changes when menu opened

Screenshot_2020-06-24-01-14-52-92_ecf52833ff7011a5b96a09ac24bbb7ab

Screenshot_2020-06-24-01-14-46-18_ecf52833ff7011a5b96a09ac24bbb7ab

as you can see in the second image, a weird shadow appeard (left top corner)

this is my front_layout.xml :

<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"    
    xmlns:app="http://schemas.android.com/apk/res-auto"    
    android:layout_width="match_parent"    
     android:layout_height="match_parent">    
    <com.google.android.material.card.MaterialCardView    
        android:layout_width="match_parent"    
        android:layout_height="match_parent"    
          app:layout_constraintLeft_toLeftOf="parent"    
        app:layout_constraintTop_toTopOf="parent"    
        app:shapeAppearanceOverlay="@style/AppTheme.CardviewCut">    
    </com.google.android.material.card.MaterialCardView>    
</androidx.constraintlayout.widget.ConstraintLayout>

this is my back_layout.xml:

<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"    
    android:layout_width="match_parent"    
    android:layout_height="100dp"    
    android:background="@color/colorPrimary"    
    xmlns:app="http://schemas.android.com/apk/res-auto">    
    <TextView    
        android:id="@+id/textView"    
        android:layout_width="wrap_content"    
        android:layout_height="wrap_content"    
        android:text="BACK"    
        app:layout_constraintStart_toStartOf="parent"    
        app:layout_constraintTop_toTopOf="parent" />    
</androidx.constraintlayout.widget.ConstraintLayout>

this is my activity_main.xml:

    <com.google.android.material.appbar.MaterialToolbar    
        android:id="@+id/toolbar"    
        android:layout_width="match_parent"    
        android:layout_height="wrap_content"    
        android:background="?attr/colorPrimary"    
        android:minHeight="?attr/actionBarSize"    
        android:theme="?attr/actionBarTheme" />    
    <com.roacult.backdrop.BackdropLayout    
        android:id="@+id/container"    
        app:front_layout="@id/includedFront"    
        app:back_layout="@id/includedBack"    
        app:toolbarId="@id/toolbar"    
        app:peekHeight="56dp"    
        app:disable_when_open="true"    
        app:menuDrawable="@drawable/ic_menu"    
        app:closeDrawable="@drawable/ic_close"    
        app:animationDuration="100"    
        android:layout_width="match_parent"    
        android:layout_height="match_parent">    
        <include    
            android:id="@+id/includedBack"    
            layout="@layout/back_layout"/>    
        <include    
            android:id="@+id/includedFront"    
            layout="@layout/front_layout"/>    
    </com.roacult.backdrop.BackdropLayout>

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.