
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
react-native-wheel
Advanced tools
the android wheel view for react-native component
npm install --save react-native-wheel
// file: android/settings.gradle
...
include ':reactwheelview', ':app'
project(':reactwheelview').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-wheel')
// if there are more library
// include ':app' , ':libraryone' , ':librarytwo' , 'more...'
// project(':libraryonename').projectDir = new File(rootProject.projectDir, '../node_modules/libraryonemodule')
// project(':librarytwoname').projectDir = new File(rootProject.projectDir, '../node_modules/librarytwomodule')
// more..
// file: android/app/build.gradle
...
dependencies {
...
compile project(':reactwheelview')
}
...
import com.heng.wheel.WheelPackage;
public 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 WheelPackage()) // register wheel package
.setUseDeveloperSupport(BuildConfig.DEBUG)
.setInitialLifecycleState(LifecycleState.RESUMED)
.build();
mReactRootView.startReactApplication(mReactInstanceManager, "AwesomeProject", null);
setContentView(mReactRootView);
}
...
// file: index.android.js
var React = require('react-native');
var WheelView = require('react-native-wheel');
var { AppRegistry,StyleSheet,Text,View,ToastAndroid } = React;
var wheelData = ['one','two','three','four','five','six','seven','eight','nine','ten'];
var AwesomeProject = React.createClass({
onItemChange(index){
ToastAndroid.show('select item : ' + wheelData[index],ToastAndroid.SHORT);
},
render: function() {
return (
<View style={styles.container}>
<WheelView
style={styles.wheelview}
onItemChange={this.onItemChange}
values={wheelData}
isLoop={true}
selectedIndex={0}
textSize={17}
/>
</View>
);
}
});
var styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
wheelview: {
width: 120,
height: 300
},
});
AppRegistry.registerComponent('AwesomeProject', () => AwesomeProject);
android {
compileSdkVersion 23 //@
buildToolsVersion "23.0.1" //@
defaultConfig {
minSdkVersion 16
targetSdkVersion 23 //@
}
}
dependencies {
compile 'com.facebook.react:react-native:0.15.+' //@
}
// modify the above @ value not higher than you project value
##Reference https://github.com/weidongjian/androidWheelView
FAQs
android wheel view for react-native
The npm package react-native-wheel receives a total of 23 weekly downloads. As such, react-native-wheel popularity was classified as not popular.
We found that react-native-wheel demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.