7
ArrayAdapter constructor undefined
오류 마지막 줄에 initializeViews
메서드가 있습니다.생성자 ArrayAdapter <string>은 정의되지 않았습니다.
이 방법은 F1Fragment
에 있으며 MainFragment
까지 확장됩니다. 이어서 MainFragment
이 Activity
에 첨부됩니다.
Fragment
의 컨텍스트를 ArrayAdapter<string>
생성자에 제공 할 수 있습니까? 나는 안드로이드가 처음이다. 제발 고쳐주세요. 미리 감사드립니다.
private void initializeViews(RelativeLayout contentLayout) {
leaguesListView = (ListView) contentLayout.findViewById (R.id.leaguesListView);
progressLinear = (LinearLayout) contentLayout.findViewById (R.id.progressLeagues);
values= new String[] { "RedBullRacing", "McLaren", "Lotus",
"ForceIndia", "HRT", "Ferrari" };
adapter= new ArrayAdapter<String>(F1Fragment.this, android.R.layout.simple_list_item_1, android.R.id.text1, values);
}