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
asyncTest("async test", function(){ | |
//async code and assertions | |
start();// check asserts | |
}); |
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
test("test plus operator", function(){ | |
equal(1+1, 2, ''test plus operator"); | |
}); |
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
module("A"); | |
test("test1", function(){...}); | |
module("B"); | |
test("test2", function(){...}); | |
test("test3", function(){...}); |
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
<p id="qunit-testresult" class="result"> | |
Tests completed in 221 milliseconds.<br/> | |
<span class="passed">232</span> tests of | |
<span class="total">232</span> passed, | |
<span class="failed">0</span> failed. |
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
<link type="text/css" rel="stylesheet" href="qunit/qunit.css" /> | |
<script src="jquery-1.7.2.js" type="text/javascript"></script> | |
<script src="qunit/qunit/qunit.js" type="text/javascript"> |
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
<com.wvr.widget.TextProgressBar | |
android:id="@+id/progressBarWithText" | |
style="@android:style/Widget.ProgressBar.Horizontal" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:max="100" | |
android:maxHeight="30dp" | |
android:minHeight="30dp" | |
android:progress="70" | |
android:progressDrawable="@drawable/progressbar" |
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
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > | |
<item android:id="@android:id/background"> | |
<shape> | |
<corners android:radius="5dip" /> | |
<gradient | |
android:angle="270" | |
android:centerColor="#e7e5e5" | |
android:centerY="0.75" | |
android:endColor="#cfcdcd" | |
android:startColor="#eceaea" /> |
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
package com.wvr.widget; | |
import com.wvr.example.R; | |
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.graphics.Canvas; | |
import android.graphics.Color; | |
import android.graphics.Paint; | |
import android.graphics.Rect; |
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
private void setAttrs(AttributeSet attrs) { | |
if (attrs != null) { | |
TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.TextProgressBar, 0, 0); | |
setText(a.getString(R.styleable.TextProgressBar_text)); | |
setTextColor(a.getColor(R.styleable.TextProgressBar_textColor, Color.BLACK)); | |
setTextSize(a.getDimension(R.styleable.TextProgressBar_textSize, 15)); | |
a.recycle(); | |
} | |
} |
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
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:components="http://schemas.android.com/apk/res/com.wvr.widget" | |
android:layout_width="fill_parent" | |
android:layout_height="fill_parent" | |
android:background="@android:color/white" | |
android:orientation="vertical" | |
android:padding="10dp" > | |
<TextView |
NewerOlder