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

Innerview not showing fully #9

Open
codebeginner092 opened this issue Jun 1, 2018 · 15 comments · May be fixed by #52
Open

Innerview not showing fully #9

codebeginner092 opened this issue Jun 1, 2018 · 15 comments · May be fixed by #52
Assignees
Labels
bug Something isn't working

Comments

@codebeginner092
Copy link

screenshot_20180601-095904

@AleSpero
Copy link
Owner

AleSpero commented Jun 1, 2018

Hello,

This could be an issue with the innerview. Could you share the innerview xml?

Thanks,

Alessandro

@codebeginner092
Copy link
Author

codebeginner092 commented Jun 1, 2018

<TextView
    android:id="@+id/sub_title"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:text="TextView"
    android:textSize="@dimen/sub_title_text_size" />

<TextView
    android:id="@+id/sub_title1"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:text="@string/sub_title"
    android:textSize="@dimen/sub_title_text_size" />

<TextView
    android:id="@+id/sub_title2"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:text="@string/sub_title"
    android:textSize="@dimen/sub_title_text_size" />

<android.support.design.widget.TextInputLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <android.support.design.widget.TextInputEditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:hint="Name"
        android:text="Alessandro Sperotti" />

</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <android.support.design.widget.TextInputEditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:hint="Departure Airport"
        android:text="Milano Malpensa (MXP)" />

</android.support.design.widget.TextInputLayout>


<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:gravity="center_vertical"
    android:orientation="horizontal">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginRight="30dp"
        android:text="My Reservation Code"
        android:textStyle="bold" />

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="OAKTHXBAI"
        android:textColor="@color/colorAccent"
        android:textSize="18sp"
        android:textStyle="bold" />


</LinearLayout>

If the text views are single line, then working fine, but if text views are multi line with 4 or 5 lines then issue occurs

@gtl23
Copy link

gtl23 commented Jun 29, 2018

RIghtly said @codebeginner092 , The below inner_view.xml also faces the same issue... The last radiobutton gets cropped a bit from top and bottom and its text disappears too....This could be the issue with the hieght to which the card is allowed to expand, i guess....

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="@string/question_3"
    android:textSize="16sp"
    android:id="@+id/q3_textView"
    android:textColor="@color/textColor"
    android:padding="8dp"/>

<RadioGroup
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:id="@+id/q3_radioGroup">

    <RadioButton
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/question_3_malloc"
        android:textSize="16sp"
        android:textColor="@android:color/black"
        android:id="@+id/q3_1_radioButton"
        android:padding="8dp"/>

    <RadioButton
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/question_3_alloc"
        android:textSize="16sp"
        android:textColor="@android:color/black"
        android:id="@+id/q3_2_radioButton"
        android:padding="8dp"/>

    <RadioButton
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/question_3_new"
        android:textSize="16sp"
        android:textColor="@android:color/black"
        android:id="@+id/q3_3_radioButton"
        android:padding="8dp"/>

    <RadioButton
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/question_3_new_malloc"
        android:textSize="16sp"
        android:textColor="@android:color/black"
        android:id="@+id/q3_4_radioButton"
        android:padding="8dp"/>
</RadioGroup>

@AleSpero
Copy link
Owner

Hello, thanks for your feedback.
I will look into it as soon as possible and will let you know, thanks!

Alessandro

@AleSpero AleSpero self-assigned this Jun 29, 2018
@AleSpero AleSpero added the bug Something isn't working label Jun 29, 2018
@gtl23
Copy link

gtl23 commented Jun 29, 2018

Hi Alessandro, One more feature which I would like to suggest to add in this library is of cardElevation and cardCornerRadius like the ones we've in the default cardview. I forked your repository and tried to implement these, but since i'm a newbie in it, it's a bit difficult for me.

Gaurav Atul

@tobioyelekan
Copy link

Has this issue been resolved, facing the same error here

@AleSpero
Copy link
Owner

AleSpero commented Aug 7, 2018

Hello,

Have you tried wrapping all your textviews inside a single ViewGroup (LinearLayout, RelativeLayout, whatever) in your inner view layout file?

Alessandro

@codebeginner092
Copy link
Author

codebeginner092 commented Aug 8, 2018

This is what I tried

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

        <com.alespero.expandablecardview.ExpandableCardView
            android:id="@+id/profile"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="5dp"
            android:layout_marginLeft="@dimen/card_horizontal_margin"
            android:layout_marginRight="@dimen/card_horizontal_margin"
            android:layout_marginTop="5dp"
            app:expandOnClick="true"
            android:background="@color/custom_tab_color"
            app:icon="@drawable/ic_person"
            app:inner_view="@layout/mycustomview"
            app:title="Passengers" />
    </LinearLayout>

mycustomview below

    <LinearLayout
        android:id="@+id/parent_layout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

     </LinearLayout>

And dynamically added elements to parent_layout which is inside a linear layout

@skacuk
Copy link

skacuk commented Aug 20, 2018

I have this problem too.
The card height adjustment is not flexible for dynamically add.

@codebeginner092
Copy link
Author

Has this issue been resolved??

@mblasi
Copy link

mblasi commented Jul 14, 2019

Hi, same issue here! Is there any workaround for this?
Regards!

@mblasi
Copy link

mblasi commented Jul 14, 2019

The problem is not about the wrapping layouts's 'layout_height:[wrap_content|match_parent]', it is related to the textview height when it has multiple lines....

@Ndack
Copy link

Ndack commented Sep 26, 2019

Also that is my problem am facing.. Any one help us concerning with innerview not showing full

@Ndack
Copy link

Ndack commented Sep 26, 2019

app:inner_view="@layout/mycustomview"

In your mycustomerview.xml ADD USE THIS CODE IT WORKS FOR ME

<android.support.v4.widget.NestedScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical">

************* YOUR CONTENT **********************        

</LinearLayout>

</android.support.v4.widget.NestedScrollView>

@Stjin
Copy link

Stjin commented Feb 3, 2020

Any update on this issue? Experiencing this as well. And didn't found a working workaround or fix yet. I am willing to fix the issue in my fork of this project but can't really figure out how.

Stjin added a commit to Stjin/ExpandableCardView that referenced this issue Feb 6, 2020
Attempt to fix: AleSpero/ExpandableCardView#9 with a new attribute (for now)

## This is a beta
This is a beta, introducing ```app:fullHeight``` as a workaround for the [Innerview issue](AleSpero/ExpandableCardView#9)
I hope to fix this in the future and might remove this attribute
Stjin added a commit to Stjin/ExpandableCardView that referenced this issue Feb 9, 2020
@Stjin Stjin linked a pull request Feb 9, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants