1
메서드를 사용하는 ArrayAdapter
클래스를 확장합니다. AndroidAnnotations
를 사용하여, 나는 쉽게 findViewById
, listeners
등ArrayAdapter의 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;
}
...
}
, Activity
에 AndroidAnnotations
를 사용하지만 ArrayAdapter
를 확장 할 때 나는이 경우에 어떻게 작업을 수행 할 수 있습니다 그것은 내부 나는 이런 식으로 뭔가를 쓰기 (또는 스파게티 코드를 만들지 않는 다른 프레임 워크).
감사 어댑터를 사용하는 방법에 대해 설명한다! 그것은 옳은 대답 인 것 같습니다. 시도해 볼게. – kolobok