Open Chuque opened 6 years ago
any help here please?
Hello, I'm just an end user, but I have found you can add items to a when using a recyclerview by adding the following code to onBindViewHolder inside your adapter:
LinearLayout myLayout = viewHolder.swipeLayout.findViewById(R.id.bottom_wraper);
Button myButton = new Button(mContext);
myButton.setText("New Button");
myButton.setTextSize(12);
myButton.setLayoutParams(new ViewGroup.LayoutParams(
ViewGroup.LayoutParams.WRAP_CONTENT,
ViewGroup.LayoutParams.WRAP_CONTENT));
myLayout.addView(myButton);
Hope that helps.
the items that are revealed when we swype, let's call them "actions". I can add those actions on xml, but have not found a way to programmatically populate them for each item. how can achieve this? If I should not open an issue for this, let me know.