0

Crosswalk

元サイト

Crosswalkは、Androidで使用されるのWebViewに代わるWebランタイムです。
Crosswalkは、Google Chromiumをベースにしています。
なぜWebViewを使わず、Crosswalkを使うのか?
WebViewは、各Android OSのバージョンによって大きく異なります。
そのため、私は両者の違いの多くの問題に衝突しました。
Crosswalkを使用すれば、すべてのAndroid OSのバージョン間で一貫性のあるWebViewで作業することができます。
それに加えて、それは、より良いHTML5をサポートしています。 
その理由はこちらの記事を見てください「なぜ、AndroidのためのCrosswalkを使うか?」

あなたのアプリケーションでCrosswalkを埋め込むための命令は、ADTに基づいており、複雑になります。
あなたがmaven2リリースを使うならば、CrosswalkをAndroid Studioに加えることは非常に簡単です。

Android Studioで新しいAndroidアプリケーションを作成し、Crosswalkを埋め込むための手順は次のとおりです。

新しいAndroidプロジェクトを作成します。
メニューから「File > New Project」を選択します
アプリケーションの名前を「 CrosswalkDemo 」と付けます。
ドメインとプロジェクトの場所を追加して「Next」を押します。
「Phone and Tablet」を選択、最小SDK 「API 19」を選択して「Next」を押します。 

「Blank Activity」を選択して「Next」を選択します。 

デフォルトのアクティビティ名を使用して「Finish」を押します。

Crosswalk設定
あなたがインストールするCrosswalkのリリースを識別します。ここで最新リリースを見つけることができます。
https://download.01.org/crosswalk/releases/crosswalk/android/maven2/

このデモのために私はここで発見されたバージョン10.39.235.15を選択します。

https://download.01.org/crosswalk/releases/crosswalk/android/maven2/org/xwalk/xwalk_core_library/10.39.235.15/

 

Open the file:

CrosswalkDemo/app/build.gradle

 

Mavenのリポジトリを追加する必要があります。

 

1
2
3
4
5
repositories {
    maven {
    }
}

 

Then add this to your dependencies:

1
compile 'org.xwalk:xwalk_core_library:10.39.235.15'

 

The finished file should look like:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
apply plugin: 'com.android.application'
android {
    compileSdkVersion 21
    buildToolsVersion "20.0.0"
    defaultConfig {
        applicationId "org.diego.android.crosswalkdemo"
        minSdkVersion 19
        targetSdkVersion 21
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
repositories {
    maven {
    }
}
dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:21.0.0'
    compile 'org.xwalk:xwalk_core_library:10.39.235.15'
}

Update the Code

Add an XWalkView to your layout like:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="#000000">
    <org.xwalk.core.XWalkView
        android:id="@+id/xwalkWebView"
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:background="#000000"
        />
</LinearLayout>

In your activity, find the XWalkView and then load a url like:

1
2
xWalkWebView=(XWalkView)findViewById(R.id.xwalkWebView);
xWalkWebView.load("https://crosswalk-project.org", null);

That’s pretty much it.

The entire activity looks like:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package org.diego.android.crosswalkdemo;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import org.xwalk.core.XWalkPreferences;
import org.xwalk.core.XWalkView;
public class MainActivity extends ActionBarActivity {
    private XWalkView xWalkWebView;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        xWalkWebView=(XWalkView)findViewById(R.id.xwalkWebView);
        xWalkWebView.load("https://crosswalk-project.org", null);
        // turn on debugging
        XWalkPreferences.setValue(XWalkPreferences.REMOTE_DEBUGGING, true);
    }
    @Override
    protected void onPause() {
        super.onPause();
        if (xWalkWebView != null) {
            xWalkWebView.pauseTimers();
            xWalkWebView.onHide();
        }
    }
    @Override
    protected void onResume() {
        super.onResume();
        if (xWalkWebView != null) {
            xWalkWebView.resumeTimers();
            xWalkWebView.onShow();
        }
    }
    @Override
    protected void onDestroy() {
        super.onDestroy();
        if (xWalkWebView != null) {
            xWalkWebView.onDestroy();
        }
    }
}

You can download a sample project here:
https://github.com/dougdiego/CrosswalkDemo

More details about the AAR Crosswalk release can be found here:
https://crosswalk-project.org/documentation/embedding_crosswalk/crosswalk_aar.html

Takenchi

