Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

dynamically create textview and add it in linearlayout in recyclerview adapter android

// Inside myViewHolder
LinearLayout linearLayout = itemView.findViewById(R.id.notebody);
// Inside onBindViewHolder
TextView txt = new TextView(holder.linearLayout.getContext());
holder.linearLayout.addView(imageView);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #dynamically #create #textview #add #linearlayout #recyclerview #adapter #android
ADD COMMENT
Topic
Name
8+5 =