summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Android (Google) Code Review <android-gerrit@google.com> 2009-04-30 15:35:28 -0700
committer Android (Google) Code Review <android-gerrit@google.com> 2009-04-30 15:35:28 -0700
commit980d12b13bad50d6fbb50f3fe8f8dbc451a7d87c (patch)
treeb04b9bb4288b57fa99951da1b40e64ecf0841986
parentd8593312296fd2193a070c1a074840d83b7f49cb (diff)
parent8a342a3cc07162cdb5458692f04fbc677802919e (diff)
Merge change 838 into donut
* changes: Fix typo in exception message and add a new exception if the user tries to use the same child as both the handle and content for the SlidingDrawer.
-rw-r--r--core/java/android/widget/SlidingDrawer.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/java/android/widget/SlidingDrawer.java b/core/java/android/widget/SlidingDrawer.java
index e0f1bb41ce89..92561edc1cd1 100644
--- a/core/java/android/widget/SlidingDrawer.java
+++ b/core/java/android/widget/SlidingDrawer.java
@@ -206,10 +206,15 @@ public class SlidingDrawer extends ViewGroup {
int contentId = a.getResourceId(R.styleable.SlidingDrawer_content, 0);
if (contentId == 0) {
- throw new IllegalArgumentException("The handle attribute is required and must refer "
+ throw new IllegalArgumentException("The content attribute is required and must refer "
+ "to a valid child.");
}
+ if (handleId == contentId) {
+ throw new IllegalArgumentException("The content and handle attributes must refer "
+ + "to different children.");
+ }
+
mHandleId = handleId;
mContentId = contentId;