StatusBarUtil alternatives and similar packages
Based on the "Utility" category.
Alternatively, view StatusBarUtil alternatives based on common mentions on social networks and blogs.
-
timber
A logger with a small, extensible API which provides utility on top of Android's normal Log class. -
ExpirableDiskLruCache
Java implementation of a Disk-based LRU cache which specifically targets Android compatibility. -
Byte Buddy
Runtime code generation for the Java virtual machine. -
tape
A lightning fast, transactional, file-based FIFO for Android and Java. -
tray
a SharedPreferences replacement for Android with multiprocess support -
joda-time-android
Joda-Time library with Android specialization -
OpenKeychain
OpenKeychain is an OpenPGP implementation for Android. -
AutobahnAndroid
WebSocket & WAMP in Java for Android and Java 8 -
easydeviceinfo
:iphone: [Android Library] Get device information in a super easy way. -
Android-Templates-And-Utilities
Collection of source codes, utilities, templates and snippets for Android development. -
secure-preferences
Android Shared preference wrapper than encrypts the values of Shared Preferences. It's not bullet proof security but rather a quick win for incrementally making your android app more secure. -
greenrobot-common
General purpose utilities and hash functions for Android and Java (aka java-common) -
Androl4b
A Virtual Machine For Assessing Android applications, Reverse Engineering and Malware Analysis -
vector-compat
A support library for VectorDrawable and AnimatedVectorDrawable classes introduced in Lollipop -
CastCompanionLibrary-android
CastCompanionLibrary-android is a library project to enable developers integrate Cast capabilities into their applications faster and easier. -
android_dbinspector
Android library for viewing, editing and sharing in app databases. -
AndroidBillingLibrary
Android Market In-app Billing Library -
motion
An Android library allowing images to exhibit a parallax effect that reacts to the device's tilt -
Colours
A beautiful set of predefined colors and a set of color methods to make your Android development life easier. -
EasyCamera
Wrapper around the android Camera class that simplifies its usage -
MrVector
[Deprecated] AKA VectorDrawableCompat: A 7+ backport of VectorDrawable -
Reservoir
Android library to easily serialize and cache your objects to disk using key/value pairs. -
davdroid
DAVdroid – CalDAV/CardDAV synchronization for Android 4+ devices -
android-validation-komensky
A simple library for validating user input in forms using annotations. -
dspec
A simple way to define and render UI specs on top of your Android UI. -
routable-android
Routable, an in-app native URL router, for Android -
Treasure
Very easy to use wrapper library for Android SharePreferences -
RoboGif
A small utility to record Android device screen to a GIF -
GhostLog
Android app that displays the logcat buffer in a system overlay window
Appwrite - The Open Source Firebase alternative introduces iOS support
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of StatusBarUtil or a related project?
README
StatusBarUtil
招人广告:
字节跳动各业务线均可内推,可直接推我现在所在的部门 TikTok/抖音 业务线,提供以下服务:
- 简历修改
- 面试指导
- 进度跟进
欢迎看机会的人加我微信,也欢迎进行技术交流。
A util for setting status bar style on Android App. It can work above API 19(KitKat 4.4).
Sample
ChangeLog
[CLICK ME](CHANGE_LOG.md)
Usage
- Add the dependencies to your build.gradle file, StatusBarUtil is avaiable in JCenter:
compile 'com.jaeger.statusbarutil:library:1.5.1'
I fixed typo, change "statusbaruitl" to "statusbarutil", please notice this.
- Call method you need after
setContentView()
, such as :
setContentView(R.layout.main_activity);
...
StatusBarUtil.setColor(MainActivity.this, mColor);
- If you use this util in a page which containing a
DrawerLayout
, you need addandroid:fitsSystemWindows="true"
forDrawerLayout
in your layout XML:
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
...
</android.support.v4.widget.DrawerLayout>
- Set color for swipe back page
Recommend using with bingoogolapple/BGASwipeBackLayout-Android: Android Activity 滑动返回
StatusBarUtil.setColorForSwipeBack(Activity activity, @ColorInt int color, int statusBarAlpha)
All
statusBarAlpha
value you set should between 0 ~ 255How to use in Fragment, please read UseInFragmentActivity.java
Handle all Fragments in ViewPager as ImageViewFragment, add a fake View in your Fragment layout as StatusBar :
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<View
android:id="@+id/fake_statusbar_view"
android:layout_width="match_parent"
android:layout_height="@dimen/statusbar_view_height"
android:background="@color/colorPrimary"/>
<TextView
android:id="@+id/tv_title"
android:layout_width="match_parent"
android:layout_height="56dp"
android:background="@color/colorPrimary"
android:gravity="center"
android:text="@string/app_name"
android:textColor="@color/white"
android:textSize="24sp"/>
</LinearLayout>
The fake StatusBar View height value statusbar_view_height
defined in dimens.xml
~ values-v19/dimens.xml
<dimen name="statusbar_view_height">25dp</dimen>
~ values/dimens.xml
<dimen name="statusbar_view_height">0dp</dimen>
When you change StatusBarColor :
mFakeStatusBar.setBackgroundColor(color);
Then in the Activity which contains ViewPage, just invoke
StatusBarUtil.setTranslucentForImageViewInFragment(UseInFragmentActivity.this, null);
Please read UseInFragmentActivity.java
Features
- Set status bar color
StatusBarUtil.setColor(Activity activity, int color)
[](img/set_color.png)
- Set status bar translucent
StatusBarUtil.setTranslucent(Activity activity, int statusBarAlpha)
[](img/set_translucnet.png)
- Set status bar transparent
StatusBarUtil.setTransparent(Activity activity)
[](img/set_transparent.png)
- Set status bar color for
DrawerLayout
StatusBarUtil.setColorForDrawerLayout(Activity activity, DrawerLayout drawerLayout, int color)
[](img/set_color_for_drawer_layout.png)
- Set translucent status bar for using ImageView as head view page
StatusBarUtil.setTranslucentForImageView(Activity activity, int statusBarAlpha, View needOffsetView)
[](img/set_for_image_view_page.png)
- Set Light or Dark mode
StatusBarUtil.setLightMode(Activity activity)
StatusBarUtil.setDarkMode(Activity activity)

- Use in fragment
[](img/use_in_fragment.gif)
- Set color for swipe back page
StatusBarUtil.setColorForSwipeBack(Activity activity, @ColorInt int color, int statusBarAlpha)

- Pass statusBarAlpha param when necessary to change your status bar alpha, which is 112 by default.
License
Copyright 2016 Jaeger Chen
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 all licence references and agreements mentioned in the StatusBarUtil README section above
are relevant to that project's source code only.