要在Android中更改Material TextInputLayout的背景颜色,您可以按照以下步骤操作:
implementation 'com.google.android.material:material:1.0.0'
请注意,我们在外部LinearLayout中设置了背景颜色。您可以根据需要更改背景颜色。
TextInputLayout textInputLayout = findViewById(R.id.textInputLayout);
textInputLayout.setBoxBackgroundColor(getResources().getColor(R.color.your_new_background_color));
确保将R.color.your_new_background_color
替换为您想要的新背景颜色的资源ID。
这样就可以在TextInputLayout中更改背景颜色了。