roiacult / backdroplayout Goto Github PK
View Code? Open in Web Editor NEWthis library is based on Material design guidance
Home Page: https://material.io/design/components/backdrop.html
License: Apache License 2.0
this library is based on Material design guidance
Home Page: https://material.io/design/components/backdrop.html
License: Apache License 2.0
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.
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?
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.
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>
I want control view between Back and Front layout , how can i do that ?
Awesome library as we wait for the official material version. I can't however hide the back layout by touching the top layout. Is this possible?
Adding pull and push support to open and close backdrop
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.