Open legomind opened 10 years ago
Something like this:
public class MyCardLayout extends LinearLayout { //Inflate & attach event listeners }
void onCreate() { MyCardLayout myCardLayout = new MyCardLayout(); Card card = new Card(getContext(), (View) myCardLayout); //Pass view instead of layout id CardView cardView = (CardView) getActivity().findViewById(R.id.carddemo_card_id); cardView.setCard(card); }
It can be an idea for a future addition.
+1 for this feature
Something like this: