List of usage examples for android.view View toString
public String toString()
From source file:com.dongbang.yutian.activity.CommonScanActivity.java
@Override public void onClick(View v) { Log.i("qin:", v.toString()); switch (v.getId()) { case R.id.qrcode_g_gallery: showPictures(PHOTOREQUESTCODE);// ww w. ja va 2s .co m break; case R.id.iv_light: scanManager.switchLight(); break; case R.id.qrcode_ic_back: finish(); break; case R.id.service_register_rescan://???? startScan(); break; case R.id.authorize_return: finish(); break; } }
From source file:com.kk.binding.view.BindAdapterFrameLayout.java
private void init(AttributeSet attrs) { Context context = getContext(); if (attrs != null && context != null) { TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.BindAdapterFrameLayout); if (a != null) { childLayoutId = a.getResourceId(R.styleable.BindAdapterFrameLayout_childLayout, 0); }//from w ww. j av a 2s . co m } BindLog.d(TAG, "inflate BindAdapterFrameLayout"); if (childLayoutId > 0) { setOnHierarchyChangeListener(new OnHierarchyChangeListener() { @Override public void onChildViewAdded(View parent, View child) { BindLog.d(TAG, "BindAdapterFrameLayout onChildViewAdded: " + (parent.isInEditMode() ? child.getClass().getName() : child.toString())); if (child instanceof ViewPager) { pagerAdapter = new BindViewPagerAdapter<ViewPager>((ViewPager) child, childLayoutId); } else if (child instanceof ViewGroup) { adapter = new BindViewGroupAdapter<ViewGroup>((ViewGroup) child, childLayoutId); } } @Override public void onChildViewRemoved(View parent, View child) { } }); } }
From source file:li.barter.fragments.BooksPagerFragment.java
/** * @param view The drag handle to be set for the Sliding Pane Layout *//*ww w. ja v a2 s. co m*/ public void setDragHandle(View view) { Logger.v(TAG, "Setting Drag View %s", view.toString()); mSlidingLayout.setDragView(view); mSlidingLayout.setEnableDragViewTouchEvents(false); }
From source file:com.tomohamat.apicem.MainTabbedActivity.java
@Override public void onClick(View view) { Log.d(TAG, "onClick received for " + view.toString()); switch (view.getId()) { case R.id.requestUsersButton: if (apicEm.isInitialized()) { mGeneralFragment.showProgressDialog(true); mGeneralFragment.showPleaseWait(); apicEm.requestUsers();/*from w w w.j a v a2s .c o m*/ } else { Toast.makeText(getApplicationContext(), getString(R.string.apicem_not_initialized), Toast.LENGTH_SHORT).show(); startActivitySettings(); } break; /* case R.id.requestNetworkDevicesButton: if (apicEm.isInitialized()) { apicEm.requestNetworkDevices(); } else { Toast.makeText(getApplicationContext(), getString(R.string.apicem_not_initialized), Toast.LENGTH_SHORT).show(); startActivitySettings(); } break; */ case R.id.requestHostsButton: if (apicEm.isInitialized()) { mGeneralFragment.showProgressDialog(true); mGeneralFragment.showPleaseWait(); apicEm.requestHosts(); } else { Toast.makeText(getApplicationContext(), getString(R.string.apicem_not_initialized), Toast.LENGTH_SHORT).show(); startActivitySettings(); } break; case R.id.requestLegitReadsButton: if (apicEm.isInitialized()) { mGeneralFragment.showProgressDialog(true); mGeneralFragment.showPleaseWait(); apicEm.requestCliRunnerCommands(); } else { Toast.makeText(getApplicationContext(), getString(R.string.apicem_not_initialized), Toast.LENGTH_SHORT).show(); startActivitySettings(); } break; /* case R.id.requestTestButton: if (apicEm.isInitialized()) { apicEm.requestCliRunner(); } else { Toast.makeText(getApplicationContext(), getString(R.string.apicem_not_initialized), Toast.LENGTH_SHORT).show(); startActivitySettings(); } break; */ case R.id.deviceDetailsButton: if (apicEm.isInitialized()) { String id = mSwitchFragment.getSelectedDeviceId(); mSwitchFragment.showPleaseWait(); mSwitchFragment.showProgressDialog(true); apicEm.requestNetworkDevice(id); } else { Toast.makeText(getApplicationContext(), getString(R.string.apicem_not_initialized), Toast.LENGTH_SHORT).show(); startActivitySettings(); } break; case R.id.deviceLicenseButton: if (apicEm.isInitialized()) { String id = mSwitchFragment.getSelectedDeviceId(); mSwitchFragment.showPleaseWait(); mSwitchFragment.showProgressDialog(true); apicEm.requestDeviceLicenses(id); } else { Toast.makeText(getApplicationContext(), getString(R.string.apicem_not_initialized), Toast.LENGTH_SHORT).show(); startActivitySettings(); } break; case R.id.cliRunnerButton: if (apicEm.isInitialized()) { mSwitchFragment.showPleaseWait(); mSwitchFragment.showProgressDialog(true); apicEm.requestCliRunner(mSwitchFragment.getSelectedDeviceId(), mSwitchFragment.getCli()); } else { Toast.makeText(getApplicationContext(), getString(R.string.apicem_not_initialized), Toast.LENGTH_SHORT).show(); startActivitySettings(); } break; case R.id.requestAllDevicesLicensesButton: if (apicEm.isInitialized()) { mGeneralFragment.showPleaseWait(); mGeneralFragment.showProgressDialog(true); apicEm.requestAllDevicesLicenses(networkDevices); } else { Toast.makeText(getApplicationContext(), getString(R.string.apicem_not_initialized), Toast.LENGTH_SHORT).show(); startActivitySettings(); } break; } }
From source file:cm.aptoide.pt.ManageRepos.java
@Override public void onCreateContextMenu(ContextMenu menu, View view, ContextMenuInfo menuInfo) { Log.d("Aptoide-ManageRepos", "oncreateContext view: " + view.toString()); final int repoHashid = Integer.parseInt(view.findViewById(R.id.repo_hashid).getTag().toString()); if (!reposInserting.containsKey(repoHashid)) { super.onCreateContextMenu(menu, view, menuInfo); menu.setHeaderTitle(getString(R.string.options)); menu.add(0, popupOptions.EDIT_REPO.ordinal(), 0, getString(R.string.edit)); menu.add(0, popupOptions.REMOVE_REPO.ordinal(), 0, getString(R.string.remove)); }/*from www .j a v a 2s. com*/ }
From source file:com.lb.launcher.Folder.java
public void onClick(View v) { Log.v(getClass().toString() + "::onClick:", v.toString()); // added by H.Yasui 2016/11/ Object tag = v.getTag();// www . j a v a2 s .c o m if (tag instanceof ShortcutInfo) { mLauncher.onClick(v); } }
From source file:com.lb.launcher.Folder.java
public boolean onLongClick(View v) { Log.v(getClass().toString() + "::onLongClick:", v.toString()); // added by H.Yasui 2016/11/ // Return if global dragging is not enabled if (!mLauncher.isDraggingEnabled()) return true; Object tag = v.getTag();/* w w w . j av a 2s . c o m*/ if (tag instanceof ShortcutInfo) { ShortcutInfo item = (ShortcutInfo) tag; if (!v.isInTouchMode()) { return false; } mLauncher.getWorkspace().beginDragShared(v, this); mCurrentDragInfo = item; mEmptyCell[0] = item.cellX; mEmptyCell[1] = item.cellY; mCurrentDragView = v; mContent.removeView(mCurrentDragView); mInfo.remove(mCurrentDragInfo); mDragInProgress = true; mItemAddedBackToSelfViaIcon = false; } return true; }
From source file:com.inmobi.ultrapush.AnalyzeActivity.java
@Override public boolean onLongClick(View view) { vibrate(300);//from ww w. jav a2 s .c om Log.i(TAG, "long click: " + view.toString()); return true; }
From source file:androidx.media.widget.VideoView2.java
@Override public void onSurfaceDestroyed(View view) { if (DEBUG) {//w ww. ja va 2s . c om Log.d(TAG, "onSurfaceDestroyed(). mCurrentState=" + mCurrentState + ", mTargetState=" + mTargetState + ", " + view.toString()); } }
From source file:androidx.media.widget.VideoView2.java
@Override public void onSurfaceChanged(View view, int width, int height) { // TODO: Do we need to call requestLayout here? if (DEBUG) {// w w w . jav a 2 s . c o m Log.d(TAG, "onSurfaceChanged(). width/height: " + width + "/" + height + ", " + view.toString()); } }