2013-07-12 4 views
1

메서드를 사용하는 ArrayAdapter 클래스를 확장합니다. AndroidAnnotations를 사용하여, 나는 쉽게 findViewById, listenersArrayAdapter의 getView 및 AndroidAnnotations

을 구현할 수 있습니다 그래서

public class MyArrayAdapter<T> extends ArrayAdapter<String> { 
    ... 

@Override 
public View getView(int position, View convertView, ViewGroup parent) { 
    View v = convertView; 

    if (v == null) { 
     LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); 
     v = inflater.inflate(R.layout.my_layout, null); 
    } 
    // ... 
    // LOTS of findViewById, onClickListeners, runOnUiThread methods etc. 
    // ... 

    return v; 
} 

... 
} 

, ActivityAndroidAnnotations를 사용하지만 ArrayAdapter를 확장 할 때 나는이 경우에 어떻게 작업을 수행 할 수 있습니다 그것은 내부 나는 이런 식으로 뭔가를 쓰기 (또는 스파게티 코드를 만들지 않는 다른 프레임 워크).

답변

관련 문제