From 56fe7ab0dfa63e776c92add29a82349dcba63af7 Mon Sep 17 00:00:00 2001 From: Tymoteusz Jankowski Date: Thu, 8 Feb 2018 14:44:23 +0100 Subject: [PATCH] Add LinearLayout.get_focus_index --- src/views/linear_layout.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/views/linear_layout.rs b/src/views/linear_layout.rs index 9788c92..95771ca 100644 --- a/src/views/linear_layout.rs +++ b/src/views/linear_layout.rs @@ -145,6 +145,11 @@ impl LinearLayout { self.invalidate(); } + /// Returns index of focused inner view + pub fn get_focus_index(&self) -> usize { + self.focus + } + // Invalidate the view, to request a layout next time fn invalidate(&mut self) { self.cache = None;