Android button with selector background doesn't load landscape drawables

Wizkidje

New Member
I've set up a button with an xml selector background. The drawables are located in different versions at drawable-xhdpi and at drawable-land-xhdpi.Problem is on rotation change to landscape the buttons aren't assigned with the land version.

the button looks like this:\[code\]<Button android:id="@+id/home_button" android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_alignParentBottom="true" android:layout_marginBottom="0dp" android:background="@drawable/xml_selector_home" android:layout_toRightOf="@+id/fwd_button" android:layout_weight="1"> </Button>\[/code\]
the button drawable looks like this: \[code\]<item android:state_pressed="true" android:drawable="@drawable/homeon"/><item android:drawable="@drawable/homeoff"/>\[/code\]
 
Back
Top