LightningUi

UI module of the Storm Framework

License

License

Categories

Categories

IDE Development Tools ORM Data
GroupId

GroupId

com.3sidedcube.storm
ArtifactId

ArtifactId

ui
Last Version

Last Version

0.2
Release Date

Release Date

Type

Type

aar
Description

Description

LightningUi
UI module of the Storm Framework
Project URL

Project URL

https://github.com/3sidedcube/Android-LightningUi.git
Source Code Management

Source Code Management

https://github.com/3sidedcube/Android-LightningUi.git

Download ui

How to add to project

<!-- https://jarcasting.com/artifacts/com.3sidedcube.storm/ui/ -->
<dependency>
    <groupId>com.3sidedcube.storm</groupId>
    <artifactId>ui</artifactId>
    <version>0.2</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/com.3sidedcube.storm/ui/
implementation 'com.3sidedcube.storm:ui:0.2'
// https://jarcasting.com/artifacts/com.3sidedcube.storm/ui/
implementation ("com.3sidedcube.storm:ui:0.2")
'com.3sidedcube.storm:ui:aar:0.2'
<dependency org="com.3sidedcube.storm" name="ui" rev="0.2">
  <artifact name="ui" type="aar" />
</dependency>
@Grapes(
@Grab(group='com.3sidedcube.storm', module='ui', version='0.2')
)
libraryDependencies += "com.3sidedcube.storm" % "ui" % "0.2"
[com.3sidedcube.storm/ui "0.2"]

Dependencies

compile (9)

Group / Artifact Type Version
net.callumtaylor : asynchttpclient jar 1.5
com.android.support » support-annotations jar 21.0.+
com.nostra13.universalimageloader : universal-image-loader jar 1.9.3
com.3sidedcube.storm : util jar 0.2
org.projectlombok : lombok jar 1.14.8
com.google.code.gson : gson jar 2.3
Storm.Libraries.LightningUi.Libraries.ExoPlayer » library jar unspecified
com.android.support » appcompat-v7 jar 21.0.+
com.android.support » support-v13 jar 21.0.+

Project Modules

There are no modules declared in this project.

#Storm Library - Module UI

Storm is a collection of libraries that helps make mobile and desktop applications easy to create using a high quality WYSIACATWYG editor.

This module's purpose is to take a structured collection of JSON files, parse them into POJO objects and render them to the UI using their respective corresponding views.

#Usage

##Gradle

Simply include the following for your gradle dependencies com.3sidedcube.storm:ui:0.2.

Note The versioning of the library will always be as follows:

Major version.Minor version.Bug fix

It is safe to use + in part of of the Bug fix version, but do not trust it 100%. Always use a specific version to prevent regression errors.

##Code

In your application singleton, add the following code

UiSettings uiSettings = new UiSettings.Builder(this).build();

// Loading app json
String appUri = "assets://app.json";
App app = UiSettings.getInstance().getViewBuilder().buildApp(Uri.parse(appUri));

if (app != null)
{
    UiSettings.getInstance().setApp(app);
}

Then in your entry activity add the following code

Intent start = UiSettings.getInstance().getIntentFactory().getIntentForPageUri(this, Uri.parse(UiSettings.getInstance().getApp().getVector()));

if (start != null)
{
	startActivity(start);
}

This will use the vector string in your App.json to determine what page to load initially.

There are many options in the UiSettings object that allows you to override specific parts of the module.

##Language

In order to support the use of the Language module, you must include the following code for your UiSettings Builder

.textProcessor(new TextProcessor()
{
    @Nullable @Override public String process(@Nullable TextProperty textProperty)
    {
        return new LanguageTextProcessor().process(super.process(textProperty));
    }
})

#Documentation

See the Javadoc for full in-depth code-level documentation

#Contributors

Callum Taylor (9A8BAD), Tim Mathews (5C4869), Matt Allen (DB74F5), Alan Le Fournis (067EA0)

#License

See LICENSE.md

com.3sidedcube.storm

3 SIDED CUBE

We're an app development and digital product company that specialises in tech for good.

Versions

Version
0.2
0.1a