@Override public int hashCode() { return this.view.hashCode(); }
private View inflateOrRecycleView(Context context) { View viewToReturn; mInflater = LayoutInflater.from(context); if (mRecycledViewsList.isEmpty()) { viewToReturn = mInflater.inflate(R.layout.fragment_dates_grid_page, null, false); } else { viewToReturn = mRecycledViewsList.pop(); Log.i(TAG,"Restored recycled view from cache "+ viewToReturn.hashCode()); } return viewToReturn; } @Override public void destroyItem(ViewGroup container, int position, Object view) { VerticalViewPager pager = (VerticalViewPager) container; View recycledView = (View) view; pager.removeView(recycledView); mRecycledViewsList.push(recycledView); Log.i(TAG,"Stored view in cache "+ recycledView.hashCode()); }
@Override public int hashCode() { return this.view.hashCode(); }
RelativeLayout journals = (RelativeLayout); findViewById(R.id.JournalSearchListView); LinearLayout lL = new LinearLayout(context); lL.setOrientation(LinearLayout.VERTICAL); for (int i=0;i< authorNames.size();i++) { TextView tv = new TextView(this); tv.setId(i); tv.setText(authorNames.get(i)); tv.setTextColor(Color.BLACK); Integer a = tv.hashCode(); map.put(a,authorNames.get(i)); if(i!=0){ params1.addRule(RelativeLayout.BELOW, i-1); } tv.setOnClickListener(new OnClickListener() { public void onClick(View v) { System.out.println("Clicked "+ map.get(v.hashCode()) ); } }); lL.addView(tv); } journals.addview(lL);
@Override public int hashCode() { int result; result = (pre ? 1 : 0); result = 31 * result + (cache != null ? cache.hashCode() : 0); result = 31 * result + (modificationType != null ? modificationType.hashCode() : 0); result = 31 * result + (data != null ? data.hashCode() : 0); result = 31 * result + (fqn != null ? fqn.hashCode() : 0); result = 31 * result + (transaction != null ? transaction.hashCode() : 0); result = 31 * result + (originLocal ? 1 : 0); result = 31 * result + (targetFqn != null ? targetFqn.hashCode() : 0); result = 31 * result + (successful ? 1 : 0); result = 31 * result + (newView != null ? newView.hashCode() : 0); result = 31 * result + (buddyGroup != null ? buddyGroup.hashCode() : 0); result = 31 * result + (type != null ? type.hashCode() : 0); return result; }