This file contains hidden or 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 { useState } from 'react'; | |
| import { Button, StyleSheet, Text, View } from 'react-native'; | |
| import * as Calendar from 'expo-calendar'; | |
| export default function App() { | |
| const [log, setLog] = useState('Press a button.'); | |
| async function firstWritableCalendarId() { | |
| const { status } = await Calendar.requestCalendarPermissionsAsync(); | |
| if (status !== 'granted') throw new Error('Calendar permission denied'); |
This file contains hidden or 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
| override fun onViewCreated(view: View?, savedInstanceState: Bundle?) { | |
| viewPagerAdapter = MLPagedScrollAdapter(childFragmentManager, fragments) | |
| fragmentViewPager = viewPager!! | |
| fragmentViewPager.addOnPageChangeListener(object : ViewPager.OnPageChangeListener { | |
| override fun onPageScrollStateChanged(state: Int) { | |
| viewPager.scrollState = state | |
| } |
This file contains hidden or 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
| /build |