Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug? contentLayout never full width if orientation = vertical #52

Open
taar1 opened this issue Mar 12, 2016 · 1 comment
Open

Bug? contentLayout never full width if orientation = vertical #52

taar1 opened this issue Mar 12, 2016 · 1 comment

Comments

@taar1
Copy link

taar1 commented Mar 12, 2016

Generally it works fine but something is behaving very strange. I have this expandable list:

<com.andexert.expandablelayout.library.ExpandableLayout
            android:id="@+id/socialmediaLayout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/md_material_blue_600"
            app:el_contentLayout="@layout/layout_socialmedia_body"
            app:el_duration="400"
            app:el_headerLayout="@layout/layout_socialmedia_header" />

and this is the layout of "layout_socialmedia_body":

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <EditText
        android:id="@+id/text"
        android:layout_width="match_parent"
        android:layout_height="48dp"
        android:gravity="center"
        android:hint="Hello World !"
        android:textColor="@android:color/white"
        android:background="#c0392b"/>

    <Button
        android:layout_below="@+id/text"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="click ME !"/>

</LinearLayout>

When I now tap on the header to expand the list, the body layout displays but only uses about 30% of the screen width, even though I defined it with "match_parent".
It only seems to happen if I define the LinearLayout orientation to "vertical", if I define it "horizontal" the view actually uses the full width of the screen.
Also if I change LinearLayout to RelativeLayout it also uses the full width of the screen. The only time it doesn't work is if I use LinearLayout together with orientation "vertcal".

I assume this is a bug? Please fix, thank you :)

@zeero0
Copy link

zeero0 commented Jan 11, 2018

Is it already fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants