Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
mmm-rain
AndroidUtilCode
提交
4625d7e8
A
AndroidUtilCode
项目概览
mmm-rain
/
AndroidUtilCode
与 Fork 源项目一致
从无法访问的项目Fork
通知
4
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
AndroidUtilCode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
4625d7e8
编写于
6月 20, 2019
作者:
B
Blankj
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
see 06/20 log
上级
3bc96042
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
60 addition
and
47 deletion
+60
-47
CHANGELOG.md
CHANGELOG.md
+1
-0
README-CN.md
README-CN.md
+1
-1
README.md
README.md
+1
-1
gradle/config/config.gradle
gradle/config/config.gradle
+2
-2
lib/base/src/main/java/com/blankj/lib/base/rv/BaseAdapter.java
...ase/src/main/java/com/blankj/lib/base/rv/BaseAdapter.java
+3
-14
lib/base/src/main/java/com/blankj/lib/base/rv/BaseCell.java
lib/base/src/main/java/com/blankj/lib/base/rv/BaseCell.java
+14
-0
utilcode/README-CN.md
utilcode/README-CN.md
+2
-9
utilcode/README-STATIC-BUS.md
utilcode/README-STATIC-BUS.md
+1
-1
utilcode/README.md
utilcode/README.md
+2
-9
utilcode/lib/src/main/AndroidManifest.xml
utilcode/lib/src/main/AndroidManifest.xml
+1
-5
utilcode/pkg/src/main/res/layout/activity_image.xml
utilcode/pkg/src/main/res/layout/activity_image.xml
+32
-5
未找到文件。
CHANGELOG.md
浏览文件 @
4625d7e8
*
`19/06/20`
[fix] BusUtils' permission. Publish v1.24.4.
*
`19/06/19`
[fix] UriUtils. Publish v1.24.3.
*
`19/06/18`
[add] ClickUtils, ViewUtils.
*
`19/06/07`
[fix] LogUtils file name contains ':'. Publish v1.24.2.
...
...
README-CN.md
浏览文件 @
4625d7e8
...
...
@@ -41,7 +41,7 @@
[
logo
]:
https://raw.githubusercontent.com/Blankj/AndroidUtilCode/master/art/logo.png
[
aucSvg
]:
https://img.shields.io/badge/AndroidUtilCode-v1.24.
3
-brightgreen.svg
[
aucSvg
]:
https://img.shields.io/badge/AndroidUtilCode-v1.24.
4
-brightgreen.svg
[
auc
]:
https://github.com/Blankj/AndroidUtilCode
[
apiSvg
]:
https://img.shields.io/badge/API-14+-brightgreen.svg
...
...
README.md
浏览文件 @
4625d7e8
...
...
@@ -41,7 +41,7 @@ If this project helps you a lot and you want to support the project's developmen
[
logo
]:
https://raw.githubusercontent.com/Blankj/AndroidUtilCode/master/art/logo.png
[
aucSvg
]:
https://img.shields.io/badge/AndroidUtilCode-v1.24.
3
-brightgreen.svg
[
aucSvg
]:
https://img.shields.io/badge/AndroidUtilCode-v1.24.
4
-brightgreen.svg
[
auc
]:
https://github.com/Blankj/AndroidUtilCode
[
apiSvg
]:
https://img.shields.io/badge/API-14+-brightgreen.svg
...
...
gradle/config/config.gradle
浏览文件 @
4625d7e8
...
...
@@ -8,8 +8,8 @@ gradle.ext {
compileSdkVersion
=
27
minSdkVersion
=
14
targetSdkVersion
=
27
versionCode
=
1
_024_00
3
versionName
=
'1.24.
3
'
// E.g. 1.9.72 => 1,009,072
versionCode
=
1
_024_00
4
versionName
=
'1.24.
4
'
// E.g. 1.9.72 => 1,009,072
// lib version
kotlin_version
=
'1.3.10'
...
...
lib/base/src/main/java/com/blankj/lib/base/rv/BaseAdapter.java
浏览文件 @
4625d7e8
...
...
@@ -4,7 +4,6 @@ import android.content.Context;
import
android.support.annotation.NonNull
;
import
android.support.v7.widget.RecyclerView
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
java.util.List
;
...
...
@@ -39,19 +38,8 @@ public class BaseAdapter<Cell extends BaseCell> extends RecyclerView.Adapter<Bas
@NonNull
@Override
public
BaseViewHolder
onCreateViewHolder
(
@NonNull
ViewGroup
parent
,
int
viewType
)
{
if
(
mContext
==
null
)
{
mContext
=
parent
.
getContext
();
mInflater
=
LayoutInflater
.
from
(
mContext
);
}
int
layoutByType
=
BaseCell
.
getLayoutByType
(
viewType
);
if
(
layoutByType
!=
-
1
)
{
return
new
BaseViewHolder
(
mInflater
.
inflate
(
layoutByType
,
parent
,
false
));
}
View
viewByType
=
BaseCell
.
getViewByType
(
viewType
);
if
(
viewByType
!=
null
)
{
return
new
BaseViewHolder
(
viewByType
);
}
throw
new
RuntimeException
(
"onCreateViewHolder: get holder from view type failed."
);
BaseViewHolder
baseViewHolder
=
Cell
.
onCreateViewHolder
(
parent
,
viewType
);
return
baseViewHolder
;
}
@Override
...
...
@@ -61,6 +49,7 @@ public class BaseAdapter<Cell extends BaseCell> extends RecyclerView.Adapter<Bas
@Override
public
int
getItemCount
()
{
if
(
mData
==
null
)
return
0
;
return
mData
.
size
();
}
...
...
lib/base/src/main/java/com/blankj/lib/base/rv/BaseCell.java
浏览文件 @
4625d7e8
...
...
@@ -3,7 +3,9 @@ package com.blankj.lib.base.rv;
import
android.support.annotation.NonNull
;
import
android.util.SparseArray
;
import
android.util.SparseIntArray
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
/**
* <pre>
...
...
@@ -42,4 +44,16 @@ public abstract class BaseCell {
viewType
=
getClass
().
hashCode
();
VIEW_SPARSE_ARRAY
.
put
(
viewType
,
view
);
}
public
static
BaseViewHolder
onCreateViewHolder
(
@NonNull
ViewGroup
parent
,
int
viewType
)
{
int
layoutByType
=
getLayoutByType
(
viewType
);
if
(
layoutByType
!=
-
1
)
{
return
new
BaseViewHolder
(
LayoutInflater
.
from
(
parent
.
getContext
()).
inflate
(
layoutByType
,
parent
,
false
));
}
View
viewByType
=
getViewByType
(
viewType
);
if
(
viewByType
!=
null
)
{
return
new
BaseViewHolder
(
viewByType
);
}
throw
new
RuntimeException
(
"onCreateViewHolder: get holder from view type failed."
);
}
}
utilcode/README-CN.md
浏览文件 @
4625d7e8
...
...
@@ -2,10 +2,10 @@
Gradle:
```
groovy
implementation
'com.blankj:utilcode:1.24.
3
'
implementation
'com.blankj:utilcode:1.24.
4
'
// if u use AndroidX, use the following
implementation
'com.blankj:utilcodex:1.24.
3
'
implementation
'com.blankj:utilcodex:1.24.
4
'
```
...
...
@@ -41,11 +41,6 @@ pt2Px : pt 转 px
px2Pt : px 转 pt
```
*
### AntiShake 相关 ->
[
AntiShakeUtils.java
][
antiShake.java
]
```
isValid: 是否有效
```
*
### App 相关 ->
[
AppUtils.java
][
app.java
]
->
[
Demo
][
app.demo
]
```
registerAppStatusChangedListener : 注册 App 前后台切换监听器
...
...
@@ -976,8 +971,6 @@ getComments : 获取压缩文件中的注释链表
[
adaptScreen.java
]:
https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/lib/src/main/java/com/blankj/utilcode/util/AdaptScreenUtils.java
[
adaptScreen.demo
]:
https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/pkg/src/main/java/com/blankj/utilcode/pkg/feature/adaptScreen/AdaptScreenActivity.kt
[
antiShake.java
]:
https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/lib/src/main/java/com/blankj/utilcode/util/AntiShakeUtils.java
[
app.java
]:
https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/lib/src/main/java/com/blankj/utilcode/util/AppUtils.java
[
app.demo
]:
https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/pkg/src/main/java/com/blankj/utilcode/pkg/feature/app/AppActivity.kt
...
...
utilcode/README-STATIC-BUS.md
浏览文件 @
4625d7e8
...
...
@@ -27,7 +27,7 @@ apply plugin: "com.blankj.bus"
给 base 模块添加
[
AndroidUtilCode
](
https://github.com/Blankj/AndroidUtilCode
)
依赖:
```
groovy
api
"com.blankj:utilcode:1.24.
3
"
api
"com.blankj:utilcode:1.24.
4
"
```
比如 module0 中存在的
`Module0Activity.java`
,我们通常都是在它内部写一个
`start`
函数来启动它,现在我们给它添加
`@BusUtils.Subscribe`
注解,并给注解的
`name`
赋唯一值,要注意,函数务必要
`public static`
哦:
...
...
utilcode/README.md
浏览文件 @
4625d7e8
...
...
@@ -2,10 +2,10 @@
Gradle:
```
groovy
implementation
'com.blankj:utilcode:1.24.
3
'
implementation
'com.blankj:utilcode:1.24.
4
'
// if u use AndroidX, use the following
implementation
'com.blankj:utilcodex:1.24.
3
'
implementation
'com.blankj:utilcodex:1.24.
4
'
```
...
...
@@ -41,11 +41,6 @@ pt2Px
px2Pt
```
*
### About AntiShake ->
[
AntiShakeUtils.java
][
antiShake.java
]
```
isValid
```
*
### About App ->
[
AppUtils.java
][
app.java
]
->
[
Demo
][
app.demo
]
```
registerAppStatusChangedListener
...
...
@@ -976,8 +971,6 @@ getComments
[
adaptScreen.java
]:
https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/lib/src/main/java/com/blankj/utilcode/util/AdaptScreenUtils.java
[
adaptScreen.demo
]:
https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/pkg/src/main/java/com/blankj/utilcode/pkg/feature/adaptScreen/AdaptScreenActivity.kt
[
antiShake.java
]:
https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/lib/src/main/java/com/blankj/utilcode/util/AntiShakeUtils.java
[
app.java
]:
https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/lib/src/main/java/com/blankj/utilcode/util/AppUtils.java
[
app.demo
]:
https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/pkg/src/main/java/com/blankj/utilcode/pkg/feature/app/AppActivity.kt
...
...
utilcode/lib/src/main/AndroidManifest.xml
浏览文件 @
4625d7e8
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
package=
"com.blankj.utilcode"
>
<permission
android:name=
"com.blankj.utilcode.util.bus"
/>
<application>
<activity
...
...
@@ -23,9 +21,7 @@
android:resource=
"@xml/util_code_provider_paths"
/>
</provider>
<service
android:name=
"com.blankj.utilcode.util.BusUtils$ServerService"
android:permission=
"com.blankj.utilcode.util.bus"
>
<service
android:name=
"com.blankj.utilcode.util.BusUtils$ServerService"
>
<intent-filter>
<action
android:name=
"${applicationId}.messenger"
/>
</intent-filter>
...
...
utilcode/pkg/src/main/res/layout/activity_image.xml
浏览文件 @
4625d7e8
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.RecyclerView
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/imageRv"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:padding=
"@dimen/spacing_16"
/>
\ No newline at end of file
<!--<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="match_parent">-->
<!--<LinearLayout-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="wrap_content"-->
<!--android:orientation="vertical">-->
<android.support.v7.widget.RecyclerView
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/imageRv"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:fadeScrollbars=
"false"
android:padding=
"@dimen/spacing_16"
android:scrollbarSize=
"6dp"
android:scrollbarStyle=
"outsideOverlay"
android:scrollbarThumbVertical=
"@color/light_black"
android:scrollbars=
"vertical"
android:translationZ=
"-8dp"
/>
<!--<LinearLayout-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="40dp"-->
<!--android:background="@color/light_black">-->
<!--</LinearLayout>-->
<!--</LinearLayout>-->
<!--</ScrollView>-->
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录