Merge pull request #204 from xliiv/focus_index_for_linear_layout

Add LinearLayout.get_focus_index
This commit is contained in:
Alexandre Bury 2018-02-08 10:05:43 -08:00 committed by GitHub
commit bbc3d3d5b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;