본문 바로가기

프로젝트/소프트웨어공학

[소프트웨어공학] Android Studio 이슈 #1

뷰의 Context는 ViewGroup이 하나만 존재하는 것처럼 하나만 존재함???
Toast.makeText(rootView.getContext(), clickedDate, Toast.LENGTH_SHORT).show();

 

//리사이클러뷰 설정하는 법
recyclerView_todo = dialog.findViewById(R.id.recyclerView_todo);
recyclerView_todo.setHasFixedSize(true);    //성능 강화
linearLayoutManager = new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false);
recyclerView_todo.setLayoutManager(linearLayoutManager);
recyclerView_todo.setAdapter(todoListAdapter);

//리사이클러뷰에서 사용할 어댑터 설정
list = new ArrayList<>();
todoListAdapter = new TodoListAdapter(getContext(), list);

//변경된 내용을 어댑터에 알려주어, 변경된 내용으로 list를 나타냄.
todoListAdapter.notifyDataSetChanged();

 

public class TodoListItem {
    //userID가 과연 필요한가???
    String userID;
    boolean isDone = false;
    String title;
    boolean allDay;
    String startTime;
    String endTime;
    String memo;
}