Giter VIP home page Giter VIP logo

expandablelayout's People

Contributors

cachapa avatar kyosherlock avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

expandablelayout's Issues

Some compressed elements in LinearLayout when I expand ExpandableLayout below

I am using a RecyclerView to show some elements and comparing to your sample I don't see the error. The adapter, that I am using, has some layouts inside it and when I expand the textView I defined as expandable it shows this text perfectly, but the rest elements are compressed... This is my xml:

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

    <include layout="@layout/layout_top_timeline" />

    <include layout="@layout/layout_middle_timeline" />

    <include layout="@layout/layout_bottom_timeline" />

    <TextView
        android:id="@+id/description_video" 
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_marginLeft="14dp"
        android:layout_weight="0.13"
        android:text="@string/txt_timeline"
        android:textColor="#484b4c"
        android:textSize="14sp" />

    <com.kyo.expandablelayout.ExpandableLayout
        android:id="@+id/expandable_text"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <TextView
            android:id="@+id/description_expanded"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="14dp"
            android:text="@string/txt_timeline"
            android:textColor="#484b4c"
            android:textSize="14sp"
            app:canExpand="true" />
    </com.kyo.expandablelayout.ExpandableLayout>




    <View
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:background="@color/line_separator_tab" />

    <TextView
        android:id="@+id/bt_view_all"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="0.1"
        android:background="@null"
        android:gravity="center"
        android:scaleType="fitCenter"
        android:text="View all" />

    <View
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:background="@color/line_separator_tab" />

</LinearLayout>

<FrameLayout
    android:layout_width="64dp"
    android:layout_height="64dp"
    android:layout_marginLeft="14dp"
    android:layout_marginTop="9dp">

    <ImageView
        android:id="@+id/iv_user_picture"
        android:layout_width="64dp"
        android:layout_height="64dp"
        android:adjustViewBounds="true"
        android:scaleType="fitCenter"
        android:src="@drawable/icon_profile_picture_placeholder"
        app:srcCompat="@drawable/icon_profile_picture_placeholder" />

    <ImageView
        android:id="@+id/iv_reaction_emoji"
        android:layout_width="@dimen/default_icon_button"
        android:layout_height="@dimen/default_icon_button"
        android:contentDescription="@string/cd_reaction_face"
        android:scaleType="fitXY" />
</FrameLayout>

In java there is nothing special to show... I only call toggleExpansion() to do it. Using weights in your sample it works perfectly, but not in my case...Thanks

minSDK version

Is there a reason the minSdkVersion is on 15?

I've tried changing it to 14, and everything seems fine. I might have missed some 15 and up code, so that's why I'm asking ๐Ÿ˜„

In Release build ExpandableLayout not expanding

Hello Sherlock.jiang,

This article is really nice, When I tried this for my app in debugg build it is working fine, But in release build its not expanding. I am using in recycle view. Please review code as below.

Please help on this what i am doing wrong.

Thanks in advance,
Guru.

  <android.support.v7.widget.CardView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_margin="@dimen/dimen_five_dp"
    card_view:cardBackgroundColor="@color/white_color"
    card_view:cardCornerRadius="@dimen/dimen_four_dp"
    card_view:cardElevation="@dimen/dimen_two_dp">

    <com.kyo.expandablelayout.ExpandableLayout
        android:id="@+id/expandablelayout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:paddingBottom="@dimen/dimen_ten_dp"
            android:paddingTop="@dimen/dimen_ten_dp"></LinearLayout>

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

          
        </LinearLayout>

    </com.kyo.expandablelayout.ExpandableLayout>
</android.support.v7.widget.CardView>

Expandable grid layout

It is not a issue , it's an enhancement actually, I want to set RecyclerView layout manager as GridLayoutManager but than if I expand a item of RecyclerView it should expand to device's screen full width

White Space below the parent item. How to fix this

Could you please advise if there is a way to fix white space in the place of expanded view. I copied all components from your sample for recyclerview and when I tried running it I got this error
error. I get the same white space for text view too.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.