List of usage examples for android.view View equals
public boolean equals(Object obj)
From source file:br.com.brolam.cloudvision.ui.NoteVisionActivity.java
@Override public void onClick(View view) { if (view.equals(this.fabFlashOnOff)) { cameraFlashOnOff(null);/*w w w.j a va 2 s .c om*/ } else if (view.equals(this.fabCameraPlayStop)) { cameraPlayPause(null); } else if (view.equals(this.fabAdd)) { saveNoteVision(false); } }
From source file:org.borderstone.tagtags.TTProtocolActivity.java
@Override public void onClick(View v) { if (v.equals(btnUpload)) { if (Constants.selectServer(this)) { Log.d("Server", "Dialog?"); BServerSelectionDialog serverNav = new BServerSelectionDialog(this, this); serverNav.setTitle("Select server"); AlertDialog serverDialog = serverNav.create(); serverDialog.show();/*ww w . j a v a 2 s .c o m*/ } else { startUpload(); } } else if (v.equals(btnGPS) && gpsButtonActive) { if (locationManager != null) { for (GPSEventListener l : gpsEventListeners) l.onSaveData(); killLocationManager(); setGPSButtonEnabled(false); Toast.makeText(this, "Saved coordinates.", Toast.LENGTH_SHORT).show(); Toast.makeText(this, "Long-press the button to search for new coordinates.", Toast.LENGTH_LONG) .show(); } else { startLocationListener(); for (GPSEventListener l : gpsEventListeners) l.onActivate(); } } }
From source file:com.hakerjack.experiments.CustomSwipeRefreshLayout.java
private void ensureTarget() { // Don't bother getting the parent height if the parent hasn't been laid // out yet.// w ww . j a v a 2s.com if (mTarget == null) { for (int i = 0; i < getChildCount(); i++) { View child = getChildAt(i); if (!child.equals(mSpinner)) { mTarget = child; break; } } } }
From source file:com.lovejjfg.powerrefresh.PowerRefreshLayout.java
private void ensureTarget() { // Don't bother getting the parent height if the parent hasn't been laid // out yet./*from w ww . j ava 2s . c o m*/ if (mTarget == null) { for (int i = 0; i < getChildCount(); i++) { View child = getChildAt(i); if (!child.equals(header) || !child.equals(footer)) { mTarget = child; break; } } } }
From source file:com.gu.swiperefresh.SwipeRefreshPlush.java
private void ensureTarget() { // Don't bother getting the parent height if the parent hasn't been laid // out yet.//from w w w . jav a2 s .c o m if (mTarget == null) { for (int i = 0; i < getChildCount(); i++) { View child = getChildAt(i); if (!child.equals(mRefreshView) && !child.equals(mLoadMoreView)) { mTarget = child; break; } } } }
From source file:com.hengye.swiperefresh.SwipeRefreshCustomLayout.java
private void ensureTarget() { // Don't bother getting the parent height if the parent hasn't been laid // out yet./*from w ww . ja v a 2 s .c o m*/ if (mTarget == null) { for (int i = 0; i < getChildCount(); i++) { View child = getChildAt(i); if (!child.equals(mLoadingView)) { mTarget = child; break; } } } }
From source file:com.hiyjeain.android.DevBase.widget.DoubleSwipeRefreshLayout.java
private void ensureTarget() { // Don't bother getting the parent height if the parent hasn't been laid // out yet.//from w w w.j av a2 s. c o m if (mTarget == null) { for (int i = 0; i < getChildCount(); i++) { View child = getChildAt(i); if (!child.equals(mCircleView) && !child.equals(mMoreImageView)) { mTarget = child; break; } } } }
From source file:com.idrv.coach.ui.widget.SwipeRefresh.java
protected void ensureTarget() { // Don't bother getting the parent height if the parent hasn't been laid // out yet.//ww w. j a v a 2s.c o m if (mTarget == null) { for (int i = 0; i < getChildCount(); i++) { View child = getChildAt(i); if (!child.equals(mCircleView)) { mTarget = child; break; } } } }
From source file:anabolicandroids.chanobol.util.swipebottom.SwipeRefreshLayoutBottom.java
private void ensureTarget() { // Don't bother getting the parent height if the parent hasn't been laid // out yet.// w ww.j a v a 2s . c om if (mTarget == null) { for (int i = 0; i < getChildCount(); i++) { View child = getChildAt(i); if (!child.equals(mCircleView)) { mTarget = child; break; } } } }
From source file:com.orange.ocara.ui.activity.ResultAuditActivity.java
private void scrollTo(final View view) { final Rect scrollBounds = new Rect(); scrollContainer.getHitRect(scrollBounds); scrollBounds.set(scrollBounds.left, scrollBounds.top, scrollBounds.right, scrollBounds.bottom - 200); view.getLocalVisibleRect(scrollBounds); if (scrollBounds.height() >= view.getHeight()) { return; // no scroll need }// w w w .ja va 2s .com // Determine where to set the scroll-to to by measuring the distance from the top of the scroll view // to the control to focus on by summing the "top" position of each view in the hierarchy. int yDistanceToControlsView = 0; View parentView = (View) view.getParent(); while (true) { if (parentView.equals(scrollContainer)) { break; } yDistanceToControlsView += parentView.getTop(); parentView = (View) parentView.getParent(); } // Compute the final position value for the top and bottom of the control in the scroll view. final int topInScrollView = yDistanceToControlsView + view.getTop(); final int bottomInScrollView = yDistanceToControlsView + view.getBottom(); // Post the scroll action to happen on the scrollView with the UI thread. scrollContainer.post(new Runnable() { @Override public void run() { int height = view.getHeight(); scrollContainer.smoothScrollTo(0, topInScrollView); //((topInScrollView + bottomInScrollView) / 2) - height); view.requestFocus(); } }); }