How to get an idea more than its parent?

I have a top bar with a show / hide menu button. I would like to define the top bar, button and menu in the same layout.

I tried the layout with the height of the top panel, but the menu is cropped and not visible. Is it possible for the performance to be more than its parent. Otherwise, what is the standard way to do this?

enter image description here

+4
source share
1 answer

On your question: Yes It is possible. A simple example:

<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:orientation="vertical" android:layout_height="match_parent" > <ImageView android:layout_width="match_parent" android:layout_height="match_parent" android:background="#f0f" android:layout_marginLeft="-50dp" android:layout_marginRight="-50dp" /> </LinearLayout> 

And ImageViewWidth == LinearLayoutWidth + 100dp .

We hope for his help.

+11
source

All Articles