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.
This commit is contained in:
@@ -206,10 +206,15 @@ public class SlidingDrawer extends ViewGroup {
|
|||||||
|
|
||||||
int contentId = a.getResourceId(R.styleable.SlidingDrawer_content, 0);
|
int contentId = a.getResourceId(R.styleable.SlidingDrawer_content, 0);
|
||||||
if (contentId == 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.");
|
+ "to a valid child.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (handleId == contentId) {
|
||||||
|
throw new IllegalArgumentException("The content and handle attributes must refer "
|
||||||
|
+ "to different children.");
|
||||||
|
}
|
||||||
|
|
||||||
mHandleId = handleId;
|
mHandleId = handleId;
|
||||||
mContentId = contentId;
|
mContentId = contentId;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user