1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/HarmonyOS-tpc-SystemBarTint

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
Внести вклад в разработку кода
Синхронизировать код
Отмена
Подсказка: Поскольку Git не поддерживает пустые директории, создание директории приведёт к созданию пустого файла .keep.
Loading...
README.md

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.

Комментарии ( 0 )

Вы можете оставить комментарий после Вход в систему

Введение

Описание недоступно Развернуть Свернуть
Apache-2.0
Отмена

Обновления

Пока нет обновлений

Участники

все

Недавние действия

Загрузить больше
Больше нет результатов для загрузки
1
https://api.gitlife.ru/oschina-mirror/HarmonyOS-tpc-SystemBarTint.git
git@api.gitlife.ru:oschina-mirror/HarmonyOS-tpc-SystemBarTint.git
oschina-mirror
HarmonyOS-tpc-SystemBarTint
HarmonyOS-tpc-SystemBarTint
master