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

Wrong header size #19

Closed
IgnacioBasallote opened this issue Jan 26, 2021 · 1 comment
Closed

Wrong header size #19

IgnacioBasallote opened this issue Jan 26, 2021 · 1 comment

Comments

@IgnacioBasallote
Copy link

Please complete the following information:

  • Library Version: 1.0.6
  • Affected Device(s): Samsung Galaxy S9+ Android 10.

Describe the Bug:
Hi,

I am having some troubles while displaying the parent layout. It seems to have a fixed size and it does not adapts to the actual size of my parent layout. The Expandable layout is wrapped within a linearlayout in a nestedscroll view.

I attach the code in case I am doing something wrong:

<com.skydoves.expandablelayout.ExpandableLayout
                android:id="@+id/expandableThirdPartyDevices"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="15dp"
                app:expandable_duration="300"
                app:expandable_isExpanded="false"
                app:expandable_parentLayout="@layout/content_expandable_parent"
                app:expandable_secondLayout="@layout/content_expandable_second"
                app:expandable_showSpinner="true"
                app:expandable_spinner="@drawable/ic_arrow_down"
                app:expandable_spinner_animate="true"
                app:expandable_spinner_margin="14dp"
                app:expandable_spinner_gravity="end"
                app:expandable_spinner_size="32dp" />`

content_expandable_parent:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="40dp"
    android:background="@drawable/rounded_corners_button"
    android:backgroundTint="@color/StemyEnergy.Color.UI.Text.Background.Blue"
    android:id="@+id/ctlySelectDevice">

    <TextView
        android:id="@+id/txtSelectDevice"
        android:textSize="@dimen/medium_text_size_app"
        android:textColor="@color/StemyEnergy.Color.UI.Text.Blue"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:paddingStart="15dp"
        android:gravity="start|center"
        android:text="@string/StemyEnergy.String.UI.GeneralMessages.TestText"
        />
</LinearLayout>

Expected Behavior:
What I expect is the expandable layout header to adapt to my parent layout content.

Thanks in advance for your help!!

Cheers,
Nacho

@IgnacioBasallote
Copy link
Author

Hi,

It seems that the header lauoyt must be wrapped within a RelativeLayout. By doing this, the problem is solved.

Cheers,

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