Side menu is expressed through TextView :
<TextView android:id="@+id/listTitle" android:layout_width="0dp" android:layout_weight="1" android:layout_height="wrap_content" android:paddingBottom="16dp" android:paddingLeft="?android:attr/expandableListPreferredItemPaddingLeft" android:paddingTop="16dp" android:textColor="@color/list_group_title" android:textSize="16dp" android:background="@drawable/head" android:gravity="center_vertical"/> In MainActivity by pressing a button, the action is performed:
public boolean onOptionsItemSelected(MenuItem item) { if (mDrawerToggle.onOptionsItemSelected(item)) { return true; } switch (id) { case R.id.action_settings: TextView tv = (TextView) findViewById(R.id.listTitle); tv.setBackgroundResource(R.drawable.minus); return true; default: return super.onOptionsItemSelected(item); } Which changes the design of the TextView menu from head to minus . Everything works, but only the uppermost, first menu section changes, the rest remain the same background - head . What could be the problem? After all, in fact, I use the setBackgroundResource method setBackgroundResource change the entire TextView design. How to change all sections completely? If you change directly in the TextView markup:
with
android:background="@drawable/head" on
android:background="@drawable/minus" then everything works.