Screenplay


Source link: https://github.com/weefbellington/screenplay

Questions or just want to say hello? Try our Gitter chat!   

Don't forget about the wiki. If you're coming from an older version, check out the CHANGELOG.

===================================================================================== ++++++ SCREENPLAY + A minimalist, View-based application framework for Android ++++++ ===================================================================================== 

####What is it?

Screenplay is a lightweight Android framework for building applications without the need for Fragments or multiple Activities. Its feature set is small by design: Screenplay is only concerned with swapping views on the screen and playing animations between them.

Screenplay provides the following toolkit:

  • the Screenplay object: a controller that automatically attaches and detaches Views from the screen in response to navigation events
  • the Stage interface: defines a screen. Stages can be configured to be full-screen or display above other screens (like a dialog)
  • the Stage.Rigger interface: applies animated transitions to a screen
  • the Stage.Component interface: used to apply behavior to screen on attach/detach events

Several implementations for the Stage, Stage.Rigger and Stage.Component are also provided out-of-the-box:

  • XMLStage: a stage that inflates views from an XML layout file
  • TweenRigger: animates screen transitions from an XML animation files
  • AnimatorRigger: animates screen transitions with an android.animation.Animator
  • InstanceStateComponent: saves view state when a screen is detached and restores it on reattach

Additionally, Screenplay provides plugin support. The current plugins are:

  • Flow plugin: provides a Flow.Dispatcher that allows screenplay to respond to Flow navigation events. See the wiki page for more info.

####Your best friend, the wiki

The main screenplay documentation has moved to the wiki. Start with the table of contents or core features.

####Show me the code!

Want to dive in?

The sample project is probably the easiest place to start. Here you will find a minimally complex Screenplay application which showcases some of its features.

Clicking too hard?

Good news! Here is some sample code you can just scroll through.

public class ExampleStage extends Stage {

private final ExampleApplication application;
  private final Rigger rigger;

public ExampleStage(ExampleApplication application) {

rigger = new CrossfadeRigger(application);

addComponents(new ClickBindingComponent());

  
}

@Override
  public int getLayoutId() {

return R.layout.example_scene;
  
}

@Override
  public Rigger getRigger() {

return rigger;
  
}

private class ClickBindingComponent implements Component {

@Override

public void afterSetUp(Stage stage, boolean isInitializing) {

 View parent = stage.getView();

 View nextButton = parent.findViewById(R.id.next);

 nextButton.setOnClickListener(showNextStage);

}

 @Override

public void beforeTearDown(Stage stage, boolean isFinishing) {

}

 private View.OnClickListener showNextStage = new View.OnClickListener() {

 @Override

 public void onClick(View v) {

  // add a new scene to the history and trigger a transition

  Flow flow = application.getMainFlow();

  flow.set(new NextStage(application));

 
}

}
;
  
}
 
}

####Downloads

Screenplay is available via Maven from the jcenter repo.

#####Main project download

Use Maven to add Screenplay to your project:

<dependency>
  <groupId>com.davidstemmer.screenplay</groupId>
  <artifactId>screenplay</artifactId>
  <version>1.0.2</version> </dependency>

or Gradle:

compile 'com.davidstemmer.screenplay:screenplay:1.0.2'

#####Flow plugin download

The flow-plugin provides a ScreenplayDispatcher that allows you to use Flow to manage the backstack. The version is pegged to the most recent version of Flow. Use maven to add it to your project:

<dependency>
  <groupId>com.davidstemmer.screenplay</groupId>
  <artifactId>flow-plugin</artifactId>
  <version>0.12</version> </dependency>

or Gradle:

compile 'com.davidstemmer.screenplay:flow-plugin:0.12'

####Contributing

Contributions are welcome! Please open an issue in the github issue tracker to discuss bugs and new feature requests. For simple questions, try our live chat on Gitter: https://gitter.im/weefbellington/screenplay.

####Acknowledgements

Many thanks to the team at Square for their support of the open-source community, without which this project wouldn't be possible. Thanks especially to the team at Square for creating Flow, which was the original inspiration for this project.

Thanks to the Android Arsenal to adding Screenplay to their tool library. If you like Screenplay, please feel free to the badge to your site. Ignore this directive if you hate badges.

Resources

You can use this library to create your calendar, customizing UI and behaviour.

Features

  • Custom header (should be implemented by the user);
  • Custom sub view (month name by default);
  • Custom weekly days view;
  • Custom date view;
  • Possibility to implement selection on day click;
  • Possibility to implement weekly day calculation;
  • Receive updates of Calendar (with AUCalendar);
  • Every change to AUCalendar is notified and automatically refreshes UI;

A library to download Youtube video as mp3 files.

When we use startActivityForResult(), we have to receive result/data in onActivityResult().

This is very complex and inconvenience to us.

Simple, elegant, beautiful, material design based Android music player.

While developing features we get crashes and if device is not connected to logcat we miss the crash log. In worst case scenario we might not be able to reproduce the crash and endup wasting effort. This library captures all unhandled crashes and saves them locally on device. I found a problem with other libraries that they capture crashes and then uploads them to server and then crashes are shown in their online Dashboards but sometimes few crashes don't logged to server. That's the purpose of this library use it as a debug feature to capture crashes locally and immediately.

API Calling Flow is a Android library which can help you to simplify handling different conditions while calling an API (Web Service) in Android.

Features

  • Internal Network State Checking.
  • On screen Setting's shortcuts to enable Wi-FI or Mobile Data.
  • Hide unloaded screen during API call and show progress bar with white or transparent background.
  • "Try Again" same API after enabling Network connection.
  • Call API only if the Network connection is enabled.
  • Remove progress bar after successfully loading data on screen.
  • Show full-screen errors to users while hiding unloaded screen from user for better user experience.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes