我有一个多项目构建和两个不使用相同版本的同一插件的项目。
即。这两个插件由两个项目使用:
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
view = inflater.inflate(R.layout.fragment_create_new_lesson, container, false);
timeTextView = (TextView) view.findViewById(R.id.time_picker_text_view);
dateTextView = (TextView) view.findViewById(R.id.date_picker_text_view);
hourSpinner = (Spinner) view.findViewById(R.id.hour_spinner);
minuteSpinner = (Spinner) view.findViewById(R.id.minut_spinner);
topicGroupSpinner = (Spinner) view.findViewById(R.id.topic_group_spinner);
topicSpinner = (Spinner) view.findViewById(R.id.topic_spinner);
levelSpinner = (Spinner) view.findViewById(R.id.level_spinner);
totalPriceTextView = (TextView) view.findViewById(R.id.total_price_text_view);
datePickerButton = (Button) view.findViewById(R.id.date_picker_button);
timePickerButton = (Button) view.findViewById(R.id.time_picker_button);
createNewLessonButton = (Button) view.findViewById(R.id.create_new_lesson_button);
if (savedInstanceState != null) {
String time = savedInstanceState.getString("time");
Log.i("TIME", time);
getActivity().setTitle(time);
dateTextView.setText(savedInstanceState.getString("date"));
timeTextView.setText(savedInstanceState.getString("time"));
int hourPosition = getIndexByString(hourSpinner, savedInstanceState.getString("hour"));
int minutePosition = getIndexByString(minuteSpinner, savedInstanceState.getString("minute"));
int topicGroupPosition = getIndexByString(topicGroupSpinner, savedInstanceState.getString("topicGroup"));
hourSpinner.setSelection(hourPosition);
minuteSpinner.setSelection(minutePosition);
topicGroupSpinner.setSelection(topicGroupPosition);
}
return view;
}
如何为这两个项目禁用一个插件并启用另一个插件(反之亦然)?