클릭된 리스트아이템에서 문자를 가져와서 split으로 자른 후 toast로 출력하려합니다
private OnItemClickListener itemClickListenerOfLanguageList = new OnItemClickListener()
{
public void onItemClick(AdapterView<?> adapterView, View clickedView, int pos, long id)
{
String toastMessage1 = ((TextView)clickedView).getText().toString(); //클릭한 리스트아이템 문자
String[] text = toastMessage1.split("-");
Toast.makeText(
getActivity(),
text,
Toast.LENGTH_SHORT
).show();
}
};
저기 오류가
The method makeText(Context, CharSequence, int) in the type Toast is not applicable for the arguments (FragmentActivity, String[],
int)
이렇게나는데 문법이 잘못된거 같은데 어떻게 구현해야 하나요??