This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
res/values/dimens.xml(default) | |
res/values-ldpi/dimens.xml (240x320 and nearer resolution) | |
res/values-mdpi/dimens.xml (320x480 and nearer resolution) | |
res/values-hdpi/dimens.xml (480x800, 540x960 and nearer resolution) | |
res/values-xhdpi/dimens.xml (720x1280 - Samsung S3, Micromax Canvas HD, etc) | |
res/values-xxhdpi/dimens.xml (1080x1920 - Samsung S4, HTC one, etc) | |
res/values-large/dimens.xml (480x800) | |
res/values-large-mdpi/dimens.xml (600x1024) | |
res/values-sw600dp/dimens.xml (600x1024) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createContext, useContext, useState } from 'react' | |
interface IContextSession { | |
name: string | |
token: string | |
} | |
interface IContextProps { | |
session?: IContextSession | |
login: () => Promise<void> | |
logout: () => Promise<void> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState, useRef, useEffect } from 'react'; | |
import { | |
Text, | |
InteractionManager, | |
} from 'react-native'; | |
export default function App() { | |
const [screenLoading, setScreenLoading] = useState(true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState } from 'react' | |
import { StyleSheet, TouchableOpacity, View, Text, Alert } from 'react-native' | |
import RNFS from 'react-native-fs' | |
const perc2color = (perc: number) => { | |
var r, g, b = 0 | |
if (perc < 50) { | |
r = 255 | |
g = Math.round(5.1 * perc) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import InAppReview from 'react-native-in-app-review' | |
if (InAppReview.isAvailable()) { | |
InAppReview.RequestInAppReview() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const perc2color = (perc: number) => { | |
var r, g, b = 0; | |
if (perc < 50) { | |
r = 255; | |
g = Math.round(5.1 * perc); | |
} | |
else { | |
g = 255; | |
r = Math.round(510 - 5.10 * perc); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Geolocation from "react-native-geolocation-service"; | |
const getCurrentLatLong = async () => { | |
const opt = { | |
// timeout:INFINITY, | |
// maximumAge:INFINITY, | |
// accuracy: { ios: "hundredMeters", android: "balanced" }, | |
// enableHighAccuracy: false, | |
// distanceFilter:0, | |
showLocationDialog: true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Links: | |
https://github.com/MicrosoftDocs/windows-itpro-docs/blob/public/windows/configuration/kiosk-xml.md | |
https://learn.microsoft.com/en-us/windows/configuration/lock-down-windows-10-to-specific-apps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var excelDate = 44811; | |
var unixTimestamp = (excelDate - 25569) * 86400000 //as per the post above, convert Excel date to unix timestamp, assuming Mac/Windows Excel 2011 onwards | |
var date = moment(unixTimestamp); //Pass in unix timestamp instead of Excel date | |
var dateWithNewFormat = date.format('DD.MM.YYYY HH:mm'); | |
console.log(dateWithNewFormat); //07-Eyl-2022 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState } from "react"; | |
import { View, Button } from "react-native"; | |
import { Audio } from "expo-av"; | |
const App = () => { | |
const [recording, setRecording] = useState<Audio.Recording>(); | |
const startRecording = async () => { | |
try { | |
console.log("Requesting permissions.."); |
NewerOlder