This repository has been archived by the owner on Jan 3, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
431 additions
and
91 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
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
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
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
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
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
46 changes: 46 additions & 0 deletions
46
wizardroid-sample/src/main/java/org/codepond/wizardroid/sample/steps/FormStep3.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,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; | ||
} | ||
} |
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
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,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> |
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
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
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 |
---|---|---|
@@ -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> |
Oops, something went wrong.