Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
mmm-rain
AndroidUtilCode
提交
18cc0f99
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,发现更多精彩内容 >>
提交
18cc0f99
编写于
3月 20, 2019
作者:
B
Blankj
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
see 03/19 log
上级
340e8c95
变更
16
隐藏空白更改
内联
并排
Showing
16 changed file
with
487 addition
and
221 deletion
+487
-221
launcher/app/src/main/AndroidManifest.xml
launcher/app/src/main/AndroidManifest.xml
+1
-0
launcher/pkg/src/main/AndroidManifest.xml
launcher/pkg/src/main/AndroidManifest.xml
+1
-0
lib/base/build.gradle
lib/base/build.gradle
+1
-1
lib/base/src/main/java/com/blankj/lib/base/slideBack/SlideBackLayout.java
...n/java/com/blankj/lib/base/slideBack/SlideBackLayout.java
+198
-0
lib/base/src/main/res/values/styles.xml
lib/base/src/main/res/values/styles.xml
+4
-0
subutil/app/src/main/AndroidManifest.xml
subutil/app/src/main/AndroidManifest.xml
+1
-0
utilcode/README-CN.md
utilcode/README-CN.md
+2
-0
utilcode/app/build.gradle
utilcode/app/build.gradle
+1
-1
utilcode/app/src/main/AndroidManifest.xml
utilcode/app/src/main/AndroidManifest.xml
+1
-0
utilcode/lib/src/main/java/com/blankj/utilcode/util/Utils.java
...ode/lib/src/main/java/com/blankj/utilcode/util/Utils.java
+24
-0
utilcode/pkg/src/main/java/com/blankj/utilcode/pkg/feature/CoreUtilActivity.kt
.../java/com/blankj/utilcode/pkg/feature/CoreUtilActivity.kt
+4
-0
utilcode/pkg/src/main/java/com/blankj/utilcode/pkg/helper/DialogHelper.kt
.../main/java/com/blankj/utilcode/pkg/helper/DialogHelper.kt
+4
-1
utilcode/pkg/src/main/res/anim/slide_in_bottom_200.xml
utilcode/pkg/src/main/res/anim/slide_in_bottom_200.xml
+6
-0
utilcode/pkg/src/main/res/anim/slide_out_bottom_200.xml
utilcode/pkg/src/main/res/anim/slide_out_bottom_200.xml
+6
-0
utilcode/pkg/src/main/res/layout/activity_util_core.xml
utilcode/pkg/src/main/res/layout/activity_util_core.xml
+225
-218
utilcode/pkg/src/main/res/values/styles.xml
utilcode/pkg/src/main/res/values/styles.xml
+8
-0
未找到文件。
launcher/app/src/main/AndroidManifest.xml
浏览文件 @
18cc0f99
...
...
@@ -13,6 +13,7 @@
android:name=
"com.blankj.launcher.pkg.MainActivity"
android:configChanges=
"orientation|keyboardHidden|screenSize"
android:screenOrientation=
"user"
android:theme=
"@style/MainActivityTheme"
android:windowSoftInputMode=
"stateHidden"
>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
...
...
launcher/pkg/src/main/AndroidManifest.xml
浏览文件 @
18cc0f99
...
...
@@ -6,6 +6,7 @@
android:name=
".MainActivity"
android:configChanges=
"orientation|keyboardHidden|screenSize"
android:screenOrientation=
"user"
android:theme=
"@style/MainActivityTheme"
android:windowSoftInputMode=
"stateHidden"
/>
</application>
...
...
lib/base/build.gradle
浏览文件 @
18cc0f99
...
...
@@ -13,7 +13,7 @@ dependencies {
api
dep
.
constraint
api
dep
.
kotlin
api
dep
.
free_proguard
api
'com.r0adkll:slidableactivity:2.0.
5
'
api
'com.r0adkll:slidableactivity:2.0.
6
'
compileOnly
dep
.
leakcanary
.
android_no_op
// api 'com.blankj:utilcode:1.23.7'
}
\ No newline at end of file
lib/base/src/main/java/com/blankj/lib/base/slideBack/SlideBackLayout.java
0 → 100644
浏览文件 @
18cc0f99
package
com.blankj.lib.base.slideBack
;
import
android.content.Context
;
import
android.support.annotation.NonNull
;
import
android.support.annotation.Nullable
;
import
android.support.v4.view.MotionEventCompat
;
import
android.util.AttributeSet
;
import
android.view.MotionEvent
;
import
android.view.VelocityTracker
;
import
android.view.View
;
import
android.view.ViewConfiguration
;
import
android.widget.FrameLayout
;
import
android.widget.Scroller
;
import
com.blankj.utilcode.util.LogUtils
;
/**
* <pre>
* author: blankj
* blog : http://blankj.com
* time : 2019/03/20
* desc :
* </pre>
*/
public
class
SlideBackLayout
extends
FrameLayout
{
private
View
mParentView
;
private
int
mEdgeSlop
;
private
int
mTouchSlop
;
private
boolean
isConsumeDown
;
private
float
mDownX
;
private
float
mDownY
;
private
float
mTempX
;
private
Scroller
mScroller
;
private
boolean
isFinish
=
false
;
private
boolean
isSliding
=
false
;
private
int
mViewWidth
;
private
SlideListener
mListener
=
new
SlideListener
()
{
@Override
public
void
onStart
()
{
LogUtils
.
e
(
"start: "
);
}
@Override
public
void
onChange
(
float
x
)
{
LogUtils
.
e
(
"onChange: "
+
x
);
}
@Override
public
void
onFinish
()
{
LogUtils
.
e
(
"onFinish: "
);
}
};
private
VelocityTracker
mVelocityTracker
;
public
SlideBackLayout
(
@NonNull
Context
context
)
{
this
(
context
,
null
);
}
public
SlideBackLayout
(
@NonNull
Context
context
,
@Nullable
AttributeSet
attrs
)
{
super
(
context
,
attrs
);
mTouchSlop
=
ViewConfiguration
.
get
(
context
).
getScaledTouchSlop
();
mEdgeSlop
=
ViewConfiguration
.
get
(
context
).
getScaledEdgeSlop
();
mScroller
=
new
Scroller
(
context
);
}
@Override
protected
void
onLayout
(
boolean
changed
,
int
l
,
int
t
,
int
r
,
int
b
)
{
super
.
onLayout
(
changed
,
l
,
t
,
r
,
b
);
if
(
changed
)
{
mParentView
=
(
View
)
getParent
();
mViewWidth
=
getWidth
();
}
}
@Override
public
boolean
dispatchTouchEvent
(
MotionEvent
event
)
{
final
int
action
=
event
.
getAction
();
switch
(
action
)
{
case
MotionEvent
.
ACTION_DOWN
:
if
(
super
.
dispatchTouchEvent
(
event
))
{
isConsumeDown
=
true
;
}
else
{
mDownX
=
mTempX
=
event
.
getRawX
();
mDownY
=
event
.
getRawY
();
}
isSliding
=
false
;
return
true
;
case
MotionEvent
.
ACTION_MOVE
:
if
(!
isConsumeDown
)
{
LogUtils
.
e
();
if
(
isSliding
)
break
;
if
(
event
.
getRawX
()
-
mDownX
>
mTouchSlop
)
{
isSliding
=
true
;
if
(
mListener
!=
null
)
{
mListener
.
onStart
();
}
return
true
;
}
}
break
;
default
:
break
;
}
return
super
.
dispatchTouchEvent
(
event
);
}
@Override
public
boolean
onTouchEvent
(
MotionEvent
event
)
{
LogUtils
.
e
(
event
);
if
(
isConsumeDown
||
!
isSliding
)
return
super
.
onTouchEvent
(
event
);
if
(
mVelocityTracker
==
null
)
{
mVelocityTracker
=
VelocityTracker
.
obtain
();
}
mVelocityTracker
.
addMovement
(
event
);
final
int
action
=
MotionEventCompat
.
getActionMasked
(
event
);
switch
(
action
)
{
case
MotionEvent
.
ACTION_MOVE
:
int
moveX
=
(
int
)
event
.
getRawX
();
if
(
moveX
>
mDownX
)
{
mParentView
.
scrollBy
((
int
)
(
mTempX
-
moveX
),
0
);
}
else
if
(
moveX
<
mDownX
)
{
//解决连续滑动Activity无法闭合的问题
mParentView
.
scrollTo
(
0
,
0
);
}
if
(
mListener
!=
null
)
{
mListener
.
onChange
(
mTempX
-
moveX
);
}
mTempX
=
moveX
;
break
;
case
MotionEvent
.
ACTION_UP
:
case
MotionEvent
.
ACTION_CANCEL
:
startScroll
();
break
;
}
return
true
;
}
private
void
startScroll
()
{
final
VelocityTracker
velocityTracker
=
mVelocityTracker
;
velocityTracker
.
computeCurrentVelocity
(
1000
,
ViewConfiguration
.
get
(
getContext
()).
getScaledMaximumFlingVelocity
());
int
xVelocity
=
(
int
)
velocityTracker
.
getXVelocity
();
LogUtils
.
e
(
xVelocity
);
if
(
mParentView
.
getScrollX
()
<=
-
mViewWidth
/
2
)
{
isFinish
=
true
;
scrollToRight
();
}
else
{
isFinish
=
false
;
scrollToOrigin
();
}
if
(
mListener
!=
null
)
{
mListener
.
onFinish
();
}
}
@Override
public
void
computeScroll
()
{
if
(
mScroller
.
computeScrollOffset
())
{
mParentView
.
scrollTo
(
mScroller
.
getCurrX
(),
mScroller
.
getCurrY
());
postInvalidate
();
if
(
mScroller
.
isFinished
()
&&
isFinish
&&
mListener
!=
null
)
{
mListener
.
onFinish
();
}
}
}
private
void
scrollToOrigin
()
{
final
int
delta
=
mParentView
.
getScrollX
();
mScroller
.
startScroll
(
mParentView
.
getScrollX
(),
0
,
-
delta
,
0
,
Math
.
abs
(
delta
));
postInvalidate
();
}
private
void
scrollToRight
()
{
final
int
delta
=
mViewWidth
+
mParentView
.
getScrollX
();
mScroller
.
startScroll
(
mParentView
.
getScrollX
(),
0
,
-
delta
+
1
,
0
,
Math
.
abs
(
delta
));
postInvalidate
();
}
public
interface
SlideListener
{
void
onStart
();
void
onChange
(
float
x
);
void
onFinish
();
}
}
lib/base/src/main/res/values/styles.xml
浏览文件 @
18cc0f99
...
...
@@ -13,6 +13,10 @@
<item
name=
"android:windowBackground"
>
@android:color/transparent
</item>
</style>
<style
name=
"MainActivityTheme"
parent=
"AppTheme"
>
<item
name=
"android:windowIsTranslucent"
>
false
</item>
</style>
<style
name=
"TextStyle"
>
<item
name=
"android:textSize"
>
@dimen/font_16
</item>
<item
name=
"android:textColor"
>
@drawable/base_sel_button_txt_color
</item>
...
...
subutil/app/src/main/AndroidManifest.xml
浏览文件 @
18cc0f99
...
...
@@ -13,6 +13,7 @@
android:name=
"com.blankj.subutil.pkg.feature.SubUtilActivity"
android:configChanges=
"orientation|keyboardHidden|screenSize"
android:screenOrientation=
"user"
android:theme=
"@style/MainActivityTheme"
android:windowSoftInputMode=
"stateHidden"
>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
...
...
utilcode/README-CN.md
浏览文件 @
18cc0f99
...
...
@@ -712,6 +712,8 @@ getRomInfo : 获取 ROM 信息
```
getScreenWidth : 获取屏幕的宽度(单位:px)
getScreenHeight : 获取屏幕的高度(单位:px)
getAppScreenWidth : 获取应用屏幕的宽度(单位:px)
getAppScreenHeight : 获取应用屏幕的高度(单位:px)
getScreenDensity : 获取屏幕密度
getScreenDensityDpi: 获取屏幕密度 DPI
setFullScreen : 设置屏幕为全屏
...
...
utilcode/app/build.gradle
浏览文件 @
18cc0f99
...
...
@@ -4,5 +4,5 @@ apply {
dependencies
{
implementation
fileTree
(
dir:
'libs'
,
include:
[
'*.jar'
])
api
project
(
':utilcode-pkg'
)
implementation
project
(
':utilcode-pkg'
)
}
\ No newline at end of file
utilcode/app/src/main/AndroidManifest.xml
浏览文件 @
18cc0f99
...
...
@@ -13,6 +13,7 @@
android:name=
"com.blankj.utilcode.pkg.feature.CoreUtilActivity"
android:configChanges=
"orientation|keyboardHidden|screenSize"
android:screenOrientation=
"user"
android:theme=
"@style/MainActivityTheme"
android:windowSoftInputMode=
"stateHidden"
>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
...
...
utilcode/lib/src/main/java/com/blankj/utilcode/util/Utils.java
浏览文件 @
18cc0f99
package
com.blankj.utilcode.util
;
import
android.animation.ValueAnimator
;
import
android.annotation.SuppressLint
;
import
android.app.Activity
;
import
android.app.ActivityManager
;
import
android.app.Application
;
import
android.app.Application.ActivityLifecycleCallbacks
;
import
android.content.Context
;
import
android.os.Build
;
import
android.os.Bundle
;
import
android.os.Handler
;
import
android.os.Looper
;
import
android.support.v4.content.FileProvider
;
import
android.util.Log
;
import
android.view.View
;
import
android.view.inputmethod.InputMethodManager
;
...
...
@@ -168,6 +171,26 @@ public final class Utils {
return
task
;
}
private
static
void
setAnimatorsEnabled
()
{
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
O
&&
ValueAnimator
.
areAnimatorsEnabled
())
{
return
;
}
try
{
//noinspection JavaReflectionMemberAccess
Field
sDurationScaleField
=
ValueAnimator
.
class
.
getDeclaredField
(
"sDurationScale"
);
sDurationScaleField
.
setAccessible
(
true
);
float
sDurationScale
=
(
Float
)
sDurationScaleField
.
get
(
null
);
if
(
sDurationScale
==
0
f
)
{
sDurationScaleField
.
set
(
null
,
1
f
);
Log
.
i
(
"Utils"
,
"setAnimatorsEnabled: Animators are enabled now!"
);
}
}
catch
(
NoSuchFieldException
e
)
{
e
.
printStackTrace
();
}
catch
(
IllegalAccessException
e
)
{
e
.
printStackTrace
();
}
}
static
class
ActivityLifecycleImpl
implements
ActivityLifecycleCallbacks
{
final
LinkedList
<
Activity
>
mActivityList
=
new
LinkedList
<>();
...
...
@@ -180,6 +203,7 @@ public final class Utils {
@Override
public
void
onActivityCreated
(
Activity
activity
,
Bundle
savedInstanceState
)
{
setAnimatorsEnabled
();
setTopActivity
(
activity
);
}
...
...
utilcode/pkg/src/main/java/com/blankj/utilcode/pkg/feature/CoreUtilActivity.kt
浏览文件 @
18cc0f99
...
...
@@ -54,6 +54,10 @@ class CoreUtilActivity : BaseTitleActivity() {
}
}
override
fun
isSwipeBack
():
Boolean
{
return
false
}
override
fun
bindTitle
():
CharSequence
{
return
getString
(
R
.
string
.
core_util
)
}
...
...
utilcode/pkg/src/main/java/com/blankj/utilcode/pkg/helper/DialogHelper.kt
浏览文件 @
18cc0f99
...
...
@@ -80,13 +80,16 @@ object DialogHelper {
val
window
=
dialog
.
window
window
.
requestFeature
(
Window
.
FEATURE_NO_TITLE
)
dialog
.
setOnShowListener
{
KeyboardUtils
.
fixAndroidBug5497
(
window
)
}
dialog
.
show
()
window
.
setBackgroundDrawable
(
ColorDrawable
(
0
))
val
attributes
=
dialog
.
window
.
attributes
attributes
.
gravity
=
Gravity
.
BOTTOM
attributes
.
width
=
ScreenUtils
.
getAppScreenWidth
()
attributes
.
height
=
ScreenUtils
.
getAppScreenHeight
()
//* 2 / 5
attributes
.
height
=
ScreenUtils
.
getAppScreenHeight
()
*
2
/
5
attributes
.
windowAnimations
=
R
.
style
.
BottomDialogAnimation
dialog
.
window
.
attributes
=
attributes
}
...
...
utilcode/pkg/src/main/res/anim/slide_in_bottom_200.xml
0 → 100755
浏览文件 @
18cc0f99
<?xml version="1.0" encoding="utf-8"?>
<translate
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:duration=
"200"
android:fromYDelta=
"100%"
android:toYDelta=
"0"
/>
\ No newline at end of file
utilcode/pkg/src/main/res/anim/slide_out_bottom_200.xml
0 → 100755
浏览文件 @
18cc0f99
<?xml version="1.0" encoding="utf-8"?>
<translate
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:duration=
"200"
android:fromYDelta=
"0"
android:toYDelta=
"100%"
/>
\ No newline at end of file
utilcode/pkg/src/main/res/layout/activity_util_core.xml
浏览文件 @
18cc0f99
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<com.blankj.lib.base.slideBack.SlideBackLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center_horizontal"
android:orientation=
"vertical"
android:paddingLeft=
"@dimen/spacing_16"
android:paddingRight=
"@dimen/spacing_16"
>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"activityClick"
android:text=
"@string/demo_activity"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"adaptScreenClick"
android:text=
"@string/demo_adapt_screen"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"appClick"
android:text=
"@string/demo_app"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"barClick"
android:text=
"@string/demo_bar"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"brightnessClick"
android:text=
"@string/demo_brightness"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"busClick"
android:text=
"@string/demo_bus"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"cleanClick"
android:text=
"@string/demo_clean"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"crashClick"
android:text=
"@string/demo_crash"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"deviceClick"
android:text=
"@string/demo_device"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"flashlightClick"
android:text=
"@string/demo_flashlight"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"fragmentClick"
android:text=
"@string/demo_fragment"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"imageClick"
android:text=
"@string/demo_image"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"keyboardClick"
android:text=
"@string/demo_keyboard"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"logClick"
android:text=
"@string/demo_log"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"metaDataClick"
android:text=
"@string/demo_meta_data"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"networkClick"
android:text=
"@string/demo_network"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"pathClick"
android:text=
"@string/demo_path"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"permissionClick"
android:text=
"@string/demo_permission"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"phoneClick"
android:text=
"@string/demo_phone"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"processClick"
android:text=
"@string/demo_process"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"reflectClick"
android:text=
"@string/demo_reflect"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"resourceClick"
android:text=
"@string/demo_resource"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"romClick"
android:text=
"@string/demo_rom"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"screenClick"
android:text=
"@string/demo_screen"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"sdcardClick"
android:text=
"@string/demo_sdcard"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"snackbarClick"
android:text=
"@string/demo_snackbar"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"spStaticClick"
android:text=
"@string/demo_spStatic"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"spannableClick"
android:text=
"@string/demo_span"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"toastClick"
android:text=
"@string/demo_toast"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"vibrateClick"
android:text=
"@string/demo_vibrate"
/>
</LinearLayout>
android:layout_height=
"wrap_content"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center_horizontal"
android:orientation=
"vertical"
android:paddingLeft=
"@dimen/spacing_16"
android:paddingRight=
"@dimen/spacing_16"
>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"activityClick"
android:text=
"@string/demo_activity"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"adaptScreenClick"
android:text=
"@string/demo_adapt_screen"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"appClick"
android:text=
"@string/demo_app"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"barClick"
android:text=
"@string/demo_bar"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"brightnessClick"
android:text=
"@string/demo_brightness"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"busClick"
android:text=
"@string/demo_bus"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"cleanClick"
android:text=
"@string/demo_clean"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"crashClick"
android:text=
"@string/demo_crash"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"deviceClick"
android:text=
"@string/demo_device"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"flashlightClick"
android:text=
"@string/demo_flashlight"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"fragmentClick"
android:text=
"@string/demo_fragment"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"imageClick"
android:text=
"@string/demo_image"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"keyboardClick"
android:text=
"@string/demo_keyboard"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"logClick"
android:text=
"@string/demo_log"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"metaDataClick"
android:text=
"@string/demo_meta_data"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"networkClick"
android:text=
"@string/demo_network"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"pathClick"
android:text=
"@string/demo_path"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"permissionClick"
android:text=
"@string/demo_permission"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"phoneClick"
android:text=
"@string/demo_phone"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"processClick"
android:text=
"@string/demo_process"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"reflectClick"
android:text=
"@string/demo_reflect"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"resourceClick"
android:text=
"@string/demo_resource"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"romClick"
android:text=
"@string/demo_rom"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"screenClick"
android:text=
"@string/demo_screen"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"sdcardClick"
android:text=
"@string/demo_sdcard"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"snackbarClick"
android:text=
"@string/demo_snackbar"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"spStaticClick"
android:text=
"@string/demo_spStatic"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"spannableClick"
android:text=
"@string/demo_span"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"toastClick"
android:text=
"@string/demo_toast"
/>
<Button
style=
"@style/WideBtnStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"vibrateClick"
android:text=
"@string/demo_vibrate"
/>
</LinearLayout>
</com.blankj.lib.base.slideBack.SlideBackLayout>
utilcode/pkg/src/main/res/values/styles.xml
0 → 100644
浏览文件 @
18cc0f99
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style
name=
"BottomDialogAnimation"
>
<item
name=
"android:windowEnterAnimation"
>
@anim/slide_in_bottom_200
</item>
<item
name=
"android:windowExitAnimation"
>
@anim/slide_out_bottom_200
</item>
</style>
</resources>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录