MCPcopy Index your code
hub / github.com/bingoogolapple/BGASwipeItemLayout-Android

github.com/bingoogolapple/BGASwipeItemLayout-Android @v1.0.4

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0.4 ↗ · + Follow
115 symbols 216 edges 10 files 22 documented · 19%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

:running:BGASwipeItemLayout-Android:running:

类似iOS带弹簧效果的左右滑动控件,可作为AbsListView和RecyclerView的item。支持给BGASwipeItemLayout和其子控件设置margin和padding属性

效果图

Image of 测试各种事件 Image of ListViewDemo Image of RecyclerViewDemo

Gradle依赖Maven Central

dependencies {
    compile 'cn.bingoogolapple:bga-swipeitemlayout:latestVersion@aar'
}

BGASwipeItemLayout方法说明

/**
 * 以动画方式打开
 */
public void openWithAnim()

/**
 * 以动画方式关闭
 */
public void closeWithAnim()

/**
 * 直接打开
 */
public void open()

/**
 * 直接关闭。如果在AbsListView中删除已经打开的item时,请用该方法关闭item,否则重用item时有问题。RecyclerView中可以用该方法,也可以用closeWithAnim
 */
public void close()

/**
 * 当前是否为打开状态
 *
 * @return
 */
public boolean isOpened()

/**
 * 当前是否为关闭状态
 *
 * @return
 */
public boolean isClosed()

/**
 * 获取顶部视图
 *
 * @return
 */
public View getTopView()

/**
 * 获取底部视图
 *
 * @return
 */
public View getBottomView()

/**
 * 设置是否可滑动
 *
 * @return
 */
public void setSwipeAble(boolean swipeAble)

BGASwipeItemLayoutDelegate接口说明

/**
 * 变为打开状态
 *
 * @param swipeItemLayout
 */
void onBGASwipeItemLayoutOpened(BGASwipeItemLayout swipeItemLayout);

/**
 * 变为关闭状态
 *
 * @param swipeItemLayout
 */
void onBGASwipeItemLayoutClosed(BGASwipeItemLayout swipeItemLayout);

/**
 * 从关闭状态切换到正在打开状态
 *
 * @param swipeItemLayout
 */
void onBGASwipeItemLayoutStartOpen(BGASwipeItemLayout swipeItemLayout);

自定义属性说明

属性名 说明 默认值
bga_sil_swipeDirection 往左滑还是往右滑为打开状态(left或right) left
bga_sil_bottomMode 底部视图展现方式(layDown或pullOut) pullOut
bga_sil_springDistance 弹簧距离 0dp
bga_sil_swipeAble 是否可左右滑动 true

关于我

新浪微博 个人主页 邮箱 BGA系列开源库QQ群
bingoogolapple bingoogolapple.cn bingoogolapple@gmail.com BGA_CODE_CLUB

License

Copyright 2015 bingoogolapple

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

BGASwipeItemLayoutDelegate (Interface)
(no doc) [3 implementers]
library/src/main/java/cn/bingoogolapple/swipeitemlayout/BGASwipeItemLayout.java

Core symbols most depended-on inside this repo

isClosed
called by 6
library/src/main/java/cn/bingoogolapple/swipeitemlayout/BGASwipeItemLayout.java
closeOpenedSwipeItemLayoutWithAnim
called by 5
demo/src/main/java/cn/bingoogolapple/swipeitemlayout/demo/adapter/AdapterViewAdapter.java
setSwipeAble
called by 4
library/src/main/java/cn/bingoogolapple/swipeitemlayout/BGASwipeItemLayout.java
setDelegate
called by 3
library/src/main/java/cn/bingoogolapple/swipeitemlayout/BGASwipeItemLayout.java
setOnLongClickListener
called by 3
library/src/main/java/cn/bingoogolapple/swipeitemlayout/BGASwipeItemLayout.java
closeWithAnim
called by 3
library/src/main/java/cn/bingoogolapple/swipeitemlayout/BGASwipeItemLayout.java
close
called by 3
library/src/main/java/cn/bingoogolapple/swipeitemlayout/BGASwipeItemLayout.java
requestParentDisallowInterceptTouchEvent
called by 2
library/src/main/java/cn/bingoogolapple/swipeitemlayout/BGASwipeItemLayout.java

Shape

Method 101
Class 10
Enum 3
Interface 1

Languages

Java100%

Modules by API surface

library/src/main/java/cn/bingoogolapple/swipeitemlayout/BGASwipeItemLayout.java59 symbols
demo/src/main/java/cn/bingoogolapple/swipeitemlayout/demo/adapter/AdapterViewAdapter.java9 symbols
demo/src/main/java/cn/bingoogolapple/swipeitemlayout/demo/activity/ListViewDemoActivity.java9 symbols
demo/src/main/java/cn/bingoogolapple/swipeitemlayout/demo/adapter/RecyclerViewAdapter.java8 symbols
demo/src/main/java/cn/bingoogolapple/swipeitemlayout/demo/activity/SwipeItemActivity.java8 symbols
demo/src/main/java/cn/bingoogolapple/swipeitemlayout/demo/activity/RecyclerViewDemoActivity.java8 symbols
demo/src/main/java/cn/bingoogolapple/swipeitemlayout/demo/widget/Divider.java5 symbols
demo/src/main/java/cn/bingoogolapple/swipeitemlayout/demo/activity/MainActivity.java5 symbols
demo/src/main/java/cn/bingoogolapple/swipeitemlayout/demo/model/NormalModel.java2 symbols
demo/src/main/java/cn/bingoogolapple/swipeitemlayout/demo/engine/DataEngine.java2 symbols

For agents

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

⬇ download graph artifact