Skip to content

Instantly share code, notes, and snippets.

🎯
Busy

Nazır Doğan nazrdogan

🎯
Busy
Block or report user

Report or block nazrdogan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View stacknavgoingback.js
import React from "react";
import { View, Text } from "react-native";
import { Button } from 'react-native-paper';
import { createStackNavigator, createAppContainer,withNavigation} from "react-navigation";
class HomeScreen extends React.Component {
render() {
return (
<View style={{ flex: 1, alignItems: "center", justifyContent: "center" }}>
<Button mode="contained" onPress={() => this.props.navigation.navigate("Detail") }> Child Detaya Git</Button>
View withNavigationStack.js
import React from "react";
import { View, Text } from "react-native";
import { Button } from 'react-native-paper';
import { createStackNavigator, createAppContainer,withNavigation} from "react-navigation";
class HomeChild extends React.Component {
render() {
return (
<View style={{ flex: 1, alignItems: "center", justifyContent: "center" }}>
View withNavigation.js
import React from 'react';
import { Button } from 'react-native';
import { withNavigation } from 'react-navigation';
class MyBackButton extends React.Component {
render() {
return <Button title="Back" onPress={() => { this.props.navigation.goBack() }} />;
}
}
View childnavigation.js
import React from "react";
import { View, Text } from "react-native";
import { Button } from 'react-native-paper';
import { createStackNavigator, createAppContainer } from "react-navigation";
class HomeChild extends React.Component {
render() {
return (
<View style={{ flex: 1, alignItems: "center", justifyContent: "center" }}>
View navigationscreen.js
import React from "react";
import { View, Text } from "react-native";
import { Button } from 'react-native-paper';
import { createStackNavigator, createAppContainer } from "react-navigation";
class HomeScreen extends React.Component {
render() {
return (
<View style={{ flex: 1, alignItems: "center", justifyContent: "center" }}>
<Button mode="contained" onPress={() => this.props.navigation.navigate("Detail") }>Detaya Git</Button>
View hellonavigation.js
import React from "react";
import { View, Text } from "react-native";
import { createStackNavigator, createAppContainer } from "react-navigation";
class HomeScreen extends React.Component {
render() {
return (
<View style={{ flex: 1, alignItems: "center", justifyContent: "center" }}>
<Text>Home Screen</Text>
</View>
View MainActivity.java
package com.reactnavigation.example;
import com.facebook.react.ReactActivity;
+ import com.facebook.react.ReactActivityDelegate;
+ import com.facebook.react.ReactRootView;
+ import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
public class MainActivity extends ReactActivity {
@Override
View nav.js
import React from "react";
import PropTypes from "prop-types";
import { connect } from "react-redux";
import {
addNavigationHelpers,
StackNavigator,
TabNavigator
} from "react-navigation";
/*
View print.js
saveCanvasImage() {
var dataUrl = this.canvasElement.toDataURL();
var imageData = this.canvasElement.toDataURL('image/jpeg').replace(/^data:image\/(png|jpg|jpeg);base64,/, ""); //remove mimetype
window["DatecsPrinter"].printImage(
imageData, //base64
canvas.width,
canvas.height,
1,
function() {
console.log("Printed");
View printer.js
window["DatecsPrinter"].listBluetoothDevices(
function (devices) {
window["DatecsPrinter"].connect(devices[0].address,
function() {
printSomeTestText();
},
function(error) {
alert(JSON.stringify(error));
}
);
You can’t perform that action at this time.