MCPcopy Index your code
hub / github.com/SilenceDut/ExpandableLayout

github.com/SilenceDut/ExpandableLayout @1.3.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.3.0 ↗ · + Follow
81 symbols 155 edges 17 files 16 documented · 20%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

ExpandableLayout

A expandable Layout to save space and reduce jump between Activity and Fragment

USE

Project

It had been used in project KnowWeather,you can learn more.

SimpleUse

intro

Use in RecyclerView

parent view scroll automatically if the view expand out of device screen,

(当展开时如果超过屏幕的高度时父控件自动上移)

intro

Use in ListView

parent view not scroll automatically if the view expand out of device screen

(当展开时如果超过屏幕的高度时父控件不自动上移)

intro

(It runs smoothly, but gif is not appear well) sample.apk

Attention

scroll automatically function not perform well in listview so far.but it perform well in RecyclerView

Adding to your project

This library is available through JitPack.

Step 1. Add the JitPack repository to your build file

gradle

allprojects {
    repositories {
        ...
        maven { url "https://jitpack.io" }
    }
}

maven

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

Step 2. Add the dependency

gradle

compile 'com.github.SilenceDut:ExpandableLayout:1.2.0'

maven

<dependency>
    <groupId>com.github.SilenceDut</groupId>
    <artifactId>ExpandableLayout</artifactId>
    <version>{latest-version}</version>
</dependency>

Basic Usage

Supported Attributes

attr default mean
expDuration 300 expand duration.
expWithParentScroll false parent view should scroll automatically if the view expand out of device screen(当展开时如果超过屏幕的高度是父控件否自动上移).
expExpandScrollTogether false parent view should scroll together with view expanding.
ExpandableLayout inherited from LinearLayout,and the default Orientation is VERTICAL
<com.silencedut.expandablelayout.ExpandableLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    app:expWithParentScroll="true"
    app:expDuration = "300"
    app:expExpandScrollTogether = "false"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <layout1
    ...
    />

    <layout2
    ...
    />

</com.silencedut.expandablelayout.ExpandableLayout>

License

Copyright 2015-2016 SilenceDut

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Extension points exported contracts — how you extend this code

OnExpandListener (Interface)
(no doc) [3 implementers]
library/src/main/java/com/silencedut/expandablelayout/ExpandableLayout.java

Core symbols most depended-on inside this repo

setOnExpandListener
called by 3
library/src/main/java/com/silencedut/expandablelayout/ExpandableLayout.java
addFrag
called by 3
app/src/main/java/com/silencedut/expandablelayoutsample/SamplePageAdapter.java
init
called by 2
library/src/main/java/com/silencedut/expandablelayout/ExpandableLayout.java
verticalAnimate
called by 2
library/src/main/java/com/silencedut/expandablelayout/ExpandableLayout.java
setExpand
called by 2
library/src/main/java/com/silencedut/expandablelayout/ExpandableLayout.java
onExpand
called by 2
library/src/main/java/com/silencedut/expandablelayout/ExpandableLayout.java
getScrolledParent
called by 1
library/src/main/java/com/silencedut/expandablelayout/Utils.java
createParentAnimator
called by 1
library/src/main/java/com/silencedut/expandablelayout/Utils.java

Shape

Method 62
Class 18
Interface 1

Languages

Java100%

Modules by API surface

library/src/main/java/com/silencedut/expandablelayout/ExpandableLayout.java22 symbols
app/src/main/java/com/silencedut/expandablelayoutsample/SummonerAdapter.java13 symbols
app/src/main/java/com/silencedut/expandablelayoutsample/ListViewAdapter.java10 symbols
app/src/main/java/com/silencedut/expandablelayoutsample/SamplePageAdapter.java6 symbols
library/src/main/java/com/silencedut/expandablelayout/Utils.java4 symbols
app/src/main/java/com/silencedut/expandablelayoutsample/SimpleUseFragment.java4 symbols
app/src/main/java/com/silencedut/expandablelayoutsample/RecyclerViewFragment.java3 symbols
app/src/main/java/com/silencedut/expandablelayoutsample/MainActivity.java3 symbols
app/src/main/java/com/silencedut/expandablelayoutsample/ListViewFragment.java3 symbols
library/src/test/java/com/silencedut/expandablelayout/ExampleUnitTest.java2 symbols
library/src/androidTest/java/com/silencedut/expandablelayout/ExampleInstrumentationTest.java2 symbols
app/src/test/java/com/silencedut/expandablelayout/ExampleUnitTest.java2 symbols

For agents

$ claude mcp add ExpandableLayout \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact