From f870352769e9446245deb6e8e3f49a6d3f9e0783 Mon Sep 17 00:00:00 2001 From: quelcom Date: Sat, 17 Sep 2011 13:40:35 +0300 Subject: [PATCH 1/2] Adding title validation --- .../androidaalto/bookingroom/logic/MeetingInfoValidator.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/org/androidaalto/bookingroom/logic/MeetingInfoValidator.java b/src/org/androidaalto/bookingroom/logic/MeetingInfoValidator.java index 882055a..bfd5539 100644 --- a/src/org/androidaalto/bookingroom/logic/MeetingInfoValidator.java +++ b/src/org/androidaalto/bookingroom/logic/MeetingInfoValidator.java @@ -78,6 +78,11 @@ public ValidationResult fullValidate(MeetingInfo meetingInfo) { public ValidationResult minimumValidate(MeetingInfo meetingInfo) { final ValidationResult errors = new ValidationResult(); + + if ( meetingInfo.getTitle().trim().length() == 0 ) { + errors.addError(new FieldError(meetingInfo, "title", "empty", "Meeting title is required")); + } + final Time now = new Time(); now.setToNow(); if (meetingInfo.getStart().before(now)) From 616b99dce1480acc4563ed3a93ff0f744468c267 Mon Sep 17 00:00:00 2001 From: quelcom Date: Sat, 17 Sep 2011 13:56:34 +0300 Subject: [PATCH 2/2] Aligning layout screen and initial about text --- res/layout/about.xml | 1 + res/values/strings.xml | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/res/layout/about.xml b/res/layout/about.xml index 553145e..98fc69a 100644 --- a/res/layout/about.xml +++ b/res/layout/about.xml @@ -10,6 +10,7 @@ android:src="@drawable/androidaalto_logo" android:layout_marginBottom="10dip" android:gravity="center_vertical|center_horizontal" + android:layout_centerHorizontal="true" android:layout_width="wrap_content" android:layout_height="wrap_content"> diff --git a/res/values/strings.xml b/res/values/strings.xml index 9e5b09b..cea0d9c 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -35,7 +35,10 @@ -(C) AndroidAalto 2011\n\n\ -TODO some text in here\n\ +(C) AndroidAalto 2011\n\ +http://androidaalto.org/bookingroom/\n\n\ +Authors: @j_u_s_h @hleinone @josepmariaroca @gellevi\n\n\ +Source code: https://github.com/AndroidAalto/BookingRoom\n\ +Released under GNU General Public License version 3\n\