I have a layout, that includes another layout:
You need to find the view and call the appropriate method to change the state list animator and the background. You might need to also call setClickable on the root view of you included layout.
LinearLayout layout1 = findViewById(R.id.layout1);
View root = layout1.getChildAt(0);
StateListAnimator sla = AnimatorInflater.loadStateListAnimator(context, R.anim.lift_up);
root.setStateListAnimator(sla);
root.setBackground(R.drawable.ripple_effect);