All Projects → beworker → Edge To Edge

beworker / Edge To Edge

Licence: apache-2.0
Full screen Android apps using simple Kotlin DSL

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Edge To Edge

Wrnavigationbar
超简单!!! 一行代码设置状态栏、导航栏按钮、标题、颜色、透明度,移动等 WRNavigationBar which allows you to change NavigationBar's appearance dynamically
Stars: ✭ 2,923 (+2377.12%)
Mutual labels:  statusbar, navigationbar
Systemuihelper
Helper for dealing with Android System UI visibility
Stars: ✭ 108 (-8.47%)
Mutual labels:  statusbar, navigationbar
Ultimatebarx
Make Android transparent statusbar and navigationbar easy.
Stars: ✭ 879 (+644.92%)
Mutual labels:  statusbar, navigationbar
Uiwidget
一个集成TabLayout、UIAlertDialog、UIActionSheetDialog、UIProgressDialog、TitleBarView(自带沉浸式标题栏)、CollapsingTitleBarLayout、RadiusView(圆角及状态背景设置View解放shape文件)、KeyboardHelper(软键盘控制及遮挡控制类)、StatusViewHelper(状态栏沉浸帮助类)、NavigationViewHelper(导航栏沉浸式帮助类)、AlphaViewHelper(View透明度控制帮助类) 等项目常用UI库
Stars: ✭ 400 (+238.98%)
Mutual labels:  statusbar, navigationbar
Wrnavigationbar swift
WRNavigationBar which allows you to change NavigationBar's appearance dynamically
Stars: ✭ 576 (+388.14%)
Mutual labels:  statusbar, navigationbar
Ypnavigationbartransition
A Full functional UINavigationBar framework for making bar transition more natural! You don't need to call any UINavigationBar api, implementing YPNavigationBarConfigureStyle protocol for your view controller instead. (类似微信 iOS Navigation Bar 的切换方案)
Stars: ✭ 725 (+514.41%)
Mutual labels:  statusbar, navigationbar
Ultimatebar
[停止维护]Transparent statusbar and navigationbar
Stars: ✭ 655 (+455.08%)
Mutual labels:  statusbar, navigationbar
Immersionbar
android 4.4以上沉浸式状态栏和沉浸式导航栏管理,适配横竖屏切换、刘海屏、软键盘弹出等问题,可以修改状态栏字体颜色和导航栏图标颜色,以及不可修改字体颜色手机的适配,适用于Activity、Fragment、DialogFragment、Dialog,PopupWindow,一句代码轻松实现,以及对bar的其他设置,详见README。简书请参考:http://www.jianshu.com/p/2a884e211a62
Stars: ✭ 10,030 (+8400%)
Mutual labels:  statusbar, navigationbar
Spinnercpp
Simple header only library to add a spinner / progress indicator to any terminal application.
Stars: ✭ 37 (-68.64%)
Mutual labels:  statusbar
Custom bubble navigation bar
A custom navigation bar with bubble click effect in Flutter
Stars: ✭ 104 (-11.86%)
Mutual labels:  navigationbar
Status Bar Compat
A compatible library for setting status bar color. Support MIUI, Flyme, EMUI3.1. 一行代码调用,布局零入侵。兼容小米,魅族,华为……
Stars: ✭ 984 (+733.9%)
Mutual labels:  statusbar
Evncustomsearchbar
🔍Born for iOS 11 and iPhone X SearchBar
Stars: ✭ 52 (-55.93%)
Mutual labels:  navigationbar
Customnavigationbarsample
Navigation Bar Customization in Xamarin Forms
Stars: ✭ 104 (-11.86%)
Mutual labels:  navigationbar
Fapanels
FAPanels - Swift
Stars: ✭ 850 (+620.34%)
Mutual labels:  statusbar
Status
A no-root status bar replacement for Android.
Stars: ✭ 113 (-4.24%)
Mutual labels:  statusbar
Spinner
Go (golang) package with 90 configurable terminal spinner/progress indicators.
Stars: ✭ 1,637 (+1287.29%)
Mutual labels:  statusbar
Efnavigationbar
An ordinary custom navigation bar.
Stars: ✭ 92 (-22.03%)
Mutual labels:  navigationbar
Ofxstatusbar
Addon for openFrameworks to add icons and text to the statusbar of Mac OS X (needs support - see readme)
Stars: ✭ 11 (-90.68%)
Mutual labels:  statusbar
Sofia
Android沉浸式效果的实现,状态栏和导航栏均支持设置颜色、渐变色、图片、透明度、内容入侵和状态栏深色字体;兼容竖屏、横屏,当屏幕旋转时会自动适配。
Stars: ✭ 1,206 (+922.03%)
Mutual labels:  statusbar
Bubble Navigation
🎉 [Android Library] A light-weight library to easily make beautiful Navigation Bar with ton of 🎨 customization option.
Stars: ✭ 1,537 (+1202.54%)
Mutual labels:  navigationbar

Maven Central License

🌖 Edge-to-Edge

In meanwhile, here is an Android library for enabling edge-to-edge content and insetting views using simple Kotlin DSL.

Getting Started

  1. Configure transparent colors of the status and navigation bars in res/values/styles.xml by extending a theme without the action bar like Theme.MaterialComponents.Light.NoActionBar or Theme.Design.Light.NoActionBar or similar.
<resources>
    <style name="AppTheme" parent="Theme.MaterialComponents.Light.NoActionBar">
        ...
        <item name="android:windowDrawsSystemBarBackgrounds">true</item>
        <item name="android:windowTranslucentStatus">false</item>
        <item name="android:windowTranslucentNavigation">false</item>
        <item name="android:statusBarColor">@color/statusBar</item>
        <item name="android:navigationBarColor">@color/navigationBar</item>
    </style>
    
    <color name="statusBar">@android:color/transparent</color>
    <color name="navigationBar">@android:color/transparent</color>
</resources>

☝️ Note that fully transparent navigation bar can cause contrast issues to the navigation icons for API level [23..29). Check Navigation Bar Transparency wiki page for more details.

  1. Remove android:fitSystemWindows attribute everywhere from layouts, if present.
  2. Fit top and bottom views of each fragment or activity as needed.
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
    super.onViewCreated(view, savedInstanceState)
    edgeToEdge {
        appbar.fit { Edge.Left + Edge.Top + Edge.Right }
        recycler.fit { Edge.Bottom }
    }
    ...
}

See sample app for more edge-to-edge examples.

Download

repositories {
    mavenCentral()
}
dependencies {
    implementation 'de.halfbit:edge-to-edge:<version>'
}

How

The library is implemented around WindowInsets class. Each time WindowInsets are dispatched through out the view hierarchy, the library fits views according to the declared fitting rules.

Edge-to-Edge library fits each view to one or more device edges by modifying its padding, margin or height attribute with the values taken from the current WindowInsets. Padding and margin attributes preserve their original values defined in layout and inset values are added to them. The library "auto-detects" the attrbitute to modify, which can be overridden by using fitPadding, fitMargin or fitHeight convenience functions.

Features

  • Easiness of use - padding, margin or height can be adjusted to any edge with a single line of code.
  • Convenient default parameters for common elements like recycler view, scroll view, floating actions button etc.
  • Ability to remove fitting rules, which comes handy when working with transitions in ConstraintLayout.
  • Demo app with edge-to-edge examples (any kind of contribution is welcome).

Similar libraries

License

Copyright 2020 Sergej Shafarenka, www.halfbit.de

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.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].