This repository has been archived by the owner on Apr 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Embeddingapi] TC dev for Setting xwalk:background color
- Loading branch information
1 parent
0f3612f
commit 973458e
Showing
4 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...usecase-embedding-android-tests/embeddingapi/res/layout/xwview_backgroundcolor_layout.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!-- | ||
Copyright (c) 2016 Intel Corporation. All rights reserved. | ||
Use of this source code is governed by a BSD-style license that can be | ||
found in the LICENSE file. | ||
--> | ||
|
||
<org.xwalk.core.XWalkView xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:id="@+id/xwalkview" | ||
android:layout_width="fill_parent" | ||
android:layout_height="fill_parent" | ||
android:background="#FF0000" > | ||
|
||
</org.xwalk.core.XWalkView> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
...gapi/src/org/xwalk/embedded/api/sample/basic/XWalkViewWithSetBackgroundColorInLayout.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Copyright (c) 2014 Intel Corporation. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
package org.xwalk.embedded.api.sample.basic; | ||
|
||
import org.xwalk.embedded.api.sample.R; | ||
|
||
import org.xwalk.core.XWalkActivity; | ||
import org.xwalk.core.XWalkView; | ||
|
||
import android.app.AlertDialog; | ||
import android.graphics.Color; | ||
import android.os.Bundle; | ||
import android.widget.LinearLayout; | ||
|
||
public class XWalkViewWithSetBackgroundColorInLayout extends XWalkActivity { | ||
private XWalkView mXWalkView; | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.container); | ||
} | ||
|
||
@Override | ||
protected void onXWalkReady() { | ||
StringBuffer mess = new StringBuffer(); | ||
mess.append("Test Purpose: \n\n") | ||
.append("Verifies XWalkView can set background color without delay.\n\n") | ||
.append("Expected Result:\n\n") | ||
.append("Test passes if app load the red without flicker."); | ||
new AlertDialog.Builder(this) | ||
.setTitle("Info" ) | ||
.setMessage(mess.toString()) | ||
.setPositiveButton("confirm" , null ) | ||
.show(); | ||
|
||
setContentView(R.layout.xwview_backgroundcolor_layout); | ||
mXWalkView = (XWalkView) findViewById(R.id.xwalkview); | ||
mXWalkView.load("file:///android_asset/index4995_local_text.html", null); | ||
} | ||
|
||
} |