GithubHelp home page GithubHelp logo

imclab / chromium-webview-samples Goto Github PK

View Code? Open in Web Editor NEW

This project forked from googlearchive/chromium-webview-samples

0.0 2.0 0.0 4.61 MB

Useful examples for Developing apps with the Chromium based WebView

Home Page: https://developers.google.com/chrome/mobile/docs/webview/overview

License: Apache License 2.0

chromium-webview-samples's Introduction

Chromium WebView Samples

This is a repository with useful examples for developing apps using the Chromium WebView.

If you spot any issues or questions please feel free to file an issue or reach out to @gauntface.

##TEXT_AUTOSIZING

From KitKat and above, there will no longer be support for SINGLE_COLUMN or NARROW_COLUMN layout algorithms.

However a new layout algorithm TEXT_AUTOSIZING was added and textautosizing-example contains a basic example to see the affects of the algorithm.

Image Show off TEXT_AUTOSIZING

##Touch Events in the WebView

In the older version of the WebView developers didn't need to implement the touchcancel event, although it's good practice to do so.

In the Chromium WebView it's important to implement the touchcancel event as certain scenarios will trigger a touchcancel event instead of a touchend event, where they wouldn't before (i.e. a user scrolls off of an element or e.preventDefault() isn't called in the touchstart event).

The web-touch-example contains a simple app which uses touch to move an element and reveal a little Android.

Image of WebView Touch Example

##JS Interface in the WebView

This example demonstrates the following:

  • Using evaluateJavascript()
  • Adding a javascript interface
  • Hiding the white flash of the WebView load
  • Saving state of the WebView

Image of WebView JS Interface

chromium-webview-samples's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.