カレンダーのプラスボタンを押した際の遷移を修正
1 parent 4ea8b8a commit 3173238162bf1c3b23315503072996177ef0095a
t-watanabe authored on 17 Oct
Showing 1 changed file
View
21
app/src/main/java/com/example/citrusclient/views/CalendarFragment.java
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.TableLayout;
import android.widget.TableRow;
import android.widget.TextView;
 
createBook.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
((MainActivity) getActivity()).showFragment(new CreateScheduleFragment(year, month, day));
RadioButton rbSchedule = getActivity().findViewById(R.id.rbSchedule);
RadioButton rbTodo = getActivity().findViewById(R.id.rbTodo);
RadioButton rbBoth = getActivity().findViewById(R.id.rbBoth);
if(rbSchedule != null && rbSchedule.isChecked()) {
((MainActivity) getActivity()).showFragment(new CreateScheduleFragment(year, month, day));
} else if(rbTodo != null && rbTodo.isChecked()) {
((MainActivity) getActivity()).showFragment(new CreateTodoFragment(year, month, day));
} else if(rbBoth != null && rbBoth.isChecked()) {
((MainActivity) getActivity()).showFragment(new CreateScheduleFragment(year, month, day));
}
}
});
 
//カレンダーの次の月を表示