3.6.0 • Published 2 years ago

rn-android-autocompletetextview v3.6.0

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Auto Complete Text View

This is a module for accessing Native Android AutoCompleteTextView.

Note : Please note that this module has been written based on one particular project requirement. It might not have support of special functionalities you want. In such cases feel free to open an issue. I will add the support at earliest.

Installation (using npm)

  1. Run npm install rn-android-autocompletetextview --save.
  2. Add the following lines in your android/settings.gradle
      include ':rn-android-autocompletetextview'
      project(':rn-android-autocompletetextview').projectDir = file("../node_modules/rn-android-autocompletetextview/android")
  3. Add the following dependency in android/app/build.gradle
      dependencies {
        compile project(':rn-android-autocompletetextview')
        ...
      }
  4. Open MainApplication or ReactApplication located at android/app/src/main/java/com/<your package name>/ and add following packager
      new RNAutocompleteTextViewPackage()
like this

```
  @Override
  protected List<ReactPackage> getPackages() {
      return Arrays.<ReactPackage>asList(
              new MainReactPackage(),
              new RNAutocompleteTextViewPackage()
      );
  }
```
and import the following dependency

```
import com.reactlibrary.RNAutocompleteTextViewPackage;
```
  1. USAGE:

    import { AutoCompleteTextView } from 'rn-android-autocompletetextview';
    
    const items = [
      {firstName: 'Bob', lastName: 'Smith},
      {firstName: 'John', lastName: 'Jones},
    ];
    
    const onDropdownClick = (position: number) => {
      const selectedItem = items[position];
      // Do something with item
    };
    
    render() {
      ...
        <AutoCompleteTextView
          style={{ flex: 1, flexDirection: 'row', height: 60, alignSelf: 'stretch' }}
          dataSource={items}
          itemFormat={'${firstName} ${lastName}'}
          value={value}
          onChangeText={(text)=>console.log(text)}
          showDropDown={false}
          hint={'My Hint'}
          onItemClick={onDropdownClick}
          fontSize={14}
          fontColor={'#000000'}
          borderColor={'#000000'}
        />
        ...
    }
  2. Run application using react-native run-android command

3.4.0

2 years ago

3.3.0

2 years ago

3.6.0

2 years ago

3.5.0

2 years ago

3.2.0

2 years ago

3.1.0

2 years ago

3.0.1

3 years ago

3.0.0

3 years ago

2.2.0

3 years ago

2.0.19

3 years ago

2.1.0

3 years ago

2.0.18

3 years ago

2.0.17

3 years ago

2.0.16

3 years ago

2.0.15

3 years ago

2.0.14

3 years ago

2.0.13

3 years ago

2.0.12

3 years ago

2.0.11

3 years ago

2.0.10

3 years ago

2.0.9

3 years ago

2.0.8

3 years ago

2.0.7

3 years ago

2.0.6

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago