From 167f17ad14d8af29b4b5cda11b4ffa9ebc7944a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20Magneres?= Date: Sun, 9 Dec 2012 21:12:56 -0200 Subject: [PATCH 1/2] Fixed bug Exception launched when it had no fields Check if numFields is 0, set the fieldWidth to 0 instead of making a division with that number. This way it avoids a division by zero. --- .../JustifiedEvenlySpacedHorizontalFieldManager.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Advanced UI/src/com/samples/toolkit/ui/container/JustifiedEvenlySpacedHorizontalFieldManager.java b/Advanced UI/src/com/samples/toolkit/ui/container/JustifiedEvenlySpacedHorizontalFieldManager.java index f2f7639..35903e0 100644 --- a/Advanced UI/src/com/samples/toolkit/ui/container/JustifiedEvenlySpacedHorizontalFieldManager.java +++ b/Advanced UI/src/com/samples/toolkit/ui/container/JustifiedEvenlySpacedHorizontalFieldManager.java @@ -46,7 +46,13 @@ protected void sublayout( int width, int height ) // There may be a few remaining pixels after dividing up the space // we must split up the space between the first and last buttons - int fieldWidth = width / numFields; + + //if there are no fields the current fieldWidth should be 0 + final int fieldWidth; + if (numFields == 0) + fieldWidth = 0; + else + fieldWidth = width / numFields; int firstFieldExtra = 0; int lastFieldExtra = 0; From 3feceb219b278305c1bdc0240246b51830f8002c Mon Sep 17 00:00:00 2001 From: Tim Windsor Date: Mon, 15 Apr 2013 17:55:21 -0400 Subject: [PATCH 2/2] updating links and removing references to github messages --- Advanced UI/README.md | 4 ++-- Analytics/README.md | 2 +- NFC/NfcReadNdefSmartTag/README.md | 4 ++-- NFC/NfcSnepResponder/README.md | 4 ++-- NFC/NfcTransactionHandler/README.md | 4 ++-- NFC/NfcVirtualTargetFun/README.md | 4 ++-- NFC/NfcWriteNdefSmartTag/README.md | 4 ++-- README.md | 2 +- Simple Location API/README.md | 2 +- Titlebar/README.md | 2 +- YouTube Client/README.md | 2 +- 11 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Advanced UI/README.md b/Advanced UI/README.md index c388529..0988b33 100644 --- a/Advanced UI/README.md +++ b/Advanced UI/README.md @@ -33,12 +33,12 @@ The sample code for this application is Open Source under the [Apache 2.0 Licens ## Contributing Changes -Please see the [README](https://github.com/blackberry/BlackBerry-Java) of the BlackBerry-Java repository for instructions on how to add new Samples or make modifications to existing Samples. +Please see the [README](https://github.com/blackberry/Samples-For-Java) of the BlackBerry-Java repository for instructions on how to add new Samples or make modifications to existing Samples. ## Bug Reporting and Feature Requests -If you find a bug in a Sample, or have an enhancement request, simply file an [Issue](https://github.com/blackberry/BlackBerry-Java/issues) for the Sample and send a message (via github messages) to the Sample Author(s) to let them know that you have filed an [Issue](https://github.com/blackberry/BlackBerry-Java/issues). +If you find a bug in a Sample, or have an enhancement request, simply file an [Issue](https://github.com/blackberry/Samples-For-Java/issues) for the Sample. ## Disclaimer diff --git a/Analytics/README.md b/Analytics/README.md index f9d6fa7..d1a05b4 100644 --- a/Analytics/README.md +++ b/Analytics/README.md @@ -31,7 +31,7 @@ Please see the [README](https://github.com/blackberry/Samples-for-Java) of the S ## Bug Reporting and Feature Requests -If you find a bug in a Sample, or have an enhancement request, simply file an [Issue](https://github.com/blackberry/Samples-for-Java/issues) for the Sample and send a message (via github messages) to the Sample Author(s) to let them know that you have filed an [Issue](https://github.com/blackberry/Samples-for-Java/issues). +If you find a bug in a Sample, or have an enhancement request, simply file an [Issue](https://github.com/blackberry/Samples-for-Java/issues) for the Sample. ## Disclaimer diff --git a/NFC/NfcReadNdefSmartTag/README.md b/NFC/NfcReadNdefSmartTag/README.md index 6e8678e..07da287 100644 --- a/NFC/NfcReadNdefSmartTag/README.md +++ b/NFC/NfcReadNdefSmartTag/README.md @@ -32,12 +32,12 @@ None ## Contributing Changes -Please see the [README](https://github.com/blackberry/BlackBerry-Java) of the BlackBerry-Java repository for instructions on how to add new Samples or make modifications to existing Samples. +Please see the [README](https://github.com/blackberry/Samples-For-Java) of the BlackBerry-Java repository for instructions on how to add new Samples or make modifications to existing Samples. ## Bug Reporting and Feature Requests -If you find a bug in a Sample, or have an enhancement request, simply file an [Issue](https://github.com/blackberry/BlackBerry-Java/issues) for the Sample and send a message (via github messages) to the Sample Author(s) to let them know that you have filed an [Issue](https://github.com/blackberry/BlackBerry-Java/issues). +If you find a bug in a Sample, or have an enhancement request, simply file an [Issue](https://github.com/blackberry/Samples-For-Java/issues) for the Sample. ## Disclaimer diff --git a/NFC/NfcSnepResponder/README.md b/NFC/NfcSnepResponder/README.md index 42f29f0..b3986cd 100644 --- a/NFC/NfcSnepResponder/README.md +++ b/NFC/NfcSnepResponder/README.md @@ -34,12 +34,12 @@ None ## Contributing Changes -Please see the [README](https://github.com/blackberry/BlackBerry-Java) of the BlackBerry-Java repository for instructions on how to add new Samples or make modifications to existing Samples. +Please see the [README](https://github.com/blackberry/Samples-For-Java) of the BlackBerry-Java repository for instructions on how to add new Samples or make modifications to existing Samples. ## Bug Reporting and Feature Requests -If you find a bug in a Sample, or have an enhancement request, simply file an [Issue](https://github.com/blackberry/BlackBerry-Java/issues) for the Sample and send a message (via github messages) to the Sample Author(s) to let them know that you have filed an [Issue](https://github.com/blackberry/BlackBerry-Java/issues). +If you find a bug in a Sample, or have an enhancement request, simply file an [Issue](https://github.com/blackberry/Samples-For-Java/issues) for the Sample. ## Disclaimer diff --git a/NFC/NfcTransactionHandler/README.md b/NFC/NfcTransactionHandler/README.md index 0cb2e9d..231de3d 100644 --- a/NFC/NfcTransactionHandler/README.md +++ b/NFC/NfcTransactionHandler/README.md @@ -34,12 +34,12 @@ None ## Contributing Changes -Please see the [README](https://github.com/blackberry/BlackBerry-Java) of the BlackBerry-Java repository for instructions on how to add new Samples or make modifications to existing Samples. +Please see the [README](https://github.com/blackberry/Samples-For-Java) of the BlackBerry-Java repository for instructions on how to add new Samples or make modifications to existing Samples. ## Bug Reporting and Feature Requests -If you find a bug in a Sample, or have an enhancement request, simply file an [Issue](https://github.com/blackberry/BlackBerry-Java/issues) for the Sample and send a message (via github messages) to the Sample Author(s) to let them know that you have filed an [Issue](https://github.com/blackberry/BlackBerry-Java/issues). +If you find a bug in a Sample, or have an enhancement request, simply file an [Issue](https://github.com/blackberry/Samples-For-Java/issues) for the Sample. ## Disclaimer diff --git a/NFC/NfcVirtualTargetFun/README.md b/NFC/NfcVirtualTargetFun/README.md index 56750e7..2d3d9cb 100644 --- a/NFC/NfcVirtualTargetFun/README.md +++ b/NFC/NfcVirtualTargetFun/README.md @@ -32,12 +32,12 @@ None ## Contributing Changes -Please see the [README](https://github.com/blackberry/BlackBerry-Java) of the BlackBerry-Java repository for instructions on how to add new Samples or make modifications to existing Samples. +Please see the [README](https://github.com/blackberry/Samples-For-Java) of the BlackBerry-Java repository for instructions on how to add new Samples or make modifications to existing Samples. ## Bug Reporting and Feature Requests -If you find a bug in a Sample, or have an enhancement request, simply file an [Issue](https://github.com/blackberry/BlackBerry-Java/issues) for the Sample and send a message (via github messages) to the Sample Author(s) to let them know that you have filed an [Issue](https://github.com/blackberry/BlackBerry-Java/issues). +If you find a bug in a Sample, or have an enhancement request, simply file an [Issue](https://github.com/blackberry/Samples-For-Java/issues) for the Sample. ## Disclaimer diff --git a/NFC/NfcWriteNdefSmartTag/README.md b/NFC/NfcWriteNdefSmartTag/README.md index 8d8e4bd..49c244a 100644 --- a/NFC/NfcWriteNdefSmartTag/README.md +++ b/NFC/NfcWriteNdefSmartTag/README.md @@ -32,12 +32,12 @@ None ## Contributing Changes -Please see the [README](https://github.com/blackberry/BlackBerry-Java) of the BlackBerry-Java repository for instructions on how to add new Samples or make modifications to existing Samples. +Please see the [README](https://github.com/blackberry/Samples-For-Java) of the BlackBerry-Java repository for instructions on how to add new Samples or make modifications to existing Samples. ## Bug Reporting and Feature Requests -If you find a bug in a Sample, or have an enhancement request, simply file an [Issue](https://github.com/blackberry/BlackBerry-Java/issues) for the Sample and send a message (via github messages) to the Sample Author(s) to let them know that you have filed an [Issue](https://github.com/blackberry/BlackBerry-Java/issues). +If you find a bug in a Sample, or have an enhancement request, simply file an [Issue](https://github.com/blackberry/Samples-For-Java/issues) for the Sample. ## Disclaimer diff --git a/README.md b/README.md index f947077..d6c0a03 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ The README for the Sample should be updated to indicate the new Author. ## Bug Reporting and Feature Requests -If you find a bug in a Sample, or have an enhancement request, simply file an [Issue](https://github.com/blackberry/Samples-for-Java/issues) for the Sample and send a message (via github messages) to the Sample Author(s) to let them know that you have filed an [Issue](https://github.com/blackberry/Samples-for-Java/issues). +If you find a bug in a Sample, or have an enhancement request, simply file an [Issue](https://github.com/blackberry/Samples-for-Java/issues) for the Sample. ## Disclaimer diff --git a/Simple Location API/README.md b/Simple Location API/README.md index 0239198..7c37521 100644 --- a/Simple Location API/README.md +++ b/Simple Location API/README.md @@ -34,7 +34,7 @@ Please see the [README](https://github.com/blackberry/Samples-for-Java) of the S ## Bug Reporting and Feature Requests -If you find a bug in a Sample, or have an enhancement request, simply file an [Issue](https://github.com/blackberry/Samples-for-Java/issues) for the Sample and send a message (via github messages) to the Sample Author(s) to let them know that you have filed an [Issue](https://github.com/blackberry/Samples-for-Java/issues). +If you find a bug in a Sample, or have an enhancement request, simply file an [Issue](https://github.com/blackberry/Samples-for-Java/issues) for the Sample. ## Disclaimer diff --git a/Titlebar/README.md b/Titlebar/README.md index a046b72..ff599bd 100644 --- a/Titlebar/README.md +++ b/Titlebar/README.md @@ -89,7 +89,7 @@ Please see the [README](https://github.com/blackberry/Samples-for-Java) of the S ## Bug Reporting and Feature Requests -If you find a bug in a Sample, or have an enhancement request, simply file an [Issue](https://github.com/blackberry/Samples-for-Java/issues) for the Sample and send a message (via github messages) to the Sample Author(s) to let them know that you have filed an [Issue](https://github.com/blackberry/Samples-for-Java/issues). +If you find a bug in a Sample, or have an enhancement request, simply file an [Issue](https://github.com/blackberry/Samples-for-Java/issues) for the Sample. ## Disclaimer diff --git a/YouTube Client/README.md b/YouTube Client/README.md index 799fec9..1ac6cc9 100644 --- a/YouTube Client/README.md +++ b/YouTube Client/README.md @@ -33,7 +33,7 @@ Please see the [README](https://github.com/blackberry/Samples-for-Java) of the S ## Bug Reporting and Feature Requests -If you find a bug in a Sample, or have an enhancement request, simply file an [Issue](https://github.com/blackberry/Samples-for-Java/issues) for the Sample and send a message (via github messages) to the Sample Author(s) to let them know that you have filed an [Issue](https://github.com/blackberry/Samples-for-Java/issues). +If you find a bug in a Sample, or have an enhancement request, simply file an [Issue](https://github.com/blackberry/Samples-for-Java/issues) for the Sample. ## Disclaimer