Skip to content

Commit

Permalink
New Release (#140)
Browse files Browse the repository at this point in the history
* Allow html container video autoplay + gradle upgrade + api min version upgrade to 17

* Support html video inline play for background html container

* Correct data-uri handling for images

* Fix $geo.get -> Should be only triggered once

* readme update

* Replace useless “Error” messages with more informative warning messages

* Fix Map component event handling for render

* Fixes OAuth action doubling up on some query params

* Add “title” attribute to $util.picker

* Support JSONArray when reading JSON

* Local Mixin + Local $require

* Local Image Support + Menu Image fix + Gif fix

1. Local image support

- Image/Button component
- background
- layer
- menu
- tabs

2. fixed the bug where an image menu item was not being displayed when there's a badge.

3. Gif fix
Glide doesn't handle Gifs properly when not using disk cache strategy. With this fix, Gif images load properly

* $audio.play should trigger pause if already playing

* Add $back action

* $global.set + $global.reset

* $env

* Added $env.device.language

* Template engine fix. See iOS counterpart: Jasonette/JASONETTE-iOS#224

* support data-url scheme for images (only normal cases)

* Support loading.json

* Support loading.json (continued)

* Support $env.view.url

* background color fix

* offline.json support

* Bug fix

* Updated policy for $show and $load

* Only trigger if an action is not empty

* Fix #104: Crop background

When you put a background image to your view, it is streched to fit screen
dimensions.
With this patch, image is cropped to keep the aspect ratio.

Moreover, this patch fix GIF background and it is now played.

* Fix #127 Background image is no more displayed

Background of sectionLayout should always be transparent.

* Add .idea/codeStyleSettings.xml in .gitignore

* Handle behavior when layers is null

* Check that backgroundImageView is not created

This patch avoids multiple ImageView creation (like fof webview)
  • Loading branch information
gliechtenstein committed Jul 14, 2017
1 parent 049b843 commit b45acf9
Show file tree
Hide file tree
Showing 41 changed files with 1,149 additions and 871 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -23,6 +23,7 @@ local.properties
.idea/modules.xml
.idea/scopes/scope_settings.xml
.idea/vcs.xml
.idea/codeStyleSettings.xml
*.iml

# OS-specific files
Expand Down
20 changes: 10 additions & 10 deletions README.md
Expand Up @@ -13,23 +13,23 @@ Looking for an iOS version? [See here](https://www.github.com/Jasonette/JASONETT

<br>

##★ Jasonette fetches this JSON markup from a server:
## ★ Jasonette fetches this JSON markup from a server:

![json](https://raw.githubusercontent.com/gliechtenstein/images/master/json.png)

##★ And self-constructs into the following native app, in realtime:
## ★ And self-constructs into the following native app, in realtime:

![instagram](https://github.com/Jasonette/Instagram-UI-example/blob/master/images/instagram-android.gif)

<br>

#How it works
# How it works

![diagram](https://raw.githubusercontent.com/gliechtenstein/images/master/diagram.gif)

<br>

#Cool things about Jasonette
# Cool things about Jasonette

- **100% NATIVE**: Jasonette maps JSON into native components and native function calls. There is no gimmick. There is no magic.
- **App loads over HTTP**: Your app exists 100% as JSON, and loads from the cloud. No more hard-coding.
Expand Down Expand Up @@ -57,7 +57,7 @@ Try playing these on Jasonette and watch them turn into native apps in front of

# Technical Highlights

##1. One JSON to rule them all
## 1. One JSON to rule them all

Jasonette simplifies the entire app building process down to nothing more than:

Expand All @@ -75,24 +75,24 @@ This is possible because Jasonette came up with a way to **fit an entire app wor

<br>

##2. App-over-HTTP
## 2. App-over-HTTP
Until now, the only thing JSON could send over the Internet was raw data. Normally apps would fetch remote data from the server for a connected experience, but the actual app logic would be hard-coded on the client side. This makes it hard to update and extend apps.

But what happens when you can express an entire app logic as JSON?

**Then apps can be stored, processed, shared, and sent over the Internet just like any other JSON.** Watch below where we update the JSON on a [JSON pastebin server](https://www.jasonbase.com), and the app changes immediately to reflect the new markup:
** Then apps can be stored, processed, shared, and sent over the Internet just like any other JSON.** Watch below where we update the JSON on a [JSON pastebin server](https://www.jasonbase.com), and the app changes immediately to reflect the new markup:

![remote control](http://i.giphy.com/3o7TKrdmlX5uD7RszK.gif)

<br>

##3. Designed to be extended or integrated
## 3. Designed to be extended or integrated
Currently Jasonette covers all the essential native APIs and components, which means you can build pretty much any app you can imagine. But Jasonette is very flexible.

###A. Extensible
### A. Extensible
If you don't see a feature you want, you can simply extend Jasonette. Just follow the convention. Want to learn more? [Ask here](https://github.com/gliechtenstein/jasonette-android#questions-and-support)

###B. Integrate existing code
### B. Integrate existing code
Since Jasonette is simply a Java project, You can even integrate Jasonette with your existing Android project if you want. This way you can use Jasonette for just a small part of your app without having to completely switch to a new way of programming. Want to learn more? [Ask here](https://github.com/gliechtenstein/jasonette-android#questions-and-support)

<br>
Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle
Expand Up @@ -5,7 +5,7 @@ android {
buildToolsVersion '25.0.0'
defaultConfig {
applicationId "com.jasonette"
minSdkVersion 16
minSdkVersion 17
targetSdkVersion 22
versionCode 3
versionName "0.1.0"
Expand Down
32 changes: 32 additions & 0 deletions app/src/main/assets/file/error.json
@@ -0,0 +1,32 @@
{
"$jason": {
"head": {
"title": "Error Loading Screen"
},
"body": {
"layers": [
{
"type": "label",
"text": "Offline",
"style": {
"top": "50%-80",
"align": "center",
"font": "AvenirNext-Regular",
"size": "20",
"left": "50%-50",
"width": "100"
}
},
{
"type": "image",
"url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAGDUlEQVR4Xu2d7ZUNQRCGayNABIgAESACRIAIEIHdCBABGwEiQASIgI3AioDzrjtOnz41019V1dU7PX/23DvTX/VMdVdX1e09onm5ksCRq97MztAE4uwlmEAmEGcScNadqSETiIoErh5qPVep3bDSy6AhT4jo7UFmT4nonaH8xJsaHcgNIvoRSeUmEf0Ul5RRhaMDeU9EDyNZfSCiR0byE29mZCD3iOjTikTuE9FncWkZVDgyEExVmLK46xsR3TGQn3gTowJ5TkSvEtJ4QUSvxSWmXOGIQGDiQjsWUxciOj3I6XEgL5jAWOCHMoVHBIK3/lkg+N9EdPvwGVPVleDeGyKCNg1zjQaEM3NPiOj4IHH8fTmyGTwaEFhVsK6W6yxa2DGNQUuuB8/A2oLVNcQ1EhDsN7DvCC/sN7DvCK/c51wCGglIbOZ+ibQlFDC04m7wBXbuWODdX6MA4dYG7DMwPXEXFvmv0Y1wrXELZgQga2YunIpbF5yMw5nBIwCJBQszF9ZWan8BkJiqQjMY+5UUyK7a4x0IN/WU7MBLp7quMNC4dyApMzdHgNCSYcxg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9mbu5O3dJ9swamKusxB4iKV7NWLaJya85FD0CqvOApIJy/quXsQyEO/6vxDASdjM3g5CE3KSAW2YctkLwDKY6kbgFRjR23UAjKegeCrhblGmwBsco+bGGz/COXuI6171vaqi1blPW4BqRqQart8Q7KZRtGa0Assw93wONiiFlnPXJATHJY90IhGGfW5joG0iP7cE9sklmPMZAii2BPkhQaa9JyDYEU28xCndxbNZt7uxBIr+zDvQHZPORmAcKFH93+j41LQHDVDF6A9Mw+vATyrRoCG+4FEG5Oq2phFmqWwAmAcAdJNtc8K6iSwDmArDnoqmqchZokcAYgWGCw/4gzAJtqnoWLJYDzho9T8ZDiWmeBNglMIG3yEy89gYiLtK3CCaRNfuKlJxBxkbZVOIG0yU+89F/0oJEjHJ/peAAAAABJRU5ErkJggg==",
"style": {
"width": "100",
"top": "50%-50",
"left": "50%-50"
}
}
]
}
}
}
Binary file added app/src/main/assets/file/infinit.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
115 changes: 0 additions & 115 deletions app/src/main/assets/file/jasonpedia.json

This file was deleted.

28 changes: 28 additions & 0 deletions app/src/main/assets/file/loading.json
@@ -0,0 +1,28 @@
{
"$jason": {
"head": {
"title": "Offline Loading Screen",
"actions": {
"$load": {
"type": "$render"
}
},
"templates": {
"body": {
"layers": [
{
"type": "image",
"url": "file://infinit.gif",
"style": {
"width": "200",
"height": "200",
"top": "50%-100",
"left": "50%-100"
}
}
]
}
}
}
}
}

0 comments on commit b45acf9

Please sign in to comment.