Java Code Examples for android.widget.LinearLayout#getTop()
The following examples show how to use
android.widget.LinearLayout#getTop() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BIGChart.java From xDrip with GNU General Public License v3.0 | 5 votes |
private boolean linearLayout(LinearLayout layout,int x, int y) { if (x >=layout.getLeft() && x <= layout.getRight()&& y >= layout.getTop() && y <= layout.getBottom()) { return true; } return false; }
Example 2
Source File: CircleWatchface.java From xDrip with GNU General Public License v3.0 | 5 votes |
private boolean linearLayout(LinearLayout layout,int x, int y) { if (x >=layout.getLeft() && x <= layout.getRight()&& y >= layout.getTop() && y <= layout.getBottom()) { return true; } return false; }
Example 3
Source File: LargeHome.java From xDrip with GNU General Public License v3.0 | 5 votes |
private boolean linearLayout(LinearLayout layout, int x, int y) { if (x >=layout.getLeft() && x <= layout.getRight()&& y >= layout.getTop() && y <= layout.getBottom()) { return true; } return false; }
Example 4
Source File: Home.java From xDrip with GNU General Public License v3.0 | 5 votes |
private boolean linearLayout(LinearLayout layout,int x, int y) { if (x >=layout.getLeft() && x <= layout.getRight()&& y >= layout.getTop() && y <= layout.getBottom()) { return true; } return false; }
Example 5
Source File: BIGChart.java From xDrip-plus with GNU General Public License v3.0 | 5 votes |
private boolean linearLayout(LinearLayout layout,int x, int y) { if (x >=layout.getLeft() && x <= layout.getRight()&& y >= layout.getTop() && y <= layout.getBottom()) { return true; } return false; }
Example 6
Source File: CircleWatchface.java From xDrip-plus with GNU General Public License v3.0 | 5 votes |
private boolean linearLayout(LinearLayout layout,int x, int y) { if (x >=layout.getLeft() && x <= layout.getRight()&& y >= layout.getTop() && y <= layout.getBottom()) { return true; } return false; }
Example 7
Source File: LargeHome.java From xDrip-plus with GNU General Public License v3.0 | 5 votes |
private boolean linearLayout(LinearLayout layout, int x, int y) { if (x >=layout.getLeft() && x <= layout.getRight()&& y >= layout.getTop() && y <= layout.getBottom()) { return true; } return false; }
Example 8
Source File: Home.java From xDrip-plus with GNU General Public License v3.0 | 5 votes |
private boolean linearLayout(LinearLayout layout,int x, int y) { if (x >=layout.getLeft() && x <= layout.getRight()&& y >= layout.getTop() && y <= layout.getBottom()) { return true; } return false; }
Example 9
Source File: ChangeTabLayout.java From ChangeTabLayout with Apache License 2.0 | 4 votes |
private void scrollToTab(int tabIndex, float positionOffset) { final int tabStripChildCount = tabStrip.getChildCount(); if (tabStripChildCount == 0 || tabIndex < 0 || tabIndex >= tabStripChildCount) { return; } LinearLayout selectedTab = (LinearLayout) getTabAt(tabIndex); if (0f <= positionOffset && positionOffset < 1f) { if(!tabLayoutState){ ImageView imageView = (ImageView) selectedTab.getChildAt(0); ((RevealDrawable)imageView.getDrawable()).setOrientation(RevealDrawable.VERTICAL); imageView.setImageLevel((int) (positionOffset * 5000 + 5000)); } if(flag){ ChangeTextView textView = (ChangeTextView) selectedTab.getChildAt(1); textView.setLevel((int) (positionOffset * 5000 + 5000)); } } if(!(tabIndex + 1 >= tabStripChildCount)){ LinearLayout tab = (LinearLayout) getTabAt(tabIndex + 1); if(!tabLayoutState){ ImageView img = (ImageView) tab.getChildAt(0); ((RevealDrawable)img.getDrawable()).setOrientation(RevealDrawable.VERTICAL); img.setImageLevel((int) (positionOffset * 5000)); } if(flag){ ChangeTextView text = (ChangeTextView) tab.getChildAt(1); text.setLevel((int) (positionOffset * 5000)); } } int titleOffset = tabViewHeight * 2; int extraOffset = (int) (positionOffset * selectedTab.getHeight()); int y = (tabIndex > 0 || positionOffset > 0) ? -titleOffset : 0; int start = selectedTab.getTop(); y += start + extraOffset; scrollTo(0, y); }