Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/3llomi/hidely
Custom Views that can hide/show a View with some Animations (inspired by the Android FAB)
https://github.com/3llomi/hidely
animation fab hide-view-with-animation ui view
Last synced: 8 days ago
JSON representation
Custom Views that can hide/show a View with some Animations (inspired by the Android FAB)
- Host: GitHub
- URL: https://github.com/3llomi/hidely
- Owner: 3llomi
- Created: 2018-04-06T20:33:24.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-08-31T20:57:45.000Z (2 months ago)
- Last Synced: 2024-10-07T19:35:58.439Z (about 1 month ago)
- Topics: animation, fab, hide-view-with-animation, ui, view
- Language: Java
- Size: 10.7 MB
- Stars: 48
- Watchers: 2
- Forks: 10
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hidely
Custom Views that can hide/show a View with some Animations (inspired by the Android FAB)## Demo
## Install
Add this to your project build.gradle```
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
```Add this to your module build.gradle
```gradle
dependencies {
implementation 'com.github.3llomi:hidely:1.0'
}
```## Usage
## Basic Usage
use one of the following `Hidely` Views* `HidelyButton`
* `HidelyImageButton`
* `HidelyImageView`
* `HidelyView`* `HidelyFrameLayout`
* `HidelyRelativeLayout`
* `HidelyLinearLayout`## OR
if you want to make your own custom view then :
1. make your own custom view and make it **implements** `HidelyInterface` this will give you the 4 methods `show()` , `hide()` ,`isShowing()` and `setAnimationCallbacks()`
2. make an Object from `HidelyCore` and pass the view as a Parameter:
`hidelyCore = new HidelyCore(this);`
3. fill the 4 methods with hidely core like this```java
@Override
public void show() {
if (hidelyCore != null)
hidelyCore.show();
}@Override
public void hide() {
if (hidelyCore != null)
hidelyCore.hide();
}@Override
public boolean isShowing() {
return hidelyCore == null ? false : hidelyCore.isShowing();
}@Override
public void setAnimationCallbacks(HidelyAnimationCallbacks animationCallbacks) {
hidelyCore.setAnimationListener(animationCallbacks);
}```
### XML
```xml
```
### Java
```java
HidelyImageButton hidelyImageButton = findViewById(R.id.simple_example_hidely);
Button changeButtonState = findViewById(R.id.change_button_state);changeButtonState.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
//check if button is Showing
if (hidelyImageButton.isShowing())
//hide button
hidelyImageButton.hide();
else
//show button
hidelyImageButton.show();
}
});```
### Listen for Animation Callbacks
```java
hidelyImageButton.setAnimationCallbacks(new HidelyAnimationCallbacks() {
@Override
public void onAnimationStart() {
}@Override
public void onAnimationEnd() {}
});
```