Comments (6)
I had the same issue, the that I found is to use
android:orientation="vertical"
as an attribute because it extends LinearLayout. Enjoy.
from expandablelayout.
Hello AbduazizKayumov,
I managed to find a solution for this problem. I have also text that is coming from server so it will change it's size dynamically.
You have to use ExpandableRelativeLayout like this:
<Button
android:id="@+id/expandableButton1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@color/dark_green2"
android:drawableRight="@android:drawable/arrow_down_float"
android:onClick="expandableButton1"
android:text=""
android:textColor="#fff"
android:layout_marginTop="16dp"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:visibility="gone" />
<com.github.aakira.expandablelayout.ExpandableRelativeLayout
android:id="@+id/expandableLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/light_green2"
android:padding="16dp"
app:ael_duration="400"
app:ael_expanded="true"
app:ael_interpolator="bounce"
app:ael_orientation="vertical"
android:layout_below="@+id/expandableButton1"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:visibility="gone">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/expandableText1"
android:text="Loading stuff from internet..."/>
</com.github.aakira.expandablelayout.ExpandableRelativeLayout>
Note here that I use: android:visibility="gone" by default. This makes view invisible at first. We will make it visible on Java code.
Then on Java code, add function like this, before you call your mOverlayText.setOnClickListener(new View.OnClickListener()
public void makeViewsVisible() {
View view1 = findViewById(R.id.expandableButton1);
View view1_text = findViewById(R.id.expandableLayout1);
view1.setVisibility(View.VISIBLE);
view1_text.setVisibility(View.VISIBLE);
}
You have to also call this function from inside your mOverlayText.setOnClickListener(new View.OnClickListener().
For me it works, does not matter that I have text coming from server. Also there is no problem with animation.
Hope this helps!
from expandablelayout.
I'm having exactly the same problem!
from expandablelayout.
@dude0367 your solution fixed it for me. I have both ael_orientation=vertical and android:orientation='vertical' and it works now. Thanks
from expandablelayout.
ael_orientation=vertical and android:orientation='vertical' and it works now. Thanks
from expandablelayout.
I had the same issue, the that I found is to use
android:orientation="vertical"
as an attribute because it extends LinearLayout. Enjoy.
Not working for me.
@dude0367 your solution fixed it for me. I have both ael_orientation=vertical and android:orientation='vertical' and it works now. Thanks
With this works fine.
from expandablelayout.
Related Issues (20)
- Very nice
- Option onClick
- How collapse when activity viewed? HOT 1
- Collapse at certain height? HOT 1
- Recyclerview collapse mode : Unwanted negative space HOT 1
- Change the arrow icon
- Measured height for programatically added view is larger than actual size
- expand issue HOT 6
- Expandable Relative Layout not shows data in recyclerView got from server HOT 1
- After update 27 api its not supporting, what is another solutions?
- app get crashed when i add more than 5 elements in recycler view
- After changing one of children's visibility ExpandableLinearLayout is not resized
- Expand single child at a time in Expandable Linear Layout
- Expandable ExpandedLinearLayout object height HOT 1
- expand and collapse does not work in android 9 HOT 1
- IllegalStateException: at com.github.aakira.expandablelayout.ExpandableLinearLayout.onMeasure (ExpandableLinearLayout.java:140) HOT 2
- ExpandableLinearLayout in recycler view affects animations HOT 1
- Expand issue
- JCenter is at end of life
- JCenter replacement
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from expandablelayout.