private void hookListeners() {
    lv_traces.setOnScrollListener(new AbsListView.OnScrollListener() {
      @Override public void onScrollStateChanged(AbsListView view, int scrollState) {
        //Empty
      }

      @Override public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount,
          int totalItemCount) {
        //Hack to avoid problems with the scroll position when auto scroll is disabled. This hack
        // is needed because Android notify a firstVisibleItem one position before it should be.
        if (lastScrollPosition - firstVisibleItem != 1) {
          lastScrollPosition = firstVisibleItem;
        }
        int lastVisiblePositionInTheList = firstVisibleItem + visibleItemCount;
        presenter.onScrollToPosition(lastVisiblePositionInTheList);
      }
    });
    et_filter.addTextChangedListener(new TextWatcher() {
      @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) {
        //Empty
      }

      @Override public void onTextChanged(CharSequence s, int start, int before, int count) {
        presenter.updateFilter(s.toString());
      }

      @Override public void afterTextChanged(Editable s) {
        //Empty
      }
    });

    ib_share.setOnClickListener(new OnClickListener() {
      @Override public void onClick(View v) {
        presenter.onShareButtonClicked();
      }
    });
    ArrayAdapter<TraceLevel> adapter =
        new ArrayAdapter<>(getContext(), R.layout.single_line_spinner_item, TraceLevel.values());
    sp_filter.setAdapter(adapter);
    sp_filter.setSelection(DEFAULT_POSITION);
    sp_filter.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {

      @Override
      public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
        presenter.updateFilterTraceLevel((TraceLevel) parent.getItemAtPosition(position));
      }

      @Override public void onNothingSelected(AdapterView<?> parent) {

      }
    });
  }
Hack to change EditText cursor color even if the API level is lower than 12. Please, don't do
this at home.
lynx/src/main/java/com/github/pedrovgs/lynx/LynxView.java