@Override public void setViewText(TextView v, String text) { if (v != null) { try { v.setTypeface(RobotoView.obtainTypeface(mContext, RobotoView.getUserFont())); } catch (Exception e) { Log.e(LOGCAT, e.getMessage()); } super.setViewText(v, text); // check if highlight text if (!TextUtils.isEmpty(getHighlightFilter())) { v.setText(mCore.highlight(getHighlightFilter(), v.getText().toString())); } } }
public void bindView(View paramView, Context paramContext, Cursor paramCursor) { SimpleCursorAdapter.ViewBinder localViewBinder = mViewBinder; int j = mTo.length; int[] arrayOfInt1 = mFrom; int[] arrayOfInt2 = mTo; int i = 0; View localView; if (i < j) { localView = paramView.findViewById(arrayOfInt2[i]); if (localView != null) { if (localViewBinder == null) { break label190; } } } label129: label150: label190: for (boolean bool = localViewBinder.setViewValue(localView, paramCursor, arrayOfInt1[i]); ; bool = false) { if (!bool) { String str = paramCursor.getString(arrayOfInt1[i]); paramContext = str; if (str == null) { paramContext = ""; } if (!(localView instanceof TextView)) { break label129; } setViewText((TextView) localView, paramContext); } for (; ; ) { i += 1; break; if (!(localView instanceof ImageView)) { break label150; } setViewImage((ImageView) localView, paramContext); } throw new IllegalStateException( localView.getClass().getName() + " is not a " + " view that can be bounds by this SimpleCursorAdapter"); return; } }
public void bindView(View view, Context context, Cursor cursor) { ViewBinder viewbinder = mViewBinder; int j = mTo.length; int ai[] = mFrom; int ai1[] = mTo; int i = 0; while (i < j) { View view1 = view.findViewById(ai1[i]); if (view1 == null) { continue; } boolean flag; if (viewbinder != null) { flag = viewbinder.setViewValue(view1, cursor, ai[i]); } else { flag = false; } if (!flag) { String s = cursor.getString(ai[i]); context = s; if (s == null) { context = ""; } if (view1 instanceof TextView) { setViewText((TextView) view1, context); } else if (view1 instanceof ImageView) { setViewImage((ImageView) view1, context); } else { throw new IllegalStateException( (new StringBuilder()) .append(view1.getClass().getName()) .append(" is not a ") .append(" view that can be bounds by this SimpleCursorAdapter") .toString()); } } i++; } }