I have an ID of a TextView created by a GridView Adapter. Now I want to define my TextView with my ID.
TextView myTextView = view.findViewById(R.id.5);
myTextView.setText("exampleText");
I have an ID of a TextView created by a GridView Adapter. Now I want to define my TextView with my ID.
TextView myTextView = view.findViewById(R.id.5);
myTextView.setText("exampleText");
FindViewById method is looking for an id in the inflated view, not creating/assigning a new one. Further more, resource name must begin with a character, you can't name it starting with a number.