<commit_before># react-native-android-checkbox

A React Native checkbox using the stock android widget

![Checkbox Example App](./example/screencast.gif)

## Installation

#### Install the npm package

`npm install --save react-native-android-checkbox`

#### Import the java library from `node_modules/react-native-android-checkbox/android`

*android/settings.gradle*
```
include ':react-native-android-checkbox', ':app'

project(':react-native-android-checkbox').projectDir = new File(settingsDir, '../node_modules/react-native-android-checkbox/android')
```

Add the project to your gradle dependencies

*android/app/build.gradle*
```
apply plugin: 'com.android.application'

android {
  ...
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'com.facebook.react:react-native:+' // From node_modules
    compile project(':react-native-android-checkbox')
}

```

Add the package to your ReactInstanceManager

*MainActivity.java*
```java

//import package (usually, your IDE will do this for you)
import com.mikemonteith.reactnativeandroidcheckbox.CheckboxPackage;

// ...

/**
* A list of packages used by the app. If the app uses additional views
* or modules besides the default ones, add more packages here.
*/
@Override
protected List<ReactPackage> getPackages() {
	return Arrays.<ReactPackage>asList(
		new MainReactPackage(),
		new CheckboxPackage() // <-- add this line
	);
}

// ...
```

## Basic Usage

The checkbox component works in exactly the same way as React.Switch

```js
var React = require('react-native');
var Checkbox = require('react-native-android-checkbox');

class ExampleComponent extends React.Component {
  constructor() {
    super()
    this.state = {
      value: false
    }
  }

  render() {
    return (
      <Checkbox
        value={this.state.value}
        disabled={false}
        onValueChange={(value) => {
          this.setState({ value })
        }}
      />
    )
  }
}
```<commit_msg>Update README to recommend react-native link<commit_after># react-native-android-checkbox

A React Native checkbox using the stock android widget

![Checkbox Example App](./example/screencast.gif)

## Installation

#### Install the npm package

`npm install --save react-native-android-checkbox`

#### Link the android library

`react-native link react-native-android-checkbox`

## Basic Usage

The checkbox component works in exactly the same way as React.Switch

```js
import React from 'react'
import Checkbox from 'react-native-android-checkbox'

class ExampleComponent extends React.Component {
  constructor() {
    super()
    this.state = {
      value: false
    }
  }

  render() {
    return (
      <Checkbox
        value={this.state.value}
        disabled={false}
        onValueChange={(value) => {
          this.setState({ value })
        }}
      />
    )
  }
}
```
{'fraction_non_alphanumeric': 0.1302549965541006, 'fraction_numerical': 0.0017229496898690559, 'mean_word_length': 3.4388379204892967, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3559285', 'n_tokens_mistral': 872, 'n_tokens_neox': 842, 'n_words': 231}