Android: onClick on LinearLayout with TextView and Button

This is what you need in your LinearLayout :

android:onClick="editActions" 
android:clickable="true"

and also in your class which call that xml some method:

public void editActions(View view){

           //something TODO

    }

add onClick Action for your button dirrectly in code like this:

Button btn = findViewById(R.id.factory_button_edit);
btn.setOnClickListener(button_click);

      OnClickListener button_click = new OnClickListener() {

        @Override
        public void onClick(View v) {
            editActions;
        }
    };

or xml add

android:onClick="editActions"

to your button


I think you should use a TouchDelegate:

Android provides the TouchDelegate class to make it possible for a parent to extend the touchable area of a child view beyond the child's bounds. This is useful when the child has to be small, but should have a larger touch region. You can also use this approach to shrink the child's touch region if need be.