https://github.com/evant/wiiafl
Wrap it in a FrameLayout
https://github.com/evant/wiiafl
Last synced: about 1 year ago
JSON representation
Wrap it in a FrameLayout
- Host: GitHub
- URL: https://github.com/evant/wiiafl
- Owner: evant
- License: mit
- Created: 2018-12-01T16:23:20.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2020-06-14T22:53:37.000Z (about 6 years ago)
- Last Synced: 2025-04-01T14:38:38.367Z (about 1 year ago)
- Language: Kotlin
- Homepage:
- Size: 125 KB
- Stars: 10
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WIIAFL
> Wrap it in a FrameLayout
-- Expert Andriod Dev
Pretty much any layout problem in Android can be solved by wrapping your view in a FrameLayout, this lib makes that a piece of cake!
## Usage
For the simple case, you just call the awesomely-named `wiiafl()` extension function:
```kotlin
val myFixedLayout = view.wiiafl()
```
You can find a specific view to wrap with `childId`.
```kotlin
view.wiifl(childId = R.id.broken_button)
```
Sometimes, 1 FrameLayout just isn't enough to fix your bugs, you can wrap it in as many as you like by passing in a `count`.
```kotlin
val extraFrameLayouts = view.wiiafl(count = 3)
```
Want to just wrap _everything_ in a FrameLayout? Just use the `recursive` flag. This is an easy way to get rid of all of your bugs!
```kotlin
view.wiiafl(recursive = true)
```