Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lwhiteley/react-native-android-iconify
icons for react-native android using android-iconify
https://github.com/lwhiteley/react-native-android-iconify
Last synced: 2 days ago
JSON representation
icons for react-native android using android-iconify
- Host: GitHub
- URL: https://github.com/lwhiteley/react-native-android-iconify
- Owner: lwhiteley
- License: mit
- Created: 2015-09-28T00:38:02.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-19T16:26:29.000Z (about 8 years ago)
- Last Synced: 2025-01-08T20:26:38.654Z (17 days ago)
- Language: Java
- Homepage: https://www.npmjs.com/package/react-native-android-iconify
- Size: 11.7 KB
- Stars: 32
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-react-native - react-native-android-iconify ★30 - icons for react native android using android-iconify (Components / UI)
- awesome-reactnative-ui - react-native-android-iconify - native android using android-iconify|<ul><li>Last updated : 1 year ago</li><li>Stars : 31</li><li>Open issues : 1</li></ul>|![]()| (Others)
- awesome-react-native - react-native-android-iconify ★30 - icons for react native android using android-iconify (Components / UI)
- awesome-reactnative-ui - react-native-android-iconify - native android using android-iconify|<ul><li>Last updated : 1 year ago</li><li>Stars : 31</li><li>Open issues : 1</li></ul>|![]()| (Others)
- awesome-react-native - react-native-android-iconify ★30 - icons for react native android using android-iconify (Components / UI)
- awesome-react-native-ui - react-native-android-iconify ★31 - icons for react native android using android-iconify (Components / UI)
- awesome-react-native - react-native-android-iconify ★30 - icons for react native android using android-iconify (Components / UI)
README
# react-native-android-iconify
icons for react native android using android-iconify## Installation and How to use
#### Step 1 - NPM Install
```shell
npm install --save react-native-android-iconify
```
#### Step 2 - Update Gradle Settings```gradle
// file: android/settings.gradle
...include ':reacticonify', ':app'
project(':reacticonify').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-android-iconify/app')
```#### Step 3 - Update Gradle Build
```gradle
// file: android/app/build.gradle
...dependencies {
...
compile project(':reacticonify')
}
```#### Step 4 - Register React Package
```java
...
import com.lwhiteley.reacticonify.ReactIconifyPackage; // importpublic class MainActivity extends Activity implements DefaultHardwareBackBtnHandler {
private ReactInstanceManager mReactInstanceManager;
private ReactRootView mReactRootView;@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mReactRootView = new ReactRootView(this);
mReactInstanceManager = ReactInstanceManager.builder()
.setApplication(getApplication())
.setBundleAssetName("index.android.bundle")
.setJSMainModuleName("index.android")
.addPackage(new MainReactPackage())
.addPackage(new ReactIconifyPackage()) // register react iconify package here
.setUseDeveloperSupport(BuildConfig.DEBUG)
.setInitialLifecycleState(LifecycleState.RESUMED)
.build();
mReactRootView.startReactApplication(mReactInstanceManager, "AwesomeProject", null);
setContentView(mReactRootView);
}
...```
#### Step 5 - Require and use in Javascript
```js
// file: index.android.jsvar React = require('react-native');
var { IconTextView } = require('react-native-android-iconify');
var { AppRegistry,StyleSheet,Text,View } = React;var AwesomeProject = React.createClass({
render: function() {
return (
);
}
});var styles = StyleSheet.create({
icon: {
width:40,
height:40,
fontSize:40,
color:'#0066FF',
},
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
}
});AppRegistry.registerComponent('AwesomeProject', () => AwesomeProject);
```## Credits
- [android-iconify](https://github.com/JoanZapata/android-iconify)
## Notes
- only IconTextView was implemented so far, will implement the other widgets shortly
- all available icon modules of [android-iconify](https://github.com/JoanZapata/android-iconify) were included
- as seen above font size and color are controlled by css, all other features of [android-iconify](https://github.com/JoanZapata/android-iconify) remain the same
- Please report any issues or send patches to get fixes in