Skip to content
This repository has been archived by the owner on Jan 3, 2019. It is now read-only.

Commit

Permalink
Merge branch 'release-1.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
ndsinister committed Nov 10, 2013
2 parents e7d718d + f02a564 commit acf7418
Show file tree
Hide file tree
Showing 21 changed files with 431 additions and 91 deletions.
28 changes: 15 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,39 @@
language: java
jdk: oraclejdk7
branches:
excludes:
- gh-pages
env:
matrix:
- ANDROID_SDKS=android-18,sysimg-18 ANDROID_TARGET=android-18 ANDROID_ABI=armeabi-v7a
- ANDROID_SDKS=android-19,sysimg-19 ANDROID_TARGET=android-19 ANDROID_ABI=armeabi-v7a
before_install:
# Install base Android SDK
- sudo apt-get update -qq
- if [ `uname -m` = x86_64 ]; then sudo apt-get install -qq --force-yes libgd2-xpm ia32-libs ia32-libs-multiarch > /dev/null; fi
- wget http://dl.google.com/android/android-sdk_r22.0.5-linux.tgz
- tar xzf android-sdk_r22.0.5-linux.tgz
- wget http://dl.google.com/android/android-sdk_r22.3-linux.tgz
- tar xzf android-sdk_r22.3-linux.tgz
- export ANDROID_HOME=$PWD/android-sdk-linux
- export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools

# Gradle
- wget http://services.gradle.org/distributions/gradle-1.7-bin.zip
- unzip gradle-1.7-bin.zip
- export GRADLE_HOME=$PWD/gradle-1.7
- wget http://services.gradle.org/distributions/gradle-1.8-bin.zip
- unzip gradle-1.8-bin.zip
- export GRADLE_HOME=$PWD/gradle-1.8
- export PATH=$GRADLE_HOME/bin:$PATH

# install android build tools
- wget https://dl-ssl.google.com/android/repository/build-tools_r18.0.1-linux.zip
- unzip build-tools_r18.0.1-linux.zip -d $ANDROID_HOME
- wget https://dl-ssl.google.com/android/repository/build-tools_r19-linux.zip
- unzip build-tools_r19-linux.zip -d $ANDROID_HOME
- mkdir -p $ANDROID_HOME/build-tools/
- mv $ANDROID_HOME/android-4.3 $ANDROID_HOME/build-tools/18.0.1
- mv $ANDROID_HOME/android-4.4 $ANDROID_HOME/build-tools/19.0.0

# Install required components.
# For a full list, run `android list sdk -a --extended`
# Note that sysimg-18 downloads the ARM, x86 and MIPS images (we should optimize this).
# Note that sysimg-19 downloads the ARM, x86 and MIPS images (we should optimize this).
# Other relevant API's
- echo yes | android update sdk --filter platform-tools --no-ui --force > /dev/null
- echo yes | android update sdk --filter android-17 --no-ui --force > /dev/null
- echo yes | android update sdk --filter android-18 --no-ui --force > /dev/null
- echo yes | android update sdk --filter sysimg-18 --no-ui --force > /dev/null
- echo yes | android update sdk --filter android-19 --no-ui --force > /dev/null
- echo yes | android update sdk --filter sysimg-19 --no-ui --force > /dev/null
- echo yes | android update sdk --filter extra-android-support --no-ui --force > /dev/null
- echo yes | android update sdk --filter extra-android-m2repository --no-ui --force > /dev/null

Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Change Log
===============================================================================

Version 1.1.0 *(2013-11-10)*
----------------------------

* Feature: Ability to block the user to proceed to the next event by swiping or clicking the button
* Fix: Removed unnecessary log statements
* Upgraded Android SDK and Gradle to the latest versions

Version 1.0.1 *(2013-10-06)*
----------------------------

Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
classpath 'com.android.tools.build:gradle:0.6.+'
}
}

allprojects {
version = "1.0.1"
version = "1.1.0"
group = "org.codepond"
}

Expand Down
8 changes: 4 additions & 4 deletions wizardroid-sample/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apply plugin: 'android'

