I was wondering how to give a TextField an 'id' in java. So I am pretty much wanting to know how to give the TextField android:id="@id/NAMEHERE" but do it in java. Here is the code so far:
TextView taskname = new TextView(this);
taskname.setText("Task " + tasknumber);
tasklayout.addView(taskname);
What do I need to add to give it an id?