@@ -0,0 +1,177 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Globalization;
using System.Text.RegularExpressions;

using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;

using supAppCompat = Android.Support.V7.AppCompat;
using supToolbar = Android.Support.V7.Widget.Toolbar;
using supFAB = Android.Support.Design.Widget.FloatingActionButton;
using supDesign = Android.Support.Design;

namespace Amnesty
{
[Activity (Label = "Form_2")]
public class Form_2 : Activity
{
// MICROSOFT EMAIL VALIDATOR
bool invalid = false;

public bool IsValidEmail (EditText obj)
{
invalid = false;
String strIn = obj.EditableText.ToString();

if (String.IsNullOrEmpty (strIn)) {
obj.Error = Resources.GetString (Resource.String.error_empty);
return false;
}
// Use IdnMapping class to convert Unicode domain names.
try {
strIn = Regex.Replace (strIn, @"(@)(.+)$", this.DomainMapper,
RegexOptions.None, TimeSpan.FromMilliseconds (200));
} catch (RegexMatchTimeoutException) {
obj.Error = Resources.GetString(Resource.String.error_unknown);
return false;
}
if (invalid) {
obj.Error = Resources.GetString(Resource.String.error_format);
return false;
}
// Return true if strIn is in valid e-mail format.
try {
return Regex.IsMatch (strIn,
@"^(?("")("".+?(?<!\\)""@)|(([0-9a-z]((\.(?!\.))|[-!#\$%&'\*\+/=\?\^`\{\}\|~\w])*)(?<=[0-9a-z])@))" +
@"(?(\[)(\[(\d{1,3}\.){3}\d{1,3}\])|(([0-9a-z][-\w]*[0-9a-z]*\.)+[a-z0-9][\-a-z0-9]{0,22}[a-z0-9]))$",
RegexOptions.IgnoreCase, TimeSpan.FromMilliseconds (250));
} catch (RegexMatchTimeoutException) {
obj.Error = Resources.GetString(Resource.String.error_unknown);
return false;
}
}

private string DomainMapper (Match match)
{
// IdnMapping class with default property values.
IdnMapping idn = new IdnMapping ();
string domainName = match.Groups [2].Value;
try {
domainName = idn.GetAscii (domainName);
} catch (ArgumentException) {
invalid = true;
}
return match.Groups [1].Value + domainName;
}
// END MICROSOFT EMAIL VALIDATOR

// Checks if there are any problems with any fields and enables the button to continue if there aren't
public Boolean Validate(EditText obj){
if (String.IsNullOrWhiteSpace(obj.Text)) {
obj.Error = Resources.GetString(Resource.String.error_empty);
return false;
} else {
return true;
}
}

public void Activate(Button x, EditText a, EditText b, EditText c){
if (Validate (a) &&
IsValidEmail (b) &&
Validate (c)) {
var next = FindViewById<Button> (Resource.Id.next);
next.Enabled = true;
next.SetBackgroundColor (Android.Graphics.Color.Rgb (255, 237, 0));
next.SetTextColor (Android.Graphics.Color.Black);
} else if(x.Enabled) {
x.Enabled = false;
x.SetBackgroundColor (Android.Graphics.Color.Rgb (225, 225, 225));
x.SetTextColor (Android.Graphics.Color.Rgb (175, 175, 175));
}
}

protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);

// Create your application here
SetContentView (Resource.Layout.Form_2);

var toolbar = FindViewById<supToolbar> (Resource.Id.toolbar); // Toolbar
var next = FindViewById<Button> (Resource.Id.next); // Next Button
var telephone = FindViewById<EditText> (Resource.Id.telephone); // Telephone Field
var mail = FindViewById<EditText> (Resource.Id.mail); // Mail Field
var iban = FindViewById<EditText> (Resource.Id.iban); // Iban Field

// UI
// Toolbar
// Populate
toolbar.Title = Resources.GetString (Resource.String.app_name);
toolbar.SetLogo (Resource.Drawable.logo_black_trans_xs);

// Styling
toolbar.SetTitleTextColor (Android.Graphics.Color.Black);

// Button
// Disable button by default
next.Enabled = true; // DEBUG - switch to false
next.SetBackgroundColor (Android.Graphics.Color.Rgb (225, 225, 225));
next.SetTextColor (Android.Graphics.Color.Rgb (175, 175, 175));

// Next Button
next.Click += delegate {
var newIntent = new Intent (this, typeof(Form_3));

newIntent.PutExtra ("strCharityCountry", Intent.GetStringExtra("strCharityCountry")); // IMPROV: Change to ID
newIntent.PutExtra ("strVolunteerName", Intent.GetStringExtra("strVolunteerName")); // IMPROV: Change to ID
newIntent.PutExtra ("strDonatorName", Intent.GetStringExtra("strDonatorName"));
newIntent.PutExtra ("strDonatorLastname", Intent.GetStringExtra("strDonatorLastname"));
newIntent.PutExtra ("strDonatorBirthdate", Intent.GetStringExtra("strDonatorBirthdate"));
newIntent.PutExtra ("strDonatorStreet", Intent.GetStringExtra("strDonatorStreet"));
newIntent.PutExtra ("strDonatorStreetNum", Intent.GetStringExtra("intDonatorStreetNum"));
newIntent.PutExtra ("strDonatorProvince", Intent.GetStringExtra("strDonatorProvince"));

newIntent.PutExtra ("strDonatorTel", telephone.EditableText.ToString());
newIntent.PutExtra ("strDonatorMail", mail.EditableText.ToString());
newIntent.PutExtra ("strDonatorIban", iban.EditableText.ToString());

StartActivity (newIntent);
};

// Telephone Field Validation
telephone.TextChanged += delegate {
Activate (next, telephone, mail, iban);
};

telephone.FocusChange += delegate {
Activate (next, telephone, mail, iban);
};

// Mail Field Validation
mail.TextChanged += delegate {
Activate (next, telephone, mail, iban);
};

mail.FocusChange += delegate {
Activate (next, telephone, mail, iban);
};

// Iban Field Validation
iban.TextChanged += delegate {
Activate (next, telephone, mail, iban);
};

iban.FocusChange += delegate {
Activate (next, telephone, mail, iban);
};
}
}
}

@@ -0,0 +1,104 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;

using supAppCompat = Android.Support.V7.AppCompat;
using supToolbar = Android.Support.V7.Widget.Toolbar;
using supFAB = Android.Support.Design.Widget.FloatingActionButton;
using supDesign = Android.Support.Design;

namespace Amnesty
{
[Activity (Label = "Form_3")]
public class Form_3 : Activity
{

// Checks if there are any problems with any fields and enables the button to continue if there aren't
public Boolean Validate(EditText obj){
if (String.IsNullOrWhiteSpace(obj.Text)) {
obj.Error = Resources.GetString(Resource.String.error_empty);
return false;
} else {
return true;
}
}

public void Activate(Button x, EditText a){
if (Validate (a)) {
var next = FindViewById<Button> (Resource.Id.next);
next.Enabled = true;
next.SetBackgroundColor (Android.Graphics.Color.Rgb (255, 237, 0));
next.SetTextColor (Android.Graphics.Color.Black);
} else if(x.Enabled) {
x.Enabled = false;
x.SetBackgroundColor (Android.Graphics.Color.Rgb (225, 225, 225));
x.SetTextColor (Android.Graphics.Color.Rgb (175, 175, 175));
}
}

protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);

// Create your application here
SetContentView (Resource.Layout.Form_3);

var toolbar = FindViewById<supToolbar> (Resource.Id.toolbar); // Toolbar
var next = FindViewById<Button> (Resource.Id.next); // Next Button
var donation = FindViewById<EditText> (Resource.Id.donation); // Amount Field

// UI
// Toolbar
// Populate
toolbar.Title = Resources.GetString (Resource.String.app_name);
toolbar.SetLogo (Resource.Drawable.logo_black_trans_xs);

// Styling
toolbar.SetTitleTextColor (Android.Graphics.Color.Black);

// Button
// Disable button by default
next.Enabled = true; // DEBUG - switch to false
next.SetBackgroundColor (Android.Graphics.Color.Rgb (225, 225, 225));
next.SetTextColor (Android.Graphics.Color.Rgb (175, 175, 175));

// Next Button
next.Click += delegate {
var newIntent = new Intent (this, typeof(Form_4));

newIntent.PutExtra ("strCharityCountry", Intent.GetStringExtra("strCharityCountry")); // IMPROV: Change to ID
newIntent.PutExtra ("strVolunteerName", Intent.GetStringExtra("strVolunteerName")); // IMPROV: Change to ID
newIntent.PutExtra ("strDonatorName", Intent.GetStringExtra("strDonatorName"));
newIntent.PutExtra ("strDonatorLastname", Intent.GetStringExtra("strDonatorLastname"));
newIntent.PutExtra ("strDonatorBirthdate", Intent.GetStringExtra("strDonatorBirthdate"));
newIntent.PutExtra ("strDonatorStreet", Intent.GetStringExtra("strDonatorStreet"));
newIntent.PutExtra ("strDonatorStreetNum", Intent.GetStringExtra("intDonatorStreetNum"));
newIntent.PutExtra ("strDonatorProvince", Intent.GetStringExtra("strDonatorProvince"));
newIntent.PutExtra ("strDonatorTel", Intent.GetStringExtra("strDonatorTel"));
newIntent.PutExtra ("strDonatorMail", Intent.GetStringExtra("strDonatorMail"));
newIntent.PutExtra ("strDonatorIban", Intent.GetStringExtra("strDonatorIban"));

newIntent.PutExtra ("strDonatorAmount", donation.EditableText.ToString());

StartActivity (newIntent);
};

// Birthdate Field Validation
donation.FocusChange += delegate {
Activate(next, donation);
};
donation.TextChanged += delegate {
Activate(next, donation);
};
}
}
}

@@ -0,0 +1,75 @@

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;

using supAppCompat = Android.Support.V7.AppCompat;
using supToolbar = Android.Support.V7.Widget.Toolbar;
using supFAB = Android.Support.Design.Widget.FloatingActionButton;
using supDesign = Android.Support.Design;

namespace Amnesty
{
[Activity (Label = "Form_4")]
public class Form_4 : Activity
{
protected override void OnCreate (Bundle savedInstanceState)
{
base.OnCreate (savedInstanceState);

// Create your application here
SetContentView (Resource.Layout.Form_4);

var toolbar = FindViewById<supToolbar> (Resource.Id.toolbar); // Toolbar
var submit = FindViewById<Button> (Resource.Id.submit);
var p1 = FindViewById<TextView> (Resource.Id.overview_01);
var p2 = FindViewById<TextView> (Resource.Id.overview_02);
var p3 = FindViewById<TextView> (Resource.Id.overview_03);
var p4 = FindViewById<TextView> (Resource.Id.overview_04);
var p5 = FindViewById<TextView> (Resource.Id.overview_05);
var p6 = FindViewById<TextView> (Resource.Id.overview_06);
var p7 = FindViewById<TextView> (Resource.Id.overview_07);
var p8 = FindViewById<TextView> (Resource.Id.overview_08);
var p9 = FindViewById<TextView> (Resource.Id.overview_09);
var p10 = FindViewById<TextView> (Resource.Id.overview_10);

// UI
// Toolbar
// Populate
toolbar.Title = Resources.GetString (Resource.String.app_name);
toolbar.SetLogo (Resource.Drawable.logo_black_trans_xs);

// Styling
toolbar.SetTitleTextColor (Android.Graphics.Color.Black);

// Content
// Populate
p1.Text = p1.Text + Intent.GetStringExtra("strVolunteerName");
p2.Text = p2.Text + Intent.GetStringExtra("strCharityCountry");
p3.Text = p3.Text + Intent.GetStringExtra("strDonatorName") + " " + Intent.GetStringExtra("strDonatorLastname");
p4.Text = p4.Text + Intent.GetStringExtra("strDonatorBirthdate");
p5.Text = p5.Text + Intent.GetStringExtra("strDonatorStreet") + " " + Intent.GetStringExtra("strDonatorStreetNum");
p6.Text = p6.Text + Intent.GetStringExtra("strDonatorProvince");
p7.Text = p7.Text + Intent.GetStringExtra("strDonatorTel");
p8.Text = p8.Text + Intent.GetStringExtra("strDonatorMail");
p9.Text = p9.Text + Intent.GetStringExtra("strDonatorIban");
p10.Text = p10.Text + Intent.GetStringExtra("strDonatorAmount");

// Submit - Click
submit.Click += delegate {
var newIntent = new Intent (this, typeof(Landing));
newIntent.PutExtra ("strVolunteerName", Intent.GetStringExtra("strVolunteerName"));
StartActivity (newIntent);
};
}
}
}

@@ -124,10 +124,15 @@ protected override void OnCreate (Bundle bundle)

//New Donation
fabActionNew.Click += delegate {
var intent = new Intent (this, typeof(Form));
intent.PutExtra ("strCharityCountry", title.Text.ToString()); // IMPROV: Change to ID
intent.PutExtra ("strVolunteerName", intent.GetStringExtra("username")); // IMPROV: Change to ID
StartActivity (intent);
var strCharityCountry = title.Text.ToString();
var strVolunteerName = Intent.GetStringExtra("strVolunteerName");

var newIntent = new Intent (this, typeof(Form_1));

newIntent.PutExtra("strVolunteerName",strVolunteerName);
newIntent.PutExtra("strCharityCountry",strCharityCountry);

StartActivity (newIntent);
};

// End
@@ -30,12 +30,16 @@ public class MainActivity : Activity
}
}

public void Activate(EditText a, EditText b){
public void Activate(Button x, EditText a, EditText b){
if (Validate(a) && Validate(b)) {
var submit = FindViewById<Button> (Resource.Id.submit);
submit.Enabled = true;
submit.SetBackgroundColor (Android.Graphics.Color.Rgb(255,237,0));
submit.SetTextColor (Android.Graphics.Color.Black);
} else if(x.Enabled) {
x.Enabled = false;
x.SetBackgroundColor (Android.Graphics.Color.Rgb (225, 225, 225));
x.SetTextColor (Android.Graphics.Color.Rgb (175, 175, 175));
}
}

@@ -73,27 +77,27 @@ protected override void OnCreate (Bundle savedInstanceState)
// Events
// Submit - Click
submit.Click += delegate {
var landing = new Intent (this, typeof(Landing));
landing.PutExtra ("username", username.EditableText.ToString());
StartActivity (landing);
var newIntent = new Intent (this, typeof(Landing));
newIntent.PutExtra ("strVolunteerName", username.EditableText.ToString());
StartActivity (newIntent);
};

// Username Field Validation
username.TextChanged += delegate {
Activate(username,password);
Activate(submit, username,password);
};

username.FocusChange += delegate {
Activate(username,password);
Activate(submit, username,password);
};

// Password Field Validation
password.TextChanged += delegate {
Activate(username,password);
Activate(submit, username,password);
};

password.FocusChange += delegate {
Activate(username,password);
Activate(submit, username,password);
};
// End
}

Large diffs are not rendered by default.

