Skip to content

Commit

Permalink
迁移到androidx,支持开启菜单的情况下打开其他菜单或滑动,并提供布局预览属性
Browse files Browse the repository at this point in the history
  • Loading branch information
aitsuki committed Apr 25, 2020
1 parent 39e31ab commit 300bcd6
Show file tree
Hide file tree
Showing 26 changed files with 459 additions and 481 deletions.
Binary file modified .idea/caches/build_file_checksums.ser
Binary file not shown.
134 changes: 109 additions & 25 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 17 additions & 3 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 16 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# SwipeMenuRecyclerView

![](http://upload-images.jianshu.io/upload_images/2202079-68f9a97838a05c53.gif?imageMogr2/auto-orient/strip)

### Usage
## Usage

<b>Step 1. Add the JitPack repository to your build file</b>
Add it in your root build.gradle at the end of repositories:
Add it in your root `build.gradle` at the end of repositories:

```
allprojects {
repositories {
Expand All @@ -12,9 +15,19 @@ Add it in your root build.gradle at the end of repositories:
}
}
```

<b>Step 2. Add the dependency</b>

```
dependencies {
compile 'com.github.AItsuki:SwipeMenuRecyclerView:1.1.3'
compile 'com.github.AItsuki:SwipeMenuRecyclerView:1.1.4'
}
```

# 存在问题

## 点击事件bug

`SwipeItemLayout`默认设置了`clickable`为true,会拦截掉parent的点击事件。所以如果SwipeItemLayout不是RecyclerView的Item的根布局,那么通过`ViewHolder.itemView.setOnClickListener`设置的点击时间将不起作用。需要将点击事件设置到`SwipeItemLayout`上。


2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.android.tools.build:gradle:3.6.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
14 changes: 5 additions & 9 deletions demo/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 28
compileSdkVersion 29
defaultConfig {
applicationId "com.aitsuki.swipedemo"
minSdkVersion 15
targetSdkVersion 28
targetSdkVersion 29
versionCode 1
versionName "1.0"
}
Expand All @@ -16,8 +16,6 @@ android {
}
}



compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
Expand All @@ -26,10 +24,8 @@ android {

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')

implementation project(':library')
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:appcompat-v7:28.0.0-rc02'
implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.40'
implementation 'com.android.support:recyclerview-v7:28.0.0-rc02'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.cardview:cardview:1.0.0'
}
2 changes: 0 additions & 2 deletions demo/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".NativeRecyclerViewAdapterActivity" />
<activity android:name=".CymChadActivity" />
</application>

</manifest>
Loading

0 comments on commit 300bcd6

Please sign in to comment.