Skip to content

Application to show how to use Ceylon in Android

License

Notifications You must be signed in to change notification settings

leomindez/TimesLon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
Feb 18, 2017
Oct 21, 2016
Feb 20, 2017
Oct 4, 2016
Oct 4, 2016
Oct 4, 2016
Feb 18, 2017
Oct 11, 2016
Oct 4, 2016
Oct 4, 2016
Oct 4, 2016
Oct 18, 2016
Oct 4, 2016

Repository files navigation

TimesLon

Example to create a simple Android App using Ceylon Lang

Requirements

  • Ceylon 1.3.x
  • Intellij Plugin
  • Android Studio

Union Types

Using union types can create a single response from server

void response ( Anything(Error | Response? ) response);

Mixin Inheritance

Using interface to be able create interfaces with methods without implementation or implemented methods

shared interface View {
  shared formal void printError(String message);
  shared default void showResult(Result result) {
    print(result.string);
  }
}

Object declaration

Be able to object declaration to create a simple server config

shared object serverconfig {
    shared String baseUrl = "https://androidrules.com";
}

Callable Functions

Be able to create callable functions to replace callback interfaces

  function response(Response response) => print(response.string);