@@ -0,0 +1,142 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:local="http://schemas.android.com/apk/res-auto"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/container"
android:focusable="true"
android:focusableInTouchMode="true">
<include
android:id="@+id/toolbar"
layout="@layout/toolbar" />
<ScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/toolbar"
android:orientation="vertical">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:id="@+id/main_content"
android:padding="50px">
<TextView
android:text="@string/form_intro"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/intro" />
<TextView
android:text="@string/form_personal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/personal"
android:layout_marginTop="10dp" />
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/MyTheme"
android:layout_marginTop="10dp"
android:layout_marginLeft="-5dp"
android:layout_marginRight="-5dp">
<EditText
android:id="@+id/name"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="@string/form_name"
android:singleLine="true"
android:inputType="textCapSentences" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/MyTheme"
android:layout_marginTop="10dp"
android:layout_marginLeft="-5dp"
android:layout_marginRight="-5dp">
<EditText
android:id="@+id/lastname"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="@string/form_lastname"
android:singleLine="true"
android:inputType="textCapSentences" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/MyTheme"
android:layout_marginTop="10dp"
android:layout_marginLeft="-5dp"
android:layout_marginRight="-5dp"
android:windowSoftInputMode="stateHidden">
<EditText
android:id="@+id/birthdate"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="@string/form_birthdate"
android:singleLine="true"
android:editable="false"
android:windowSoftInputMode="stateAlwaysHidden" />
</android.support.design.widget.TextInputLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_gravity="center_horizontal">
<android.support.design.widget.TextInputLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight=".80"
android:theme="@style/MyTheme"
android:layout_marginLeft="-5dp">
<EditText
android:id="@+id/street"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="@string/form_street"
android:singleLine="true"
android:inputType="textCapSentences" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight=".20"
android:theme="@style/MyTheme"
android:layout_marginRight="-5dp">
<EditText
android:id="@+id/streetNum"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="@string/form_number"
android:singleLine="true"
android:inputType="number" />
</android.support.design.widget.TextInputLayout>
</LinearLayout>
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/MyTheme"
android:layout_marginTop="10dp"
android:layout_marginLeft="-5dp"
android:layout_marginRight="-5dp">
<AutoCompleteTextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/province"
android:hint="@string/form_province"
android:singleLine="true" />
</android.support.design.widget.TextInputLayout>
<Button
android:id="@+id/next"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
style="?android:attr/borderlessButtonStyle"
android:textColor="#ff000000"
android:text="@string/generic_next"
android:background="#ffffff00" />
</LinearLayout>
</ScrollView>
</RelativeLayout>
@@ -13,21 +13,21 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/toolbar"
android:orientation="vertical"
android:padding="50px">
android:orientation="vertical">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:id="@+id/main_content">
android:id="@+id/main_content"
android:padding="50px">
<TextView
android:text="@string/form_intro"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/intro" />
<TextView
android:text="@string/form_personal"
android:text="@string/form_contact"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/personal"
@@ -40,13 +40,20 @@
android:layout_marginLeft="-5dp"
android:layout_marginRight="-5dp">
<EditText
android:id="@+id/name"
android:id="@+id/telephone"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="Name"
android:hint="@string/form_tel"
android:singleLine="true"
android:inputType="textCapSentences" />
android:inputType="number" />
</android.support.design.widget.TextInputLayout>
<TextView
android:text="@string/instructions_tel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="-5dp"
android:id="@+id/instructions_tel"
android:textAppearance="?android:attr/textAppearanceSmall" />
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -55,30 +62,42 @@
android:layout_marginLeft="-5dp"
android:layout_marginRight="-5dp">
<EditText
android:id="@+id/lastname"
android:id="@+id/mail"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="Lastname"
android:hint="@string/form_mail"
android:singleLine="true"
android:inputType="textCapSentences" />
android:inputType="text" />
</android.support.design.widget.TextInputLayout>
<TextView
android:text="@string/instructions_mail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="-5dp"
android:id="@+id/instructions_mail"
android:textAppearance="?android:attr/textAppearanceSmall" />
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/MyTheme"
android:layout_marginTop="10dp"
android:layout_marginLeft="-5dp"
android:layout_marginRight="-5dp"
android:windowSoftInputMode="stateHidden">
android:layout_marginRight="-5dp">
<EditText
android:id="@+id/birthdate"
android:id="@+id/iban"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="Birthdate"
android:hint="@string/form_iban"
android:singleLine="true"
android:editable="false"
android:windowSoftInputMode="stateAlwaysHidden" />
android:inputType="text" />
</android.support.design.widget.TextInputLayout>
<TextView
android:text="@string/instructions_iban"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="-5dp"
android:id="@+id/instructions_iban"
android:textAppearance="?android:attr/textAppearanceSmall" />
<Button
android:id="@+id/next"
android:layout_width="wrap_content"
@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:local="http://schemas.android.com/apk/res-auto"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/container"
android:focusable="true"
android:focusableInTouchMode="true">
<include
android:id="@+id/toolbar"
layout="@layout/toolbar" />
<ScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/toolbar"
android:orientation="vertical">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:id="@+id/main_content"
android:padding="50px">
<TextView
android:text="@string/form_intro"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/intro" />
<TextView
android:text="@string/form_amount"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/amount"
android:layout_marginTop="10dp" />
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/MyTheme"
android:layout_marginTop="10dp"
android:layout_marginLeft="-5dp"
android:layout_marginRight="-5dp">
<EditText
android:id="@+id/donation"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="@string/form_donation"
android:singleLine="true"
android:inputType="numberDecimal" />
</android.support.design.widget.TextInputLayout>
<TextView
android:text="@string/instructions_donation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="-5dp"
android:id="@+id/instructions_donation"
android:textAppearance="?android:attr/textAppearanceSmall" />
<Button
android:id="@+id/next"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
style="?android:attr/borderlessButtonStyle"
android:textColor="#ff000000"
android:text="@string/generic_next"
android:background="#ffffff00" />
</LinearLayout>
</ScrollView>
</RelativeLayout>
@@ -0,0 +1,107 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:local="http://schemas.android.com/apk/res-auto"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/container"
android:focusable="true"
android:focusableInTouchMode="true">
<include
android:id="@+id/toolbar"
layout="@layout/toolbar" />
<ScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/toolbar"
android:orientation="vertical">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:id="@+id/main_content"
android:padding="50px">
<TextView
android:text="@string/form_intro"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/intro" />
<TextView
android:text="@string/form_overview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/overview"
android:layout_marginTop="10dp" />
<TextView
android:id="@+id/overview_01"
android:text="Volunteer: "
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp" />
<TextView
android:id="@+id/overview_02"
android:text="Charity: "
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp" />
<TextView
android:id="@+id/overview_03"
android:text="Name: "
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp" />
<TextView
android:id="@+id/overview_04"
android:text="Birthdate: "
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp" />
<TextView
android:id="@+id/overview_05"
android:text="Adress: "
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp" />
<TextView
android:id="@+id/overview_06"
android:text="Province: "
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp" />
<TextView
android:id="@+id/overview_07"
android:text="Telephone Number: "
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp" />
<TextView
android:id="@+id/overview_08"
android:text="E-mail: "
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp" />
<TextView
android:id="@+id/overview_09"
android:text="IBAN: "
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp" />
<TextView
android:id="@+id/overview_10"
android:text="Amount: "
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp" />
<Button
android:id="@+id/submit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:layout_marginRight="15dp"
style="?android:attr/borderlessButtonStyle"
android:textColor="#ff000000"
android:text="@string/generic_donate"
android:background="#ffffff00" />
</LinearLayout>
</ScrollView>
</RelativeLayout>
@@ -3,12 +3,33 @@
<string name="app_name">Amnesties</string>
<string name="instructions_username">This is used later in the app.</string>
<string name="instructions_password">This is just for flavor and because I wanted to use the strings file some more.</string>
<string name="instructions_tel">+32 49 59 49 0 51</string>
<string name="instructions_mail">person@example.com</string>
<string name="instructions_iban">IBAN BE17 0635 3734 9520</string>
<string name="instructions_donation">Donations of 10€ or higher are more tax deducatable meaning you\'ll give more and pay less.</string>
<string name="error_empty">This field can not be empty.</string>
<string name="error_unknown">An unknown error occured.</string>
<string name="error_format">This field is incorrect.</string>
<string name="generic_hi">Hi, I\'m</string>
<string name="generic_continue">Continue</string>
<string name="generic_next">Next</string>
<string name="generic_donate">Donate</string>
<string name="generic_cancel">Cancel</string>
<string name="form_street">Street</string>
<string name="form_number">Number</string>
<string name="form_province">Province</string>
<string name="form_birthdate">Birthdate</string>
<string name="form_lastname">Lastname</string>
<string name="form_name">Name</string>
<string name="form_iban">IBAN Number</string>
<string name="form_tel">Telephone Number</string>
<string name="form_mail">E-mail</string>
<string name="form_donation">Donation</string>
<string name="form_intro">By submitting this form, you agree to donate a specified sum on a monthly basis for the benefit of Amnesty International.</string>
<string name="form_personal">Please fill in your personal information below.</string>
<string name="form_contact">Please fill in your contact and billing information below.</string>
<string name="form_amount">Please fill in the amount you would like to donate below.</string>
<string name="form_overview">This is an overview of everything you\'ve entered. Read carefully to make sure everything is correct</string>
<string name="ui_newDonation">New Donation</string>
<string name="ui_miss">Miss</string>
<string name="yemen_title">Yemen</string>