From 79cbcda75ae01c636c756c6e5da9b7ffefd1546a Mon Sep 17 00:00:00 2001 From: Akash Yadav Date: Sat, 27 May 2023 19:43:30 +0530 Subject: [PATCH] docs: update JavaDoc for IViewGroupAdapter.computeChildIndex --- .../java/com/itsaky/androidide/inflater/IViewGroupAdapter.kt | 2 ++ .../main/java/com/itsaky/androidide/inflater/LayoutStrategy.kt | 2 ++ 2 files changed, 4 insertions(+) diff --git a/xml-inflater/src/main/java/com/itsaky/androidide/inflater/IViewGroupAdapter.kt b/xml-inflater/src/main/java/com/itsaky/androidide/inflater/IViewGroupAdapter.kt index c6418af0e..2878e7e51 100644 --- a/xml-inflater/src/main/java/com/itsaky/androidide/inflater/IViewGroupAdapter.kt +++ b/xml-inflater/src/main/java/com/itsaky/androidide/inflater/IViewGroupAdapter.kt @@ -37,6 +37,8 @@ interface IViewGroupAdapter { * Compute the index of the child based on the given [x] and [y] coordinates * of the drag event. * + * @param parent The [IViewGroup] in which the child will be added. + * This is guaranteed to have at least one child view. * @param x The X coordinate of the drag event. * @param y The Y coordinate of the drag event. * @return The index at which the new child must be added diff --git a/xml-inflater/src/main/java/com/itsaky/androidide/inflater/LayoutStrategy.kt b/xml-inflater/src/main/java/com/itsaky/androidide/inflater/LayoutStrategy.kt index 6bc94a51e..618b5fe6d 100644 --- a/xml-inflater/src/main/java/com/itsaky/androidide/inflater/LayoutStrategy.kt +++ b/xml-inflater/src/main/java/com/itsaky/androidide/inflater/LayoutStrategy.kt @@ -48,6 +48,8 @@ interface LayoutStrategy { * Compute the index of the child based on the given [x] and [y] coordinates * of the drag event. * + * @param parent The [IViewGroup] in which the child will be added. + * This is guaranteed to have at least one child view. * @param x The X coordinate of the drag event. * @param y The Y coordinate of the drag event. * @return The index at which the new child must be added