@@ -48,25 +48,21 @@ public CharSequence convertToString(Cursor cursor) {
4848
4949 @ Override
5050 public void bindView (View view , Context context , Cursor cursor ) {
51- TextView textViewName = ( TextView ) view .findViewById (R .id .textViewName );
52- TextView textViewEmail = ( TextView ) view .findViewById (R .id .textViewEmail );
53- TextView textViewOnlyEmail = ( TextView ) view .findViewById (R .id .textViewOnlyEmail );
51+ TextView textViewName = view .findViewById (R .id .textViewName );
52+ TextView textViewEmail = view .findViewById (R .id .textViewEmail );
53+ TextView textViewOnlyEmail = view .findViewById (R .id .textViewOnlyEmail );
5454
5555 String name = cursor .getString (cursor .getColumnIndex (ContactsDaoSource .COL_NAME ));
5656 String email = cursor .getString (cursor .getColumnIndex (ContactsDaoSource .COL_EMAIL ));
5757
5858 if (TextUtils .isEmpty (name )) {
59- textViewName .setVisibility (View .GONE );
60- textViewEmail .setVisibility (View .GONE );
61- textViewOnlyEmail .setVisibility (View .VISIBLE );
59+ textViewEmail .setText (null );
60+ textViewName .setText (null );
6261 textViewOnlyEmail .setText (email );
6362 } else {
64- textViewName .setVisibility (View .VISIBLE );
65- textViewEmail .setVisibility (View .VISIBLE );
66- textViewOnlyEmail .setVisibility (View .GONE );
67-
6863 textViewEmail .setText (email );
6964 textViewName .setText (name );
65+ textViewOnlyEmail .setText (null );
7066 }
7167 }
7268}
0 commit comments