Coder Social home page Coder Social logo

toolbar-android's Introduction

@react-native-community/toolbar-android

CircleCI Status Supports Android MIT License npm version Lean Core Extracted

What is it?

A React component that wraps the Android-only Toolbar widget.

This is extracted from react-native per lean core initiative, which removed ToolbarAndroid at v0.61. The goal of this repo is to house the original component and continue to improve and maintain a lean wrapper with zero dependency other than react and react-native.

Alt text

Getting started

yarn add @react-native-community/toolbar-android

or

npm install @react-native-community/toolbar-android --save

Mostly automatic installation

From react-native >= 0.60 autolinking will take care of the link, just don't forget to run pod install after adding this pakage

for react-native =< 0.59.X

react-native link @react-native-community/toolbar-android

Manual installation

Manually link the library on Android

android/settings.gradle

include ':react-native-community-toolbar-android'
project(':react-native-community-toolbar-android').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/toolbar-android/android')

android/app/build.gradle

dependencies {
   ...
   implementation project(':react-native-community-toolbar-android')
}

android/app/src/main/.../MainApplication.java

On top, where imports are:

import com.reactnativecommunity.toolbarandroid.ReactToolbarPackage;

Add the toolbar-android class to your list of exported packages.

@Override
protected List<ReactPackage> getPackages() {
    return Arrays.asList(
            new MainReactPackage(),
            new ReactToolbarPackage()
    );
}

Migrating from the core react-native module

This module was created when the ToolbarAndroid was split out from the core of React Native. To migrate to this module you need to follow the installation instructions above and then change you imports from:

import { ToolbarAndroid } from 'react-native';

to:

import ToolbarAndroid from '@react-native-community/toolbar-android';

Usage

see ToolbarAndroid

Contributors

This module was extracted from react-native core.

License

The library is released under the MIT licence. For more information see LICENSE.

toolbar-android's People

Contributors

connectdotz avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.