로 yearName에서 스피너의 값을 저장할 수 있습니다.
public static void onYearSelect(View view) {
Spinner yearSelector;
yearSelector = (Spinner) view.findViewById(R.id.year_submit);
yearName = yearSelector.getSelectedItem().toString();
}
The view which contains your layout data
.
이 함수를 호출하면 여기에 onYearSelect(rootView)
이 추가됩니다. rootView
에는 레이아웃보기가 있습니다.
편집 1 :
보기는 여기에 무엇입니까?
A View in Android is a widget that displays something. Buttons, listviews, imageviews, etc. are all subclasses of View. When you say "change view" I assume you mean change the layout by using setContentView(). This usually only needs to be done once per activity. An Activity is basically what you are referring to as a screen.
당신은 here 자세한 내용을보실 수 있습니다.
나는 안드로이드 스튜디오에서 초보자입니다. 당신은 저에게 무엇을 말해 줄 수 있습니까? –