# SystemBarTint **Repository Path**: HarmonyOS-tpc/SystemBarTint ## Basic Information - **Project Name**: SystemBarTint - **Description**: Apply background tinting to the openharmony system UI - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 1 - **Created**: 2021-04-15 - **Last Updated**: 2023-04-17 ## Categories & Tags **Categories**: harmonyos-notification **Tags**: None ## README ## openharmony System Bar Tint ## Introduction Apply background tinting to the openharmony system UI The Tint styles are great for wallpaper based activities like the home screen launcher, but the minimal background protection provided makes them less useful for other types of activity unless you supply your own backgrounds inside your layout. Determining the size, position and existence of the system UI for a given device configuration can be non-trivial. This library offers a simple way to create a background "tint" for the system bars using color value. ### Features Supports Setting tint color to Systembar using openharmony Color. Supports Setting tint color to Navigationbar using openharmony Color. ## Usage Instructions To enable the tint: ``` @Override public void onStart(Intent intent) { super.onStart(intent); super.setUIContent(layout); // create our manager instance after the content view is set SystemBarTintManager tintManager = new SystemBarTintManager(this); // enable status bar tint tintManager.setStatusBarTintEnabled(true); // enable navigation bar tint tintManager.setNavigationBarTintEnabled(true); } ``` To provide custom tint color values or drawables: ``` // set a custom tint color for all system bars ( for example RED color to Systembar and Navigation bar) tintManager.setTintColor( ohos.agp.utils.Color.RED.getValue()); ``` ## Installation Instructions Method 1: Generate .har package from library and add it to lib folder. add following code to gradle of entry ``` implementation fileTree(dir: 'libs', include: ['*.jar', '*.har']) ``` Method 2: ``` allprojects{ repositories{ mavenCentral() } } implementation 'io.openharmony.tpc.thirdlib:SystemBarTint:1.0.1' ``` ## LICENSE Copyright 2013 readyState Software Limited 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.