예제 #1
0
  @Override
  public void onTextChanged(CharSequence s, int start, int before, int count) {
    if (cursor != null) {
      if (!cursor.isClosed()) {
        MyLogger.i(TAG, "onTextChanged cursor.isClosed(): " + cursor.isClosed());
        cursor.close();
      }
    }

    cursor = ApiAllFansInfoDb.getCursorBySearchKey(context, s.toString());
    adapter.changeCursor(cursor);
    MyLogger.i(TAG, "cursor.getCount(): " + cursor.getCount());
  }
예제 #2
0
 @Override
 public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
   Intent intent = new Intent(context, DetailedInformationActivity.class);
   int fans_id = adapter.getItem(position - 1);
   MyLogger.i(TAG, "fans_id: " + fans_id);
   intent.putExtra(Constant.FANS_ID, fans_id);
   startActivity(intent);
 }
예제 #3
0
 @Override
 public void onDestroy() {
   if (cursor != null) {
     if (!cursor.isClosed()) {
       MyLogger.i(TAG, "onDestroy cursor.isClosed(): " + cursor.isClosed());
       cursor.close();
     }
   }
   super.onDestroy();
 }