Search in sources :

Example 1 with Common

use of com.androidquery.util.Common in project androidquery by androidquery.

the class AbstractAQuery method setScrollListener.

private Common setScrollListener() {
    AbsListView lv = (AbsListView) view;
    Common common = (Common) lv.getTag(AQuery.TAG_SCROLL_LISTENER);
    if (common == null) {
        common = new Common();
        lv.setOnScrollListener(common);
        lv.setTag(AQuery.TAG_SCROLL_LISTENER, common);
        AQUtility.debug("set scroll listenr");
    }
    return common;
}
Also used : AbsListView(android.widget.AbsListView) Common(com.androidquery.util.Common)

Example 2 with Common

use of com.androidquery.util.Common in project androidquery by androidquery.

the class AbstractAQuery method textChanged.

/**
 * Register a callback method for when a textview text is changed. Method must have signature of method(CharSequence s, int start, int before, int count)).
 *
 * @param handler The handler that has the public callback method.
 * @param method The method name of the callback.
 * @return self
 */
public T textChanged(Object handler, String method) {
    if (view instanceof TextView) {
        TextView tv = (TextView) view;
        Common common = new Common().forward(handler, method, true, TEXT_CHANGE_SIG);
        tv.addTextChangedListener(common);
    }
    return self();
}
Also used : TextView(android.widget.TextView) Common(com.androidquery.util.Common)

Aggregations

Common (com.androidquery.util.Common)2 AbsListView (android.widget.AbsListView)1 TextView (android.widget.TextView)1