0 Comments

  1. indiana auto rv

    Loans very poor credit score ~ Video
    Loans very poor credit score Loans very poor credit score Easy Auto Credit “Our Dealerships Are Waiting To Call You!” Article We offer many other auto resources for obtaining auto loans. Feel free to look through our many informational areas within the AutoCredit.com website. Our auto loan calculator will determine the new or used monthly auto loan payment in seconds. Getting approved for an auto loan with bad credit may be easier than you think. Auto loans are different from unsecured lines of credit because they use the car as collateral. If you are unable to make your monthly payments, …
    The post Loans very poor credit score ~ Video appeared first on Coin .

    Dallas Business
    BONUS 100 FREE DOFOLLOW Links SITE

    http://www.qcsensorkx.com/space-uid-31985.html
    http://jurangsapi.desa.id/forums/topic/credit-one-credit-limit-increase-request/
    http://www.yslyga.su/board/bygadd_articles3510694.html?ac=caa1fdbe6bf3414b3d50124f754e21d3
    https://www.thepropreport.com/pool/topic/auto-insurance-rate/
    http://www.luyingjc.com/message.php

    http://mommadocs.org/fine-print-know-side-effects-birth-control/?unapproved=130409&moderation-hash=53ca9b89fa752924c4abc33703143a93#comment-130409
    http://uppalpharma.com/product/arq-e-gulab-60ml/#comment-316
    http://talkingmakeup.com/beauty/north-american-hairstyling-awards/?unapproved=2239375&moderation-hash=d630ccd85c124b8b9f1a7fd407900de9#comment-2239375
    http://terapieuzaleznien.bloggg.pl/2013/07/14/czy-masz-problem-z-alkoholem/?unapproved=20231&moderation-hash=30030a9195b29ea0cbc0357be14d3178#comment-20231
    http://www.magie-blanche.fr/magie-blanche-recette.html?unapproved=40613&moderation-hash=20bc36ef3c418884a62ad0645149eacb#comment-40613
    http://www.leblogcuisine.fr/federation-francaise-de-laperitif/?unapproved=16909&moderation-hash=fec1d2afcc3accd8047210678588c1de#comment-16909
    http://acubody.com/?unapproved=10702&moderation-hash=7f4fa416e4f95852e49b63fce086a481#comment-10702
    http://llanteg-village.co.uk/2017/06/17/new-notice-board-at-the-claypits/?unapproved=75241&moderation-hash=f2c931c3b780fa977c8770452c8bbe5d#comment-75241
    http://xn--4dkua4c8990azy5a.net/2018/03/04/hello-world/?unapproved=1423&moderation-hash=dc2f6c775d59756ba19677db6ad86a1e#comment-1423
    http://rolling-east.de/en/2018/03/08/as-promised/?unapproved=843&moderation-hash=26b500d3370c48e1272de44fe9675ecf#comment-843
    http://londonmedarb.com/affidavit-samples/?unapproved=34001&moderation-hash=72d4c97225a2be54b2995120ed3fd509#comment-34001
    http://rossettiortopedia.com.br/video-post-type/?unapproved=5235&moderation-hash=dd29dc18417fbafa05957b353f518ef5#comment-5235
    http://esport.vsb.cz/2016/04/27/260/?unapproved=11208&moderation-hash=060839ab9e1cb067201a79469199162e#comment-11208
    https://youc.ir/city-driving-test/comment-page-10/?unapproved=30104&moderation-hash=c6f82815100c2481cd679e7a3389f5fa#comment-30104
    http://nailsartideas.com/30-great-stiletto-nail-art-design-ideas/?unapproved=1967&moderation-hash=1fca3e5acc3556c0a4c88ded47aadf52#comment-1967
    http://valueaddedtaxblog.com/2014/12/year-end-vat-considerations/?unapproved=53274&moderation-hash=96a6c7ae664b97d0a70838c0b98827f9#comment-53274
    http://www.de-ui.com/35-2/?unapproved=26139&moderation-hash=7df728232b089aa1718c2e893564c412#comment-26139
    http://eyekonikeyewear.com/2018/07/06/peepers-womens-nature-walk-readers/?unapproved=10154&moderation-hash=98fd177eb3d5c1769757f19ccc0c31a5#comment-10154
    https://margeye.com/2011/06/10/amir-rabik/?unapproved=31473&moderation-hash=999304044385b41ee61f14ca0832c814#comment-31473
    http://iamcoachingglobal.com/lies-you-ve-been-told-about-essay-writing-7/?unapproved=16575&moderation-hash=00b92f04195b10d968180f958cad735c#comment-16575
    https://insidetrade.co/chinese-economy-predictions-forecast-2017/?unapproved=21769&moderation-hash=18a97c6e885fbd2b2fc08f43a5c16158#comment-21769
    http://www.sikakuking.info/?unapproved=20917&moderation-hash=e048e8c45dd9e9ca3471b519160a7759#comment-20917
    http://meiguoxing.com/Attractions/China_World_Trade_Center_Tower_III.html?unapproved=7305&moderation-hash=1fb9d82ea5610c7cb50370a40414806e
    http://www.sar.nl/vijf-redenen-om-nooit-meer-zelf-te-bloggen/?unapproved=231636&moderation-hash=5d6c5861a428635bc5e64fbcc8051e0d#comment-231636
    http://heartfeltathome.com/2014/08/hello-world/?unapproved=2626&moderation-hash=6d07909344ae60bf87448b2c05b583e3#comment-2626
    http://blog.jordanian.ws/travel-to-jordan/a-guide-to-living-in-jordan/?unapproved=265833&moderation-hash=17e725598e9bc893422e7206cb1bb291#comment-265833
    http://countingongloves.com/returning-school/?unapproved=21098&moderation-hash=f31b8380c063ea0228c72fd3c73cf9ec#comment-21098
    http://imp-forum.zzz.com.ua/viewtopic.php?f=9&t=680
    https://www.powerhousecatania.it/2017/05/16/ciao-mondo/#comment-553
    https://www.alltechmashup.com/mobile/google-pixel-smartphone-release-review-price-and-specification/?unapproved=6593&moderation-hash=26218e572f390aaf34695d871ee57649#comment-6593
    https://cambria-ogrodyzimowe.com/rodzaje-altan-ogrodowych/?unapproved=38560&moderation-hash=4e64a72ecbabb2fd7421e09132f2285b#comment-38560
    http://freespiritandmind.com/natural-garden-trellis/?unapproved=106351&moderation-hash=29f65985a9590d9c7c049e79b0ad8cc8#comment-106351
    https://greatech.ru/2017/09/26/intel-core-i9-7980xe-review/?unapproved=6227&moderation-hash=9b18a6fc0cbaae668e1601e6321799a1#comment-6227
    https://www.firecrackercanteen.co.uk/appy-days/?unapproved=14897&moderation-hash=d66b9cf75a8891bfc4855bb810ee77ed#comment-14897
    https://www.corbinseminars.com/best-public-speech-in-singapore/?unapproved=1323&moderation-hash=550e1de3bd261c74e505a54f78348747#comment-1323
    http://practicallyprimalmama.com/will-he-ever-learn-to-read/?unapproved=16105&moderation-hash=04e99b85aaf5571a7cb30cbe36129b23#comment-16105
    http://www.fittykat.com/2014/01/reader-roundup-2014s-goals-in-one-word/?unapproved=517204&moderation-hash=24e63d65af8789df9cea483dffc64f2e#comment-517204
    http://blog.sixsigmaconcept.com/2018/03/22/welcome-to-six-sigma-concept/?unapproved=3448&moderation-hash=09c7f33bb70abd79a6cb9835307a27d7#comment-3448
    https://cabbageshredder.com/how-to-make-sauerkraut/?unapproved=29353&moderation-hash=087b4a0a83be9be37e47a03903b69a12#comment-29353
    http://kse-egzaminator.pl/zyczenia/?unapproved=7127&moderation-hash=3b33bf3cc9450e89229704e6f6758d16#comment-7127
    http://www.estaleiroguesthouse.com.br/blog/qual-mes-escolher-para-casar/?unapproved=172574&moderation-hash=d7789ef412aaff5b9ba04eb6d0612515#comment-172574
    http://www.decorfires.co.za/new/product/godin-cube/?unapproved=39718&moderation-hash=5ad024d5538e0cc925c4376c4d50cb98#comment-39718
    http://www.thinkpress.com.br/2018/?p=529&unapproved=10385&moderation-hash=e110d5f5c80f38d1c8985e46ce7bbf88#comment-10385
    http://han-x.com/archives/1?unapproved=199578&moderation-hash=4f85be7781ddfc65669bb60abcef7178#comment-199578
    http://paytowriteessays.com/checklist-purchase-from-trusted-essay-service/?unapproved=98273&moderation-hash=56506aeb4023150c0d85d84e1abe0d1f#comment-98273
    http://andrewbyrdproductions.com/deal-or-not/?unapproved=13608&moderation-hash=08c7537d9eb837d25e92c1a54eb4870c#comment-13608
    https://www.hayfeversolutions.com/kissing-remedy/?unapproved=749&moderation-hash=ec0847e953bb7a9fa2d44c5c8a33f812#comment-749
    http://derindegisim.com/paisleytrialbkgtile-jpg/?unapproved=31703&moderation-hash=ec6ee6969cb96823c192f999a7afb759#comment-31703
    http://guiacadizweb.com/de-copas-en-cadiz/?unapproved=14478&moderation-hash=78f6096da2877759d87c13737cd94c3b#comment-14478
    https://thebestnaturalstuff.com/clean-fresh/coconut-from-head-to-toe/?unapproved=19567&moderation-hash=70fa4c69e20e7594cc47613a785f9db5#comment-19567
    https://www.petalslane.com/jeff-sarah/?unapproved=7265&moderation-hash=cda0b143cbac27ecffeac7587b499a1c#comment-7265
    http://fetishsissy.com/2015/12/i-know-i-am-a-fetish-sissy/?unapproved=19927&moderation-hash=dc1c1eae7466736b77a78e7a68421d0f#comment-19927
    https://wallwalker.net/general/post-format-gallery/?unapproved=1471&moderation-hash=1342fff4c1f9857c572a5f7908e96caf#comment-1471
    http://tritiy.ru/products/antistressovaja-podushka-Strast-13asp20iv-235269/#comment_796787
    http://dis.dgs.pt/2010/07/08/registo-nacional-de-utentes-rnu/comment-page-1/?unapproved=74180&moderation-hash=9a960c9aa299feba6ae7a5c524c399d3#comment-74180
    https://nataliebray.com/2017/08/caroline-edrick/?unapproved=22459&moderation-hash=b9c71703ada5918ccca800aa69eb84a1#comment-22459
    http://www.bvpgujarat.com/join-us/publications/niti_image/?unapproved=2693&moderation-hash=7783aa549ebe114a25d057d47d99bb1d#comment-2693
    http://nupin.cocolog-nifty.com/blog/2011/08/post-1db1.html
    http://www.homeinsouthflorida.com/cima/?unapproved=566&moderation-hash=13bdb688c546692c9708d31684f5bf63#comment-566
    http://jualobatasia.com/harga-dermawand-produk-kecantikan/?unapproved=4137&moderation-hash=612fee787932397f3236d1044defb418#comment-4137
    http://tastyeatsbytess.com/spring-is-in-the-air/?unapproved=10383&moderation-hash=0605ea3c71a98b1d9ad38c6a23a80207#comment-10383
    https://hayhocuc.com/flourless-chocolate-orange-cake/?unapproved=2346&moderation-hash=4533cc89bd18f32187c1a9b8b6851e32#comment-2346
    https://searlecompany.com/dinner-get-together/?unapproved=1853&moderation-hash=fe1a6d4c4ea1123b4ceae279dbb84b97#comment-1853
    https://sakroni.staff.uns.ac.id/2017/03/15/anakmu-bukan-milikmu/?unapproved=59107&moderation-hash=98b9b839114779b0b9c6749996642a3a#comment-59107
    http://www.gameslikehappywheels.com/alkapallovalmentajan/hello-world/?unapproved=8994&moderation-hash=fab8046774039fc8b16239be15a91b50#comment-8994
    http://www.hdappcity.in/youtube-video-downloader-pro-final-v4-9-0-3/?unapproved=11417&moderation-hash=ecd47f2f9c73ccfd5a95593b111e51f3#comment-11417
    http://www.pringlemorgan.com.ar/listado-de-aplicaciones-didacticas/?unapproved=20977&moderation-hash=c03913a5d03cc720ea3176dc6a32ea1a#comment-20977
    http://www.brasilplantas.com/paisagismo/tipos-e-estilos-de-jardins-para-sua-casa/?unapproved=2547&moderation-hash=715fc49a0705fac7249645e500adb6c9#comment-2547
    https://formlift.net/blog/2017/11/18/version-7-released/?unapproved=20332&moderation-hash=002fe4c9e0f1ccdb2f425214170d62ec#comment-20332
    http://climatesavvy.org/hello-world/?unapproved=741&moderation-hash=f08811c949443ed5d4874f1b657088a9#comment-741
    https://nqchanna.maqt.se/2017/12/21/det-ar-ju-inte-klokt/?unapproved=1623&moderation-hash=91334e21766c9c604a1152cb87df8309#comment-1623
    http://pmdesire.com/delphi-technique/?unapproved=36152&moderation-hash=a3e5113721043403cfbfdc9ecd9b8879#comment-36152
    http://www.rishiinstitute.com/hello-world/?unapproved=5016&moderation-hash=a0b0880f81af0995225db5128e3e0eb3#comment-5016
    https://skurt.de/2008/02/19/mobile-monday-1-besucherkommentar/?unapproved=989&moderation-hash=23b1e2fa00c64bf4df1aa994fcfeebdc#comment-989
    http://kazaral.org/o-nas/blog-rukovoditelya/?unapproved=9400&moderation-hash=92da045b38b1954ee49a8b2418bf56e4#comment-9400
    http://useyourcompass.com/2017/02/post-1/?unapproved=58017&moderation-hash=7392bb13cc28cfd58c56741a95edc134#comment-58017
    http://abelhasabeira.com/a-colmeia-esta-zanganeira/?unapproved=56204&moderation-hash=7b0a3eb4444959a5c6371d16f12cfe3c#comment-56204
    http://momstestkitchen.com/2014/04/chocolate-pretzel-granola-bars-peanut-free.html?unapproved=46454&moderation-hash=311209203e13394890db5a3f41a5843f#comment-46454
    https://wellsuitedformanhood.com/objects-are-closer/photo-for-signature/?unapproved=11755&moderation-hash=27584aa820e9e5f2475b48429c68ceee#comment-11755
    http://timekeeperstudio.com/288?unapproved=23092&moderation-hash=f22af7c9083688779aff6f9abdabe828#comment-23092
    http://wolf.s58.xrea.com/etc/etc20.htm
    https://www.paraisodosbits.com.br/2016/03/28/simulando-o-arduino/?unapproved=13716&moderation-hash=8e301c0c7a1a5d639788ae3b2d176b45#comment-13716
    http://groffproperties.com/homes-for-the-olympian-in-you?unapproved=20275&moderation-hash=9adf5c9344dc56f299a5fd69e0c09f8d#comment-20275
    http://www.dindersiforum.com/?unapproved=17132&moderation-hash=3007e2ef4d36fa36454665fe92707a11#comment-17132
    http://atisketatasketneworleans.com/hello-world/?unapproved=835&moderation-hash=3b0ff0f7344381e2892c626cc7633001#comment-835
    http://www.emrahkus.com/ders-deneme-baslik-2/?unapproved=307&moderation-hash=bb7298666d1e10189f11704ca12450f2#comment-307
    http://moorethink.com/2018/04/27/garage-door-repair-on-troubleshooting/?unapproved=5750&moderation-hash=ab6d56713ff055e4fca0c96e936de56f#comment-5750
    https://buffalo.makerfaire.com/2018/04/18/welcome-tedx-buffalo-speaker-stage/?unapproved=2319&moderation-hash=ebab16b1636decbf08a668f6329ad628#comment-2319
    http://www.valmos.es/canteria/?unapproved=9643&moderation-hash=a2c8057d4d60f616ba70efc7c60995ca#comment-9643
    http://blockgroup.ca/rim-joist-remediation-part-1/?unapproved=11816&moderation-hash=557b2173e284eab4d018c5d205b7c4af#comment-11816
    http://www.varunbihani.com/blog/2011/interesting-find-on-user-friendly-forms-2/?unapproved=415101&moderation-hash=4961070157a7770387127b1a53c45a85#comment-415101
    http://paolotaje.me/flashing-engine-light/?unapproved=909&moderation-hash=6b3815038f698a5d4fd995ec442889dc#comment-909
    http://www.gemmagary.co.uk/old-joan-cecil-williamson-j-a-smith/?unapproved=35848&moderation-hash=f7cd2a0796347b70356c67d1674fdbc3#comment-35848
    https://ultrahighllc.com/boat-lifts/boat-lift-plastic-profile/?unapproved=15497&moderation-hash=0a2e2de1ff910d5f5b9fe91ad208ccb2#comment-15497
    http://www.impacto24.com.ar/index.php/2017/09/18/bartolo-beto-casela/?unapproved=24346&moderation-hash=26cc8ca762ac46f81e5281bc31f205be#comment-24346
    http://masscomputers.com.bd/Education-Board-Bangladesh/?unapproved=40294&moderation-hash=89e1fcd9e6426bebcfab6135f986198d#comment-40294
    https://hopechurchcorby.org/2017/02/06/evangelism-forum/?unapproved=602&moderation-hash=a519c2bc9208d70c985ce05c2bd211b9#comment-602
    http://lifeaslove.com/the-need-for-dark-skies/?unapproved=7064&moderation-hash=1a71ec879f31a34a4ed8580bea5ea7fd#comment-7064
    https://www.vintagejewelrygirl.com/vixens-vintage-contest/?unapproved=15481&moderation-hash=e5cfab857dceae2dc7e890eb4e0f175d#comment-15481
    https://www.usteed.com.br/275/?unapproved=1923&moderation-hash=0751339695197f96aefef2d73aa6a0cc#comment-1923

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です