1

I have a notepad app and in that I want to implement checklist feature like keep notes app that consists of a checkbox and the text which the user will enter.

I am confused as to how to design the layout. Will the UI be dynamic? because the user can enter as many checklist items as they can

James Z
  • 12,209
  • 10
  • 24
  • 44
Josss
  • 229
  • 1
  • 4
  • 19
  • We can't answer a question with the purpose of "how to create a full checklist application". Google it, you will find many open source applications that have implemented such a feature. Otherwise, no one will give you the answer you want (i.e the full implementation) – Ahmad Sattout Apr 23 '19 at 15:05
  • No I don't want the full implementation, just how to create a checklist dynamically using list view ?? – Josss Apr 24 '19 at 02:33

2 Answers2

2

You can add a CheckBox programmatically in another view every time the user press enter.

See How to programmatically add views to views, OnEditorActionListener

1

Use recycleview to do this. When user adds a new value update the recycleview item. A list contain a checkbox with a textview. you can set onCheckChangeLisener to determine whether the user checked an item then change the value of checked status and call notifydatasetChanges(). Recycleview will automatically do everything for you. you just have put right logic initially when setting up the recycleviewAdapter