Guest User

Untitled

a guest
Oct 12th, 2018
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. Main activity code triggering NPE:
  2.  
  3. public void notDoneTask(View view){
  4. ToDoList obj = new ToDoList();
  5. obj.notDoneTask(view);
  6. }
  7.  
  8. XML code that defines layout of each new todo item:
  9.  
  10. <Button
  11. android:id="@+id/task_not_done"
  12. android:layout_width="wrap_content"
  13. android:layout_height="wrap_content"
  14. android:onClick="notDoneTask"
  15. android:text="X" />
  16.  
  17. <TextView
  18. android:id="@+id/task_title"
  19. android:layout_width="0dp"
  20. android:layout_height="wrap_content"
  21. android:layout_margin="8dp"
  22. android:layout_weight="1"
  23. android:text="Hello" />
  24.  
  25. <Button
  26. android:id="@+id/task_done"
  27. android:layout_width="wrap_content"
  28. android:layout_height="wrap_content"
  29. android:onClick="doneTask"
  30. android:text="V" />
Add Comment
Please, Sign In to add comment