Skip to content

NathanWalker/nativescript-swiss-army-knife

 
 

Repository files navigation

nativescript-swiss-army-knife

A repo for all those functions you copy and paste between projects.

#Common Functions pluckChildViewsFromLayout accepts any layout and removes all it's child views and returns them in an array.

getScreenHeight returns an object of type IScreenHeight with the properties portrait and landscape dimensions.

  • ActionBar Utilities

actionBarSetTitle Programmatically set title on ActionBar

actionBarAddButton Programmatically add button to the ActionBar

actionBarClearButtons Programmatically remove all buttons from the ActionBar

#Android specific functions setAndroidStatusBarTranslucentFlag sets the Android statusbar to translucent Android Documentation

resetAndroidStatusBarTranslucentFlag resets the Translucent Android statusbar flag.

setAndroidNavBarTranslucentFlag sets the Android navigation bar to translucent Android Documentaion

resetAndroidNavBarTranslucentFlag resets the Translucent Android navigation bar flag.

#iOS specific functions

actionBarHideBackButton Programmatically hide the back button from the ActionBar

actionBarSetStatusBarStyle Programmatically remove all buttons from the ActionBar

###Plugin Development Work Flow:

  • Clone repository to your machine.
  • Run npm run setup to prepare the demo project
  • Build with npm run build
  • Run and deploy to your device or emulator with npm run demo.android or npm run demo.ios

##Contributing guidelines Contributing guidelines

MIT

for {N} version 2.0.0+

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 95.2%
  • CSS 4.8%