diff options
-rw-r--r-- | ide_common/src/com/android/ide/common/rendering/LayoutLibrary.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/ide_common/src/com/android/ide/common/rendering/LayoutLibrary.java b/ide_common/src/com/android/ide/common/rendering/LayoutLibrary.java index 3294cbe..e1256fe 100644 --- a/ide_common/src/com/android/ide/common/rendering/LayoutLibrary.java +++ b/ide_common/src/com/android/ide/common/rendering/LayoutLibrary.java @@ -354,6 +354,23 @@ public class LayoutLibrary { return NOT_IMPLEMENTED.createResult(); } + /** + * Utility method returning the baseline value for a given view object. This basically returns + * View.getBaseline(). + * + * @param viewObject the object for which to return the index. + * + * @return the baseline value or -1 if not applicable to the view object or if this layout + * library does not implement this method. + */ + public int getViewBaseline(Object viewObject) { + if (mBridge != null) { + return mBridge.getViewBaseline(viewObject); + } + + return -1; + } + // ------ Implementation |