android {
compileSdkVersion 18
buildToolsVersion "18.0.1"
compileSdkVersion 19
buildToolsVersion "19.0.0"

defaultConfig {
minSdkVersion 14
targetSdkVersion 18
targetSdkVersion 19
}

signingConfigs {
Expand Down Expand Up @@ -35,6 +35,6 @@ android {
}

dependencies {
compile 'com.android.support:support-v4:18.0.0'
compile 'com.android.support:support-v4:19.0.0'
compile project(':wizardroid')
}
4 changes: 2 additions & 2 deletions wizardroid-sample/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.codepond.wizardroid.sample"
android:versionCode="2" android:versionName="1.0.1">
android:versionCode="3" android:versionName="1.1.0">

<uses-sdk android:minSdkVersion="14"
android:targetSdkVersion="18"
android:targetSdkVersion="19"
android:theme="@android:style/Theme.Holo.Light.DarkActionBar"/>
<application android:icon="@drawable/icon"
android:label="@string/app_name"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,20 @@
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import org.codepond.wizardroid.persistence.ContextVariable;
import android.widget.CheckBox;
import android.widget.CompoundButton;

import org.codepond.wizardroid.WizardStep;
import org.codepond.wizardroid.sample.R;

/**
* This step will block the user from proceeding to the next step
* unless the user mark the checkbox. The step is marked as required
* when the wizard flow is built. See {@link org.codepond.wizardroid.sample.wizards.FormWizard#onSetup()} for more info.
*/
public class FormStep2 extends WizardStep {

/**
* Tell WizarDroid that these are context variables.
* These values will be automatically bound to any field annotated with {@link ContextVariable}.
* NOTE: Context Variable names are unique and therefore must
* have the same name and type wherever you wish to use them.
*/
@ContextVariable
private String firstname;
@ContextVariable
private String lastname;


private CheckBox checkBox;
//You must have an empty constructor for every step
public FormStep2() {
}
Expand All @@ -31,15 +26,21 @@ public FormStep2() {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.step_summary, container, false);
TextView firstnameTv = (TextView) v.findViewById(R.id.firstname);
TextView lastnameTv = (TextView) v.findViewById(R.id.lastname);

//WizarDroid will automatically inject the values for these fields
//so we can simply set the text views
firstnameTv.setText(firstname);
lastnameTv.setText(lastname);

View v = inflater.inflate(R.layout.step_form2, container, false);
checkBox = (CheckBox) v.findViewById(R.id.sample_form2_checkbox);
checkBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
if (isChecked) {
//Notify that the step is completed
notifyCompleted(true);
}
else {
//Notify that the step is incomplete
notifyCompleted(false);
}
}
});
return v;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package org.codepond.wizardroid.sample.steps;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import org.codepond.wizardroid.WizardStep;
import org.codepond.wizardroid.persistence.ContextVariable;
import org.codepond.wizardroid.sample.R;

public class FormStep3 extends WizardStep {

/**
* Tell WizarDroid that these are context variables.
* These values will be automatically bound to any field annotated with {@link org.codepond.wizardroid.persistence.ContextVariable}.
* NOTE: Context Variable names are unique and therefore must
* have the same name and type wherever you wish to use them.
*/
@ContextVariable
private String firstname;
@ContextVariable
private String lastname;


//You must have an empty constructor for every step
public FormStep3() {
}

//Set your layout here
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.step_summary, container, false);
TextView firstnameTv = (TextView) v.findViewById(R.id.firstname);
TextView lastnameTv = (TextView) v.findViewById(R.id.lastname);

//WizarDroid will automatically inject the values for these fields
//so we can simply set the text views
firstnameTv.setText(firstname);
lastnameTv.setText(lastname);

return v;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import org.codepond.wizardroid.persistence.ContextVariable;
import org.codepond.wizardroid.sample.steps.FormStep1;
import org.codepond.wizardroid.sample.steps.FormStep2;
import org.codepond.wizardroid.sample.steps.FormStep3;

/**
* A sample to demonstrate a form in multiple steps.
Expand All @@ -31,8 +32,18 @@ public FormWizard() {
@Override
public WizardFlow onSetup() {
return new WizardFlow.Builder()
.addStep(FormStep1.class) //Add your steps in the order you want them
.addStep(FormStep2.class) //to appear and eventually call create()
.create(); //to create the wizard flow.
/*
Add your steps in the order you want them to appear and eventually call create()
to create the wizard flow.
*/
.addStep(FormStep1.class)
/*
Mark this step as 'required', preventing the user from advancing to the next step
until a certain action is taken to mark this step as completed by calling WizardStep#notifyCompleted()
from the step.
*/
.addStep(FormStep2.class, true)
.addStep(FormStep3.class)
.create();
}
}
26 changes: 26 additions & 0 deletions wizardroid-sample/src/main/res/layout/step_form2.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="16dp"
android:paddingRight="16dp">

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/textView"
android:text="@string/sample_form_text2"
android:layout_marginTop="20dp"
android:textSize="20dp" />

<CheckBox
android:id="@+id/sample_form2_checkbox"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_marginTop="20dp"
android:textSize="20dp"
android:text="@string/sample_form_checkbox"/>

</LinearLayout>
2 changes: 2 additions & 0 deletions wizardroid-sample/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@
Hit Next or slide your finger to continue...</string>
<string name="sample_form_summary">WizarDroid Context enables sharing data among steps.
Summary of input:</string>
<string name="sample_form_text2">This is a demonstration of blocking the next step until an action is taken</string>
<string name="sample_form_checkbox">Check here to enable the next step</string>
</resources>
8 changes: 4 additions & 4 deletions wizardroid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ apply plugin: 'maven'
apply plugin: 'signing'

android {
compileSdkVersion 18
buildToolsVersion "18.0.1"
compileSdkVersion 19
buildToolsVersion "19.0.0"

defaultConfig {
minSdkVersion 9
targetSdkVersion 18
targetSdkVersion 19
}
}

dependencies {
compile 'com.android.support:support-v4:18.0.0'
compile 'com.android.support:support-v4:19.0.0'
}

ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
Expand Down
4 changes: 2 additions & 2 deletions wizardroid/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="2" android:versionName="1.0.1" package="org.codepond.wizardroid">
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="18"/>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="3" android:versionName="1.1.0" package="org.codepond.wizardroid">
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="19"/>
<application/>
</manifest>
Loading

0 comments on commit acf7418

Please sign in to comment.