I am trying to make a sliding menu in an android application I am building for my school, and whenever I open the menu, the menu button, in addition to the other views I've tried, are scaled to fit in the remaining 25% of the layout still on the screen. So my question is, how can I disable this scaling so views can be moved offscreen along with their parent layout?
This is the XML file of the layout I am trying to move. It contains the misbehaving button:
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <ImageView android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/background_color"/> <ImageButton android:id="@+id/menu_button" android:layout_width="56dp" android:layout_height="35dp" android:layout_alignParentRight="true" android:background="@drawable/menu_button"/> </RelativeLayout>
This is what the menu looks like closed:
This is how it looks when opened:
And this is how I want it to be when opened. Notice the menu button has moved offscreen.
Any help is appreciated.
No comments:
Post a Comment