Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- linearLayout_childItems = itemView.findViewById(R.id.ll_child_items);
- for (int indexView = 0; indexView < intMaxNoOfChild; indexView++) {
- TextView textView = new TextView(context);
- textView.setId(indexView);
- textView.setPadding(0, 20, 0, 20);
- textView.setGravity(Gravity.CENTER);
- textView.setBackground(ContextCompat.getDrawable(context, R.drawable.background_sub_module_text));
- LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
- textView.setOnClickListener(this);
- Button bt = new Button(context);
- bt.setText("r");
- linearLayout_childItems.addView(textView, layoutParams);
- linearLayout_childItems.addView(bt, layoutParams);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement