Skip to content

Commit

Permalink
chore(upgrade): upgrade version name(1.4.5->1.4.6) code(12->13)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacksgong committed Apr 25, 2016
1 parent 2b9ab60 commit 9ddf348
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 21 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Change Log
---

### Version 1.4.6 (2016-04-26)

- 新增 支持`Translucent Status`主题,具体适配可以直接看Demo,适配接口依然非常简单。 Closes #27
- 新增 开放配置 `是否需要让面板高度保持和键盘高度一致` 的接口: `setIgnoreRecommendHeight(boolean)`; 以及对应布局属性配置项 `cn.dreamtobe.kpswitch.R.styleable#KPSwitchPanelLayout_ignore_recommend_height`。Closes #25

### Version 1.4.5 (2016-04-21)

- 修复页面是继承自`Activity``FragmentActivity`的情况下,由于计算键盘是否显示出现错误,导致存在闪动的bug。Closes #24
Expand Down
19 changes: 9 additions & 10 deletions FULLSCREEN_TUTORIAL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# 全屏主题情况下使用引导
# 全屏主题 或者 透明状态栏主题并且在`fitsSystemWindows=false` 情况下使用引导

> 所谓全屏主题,就是 `(activity.getWindow().getAttributes().flags & WindowManager.LayoutParams.FLAG_FULLSCREEN) != 0`
> 这个引导覆盖以下两个Case:
> 1. 全屏主题 (`(activity.getWindow().getAttributes().flags & WindowManager.LayoutParams.FLAG_FULLSCREEN) != 0`)
> 2. 透明状态栏主题(`(activity.getWindow().getAttributes().flags & WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS) != 0`) 并且 根布局的 `fitsSystemWindows=false`
![][fullscreen_resolved_gif]

Expand All @@ -12,8 +14,6 @@
## II. 需要处理页面的layout xml

> 可直接参照: [activity_chatting_fullscreen_resolved.xml][activity_chatting_fullscreen_resolved_xml_link]
> 这边只需要用到一个 **面板布局** ([KPSwitchFSPanelFrameLayout][KPSwitchFSPanelFrameLayout_link]/[KPSwitchFSPanelLinearLayout][KPSwitchFSPanelLinearLayout_link]/[KPSwitchFSPanelRelativeLayout][KPSwitchFSPanelRelativeLayout_link])
```
Expand All @@ -36,7 +36,7 @@

## III. 需要处理页面的Activity:

> 可直接参照: [ChattingResolvedFullScreenActivity.java][ChattingResolvedFullScreenActivity_link]
> 可直接参照: [ChattingResolvedHandleByPlaceholderActivity.java][ChattingResolvedHandleByPlaceholderActivity_link]
1. 主要是处理一些事件([KPSwitchConflictUtil][KPSwitchConflictUtil_link])
2. 键盘状态(高度与显示与否)监听([KeyboardUtil#attach()][KeyboardUtil_attach_link])
Expand Down Expand Up @@ -112,12 +112,11 @@ public boolean dispatchKeyEvent(KeyEvent event){

[fullscreen_resolved_gif]: https://raw.githubusercontent.com/Jacksgong/JKeybordPanelSwitch/master/art/fullscreen_resolved.gif
[AndroidManifest_xml_link]: https://github.com/Jacksgong/JKeyboardPanelSwitch/blob/master/app/src/main/AndroidManifest.xml
[activity_chatting_fullscreen_resolved_xml_link]: https://github.com/Jacksgong/JKeyboardPanelSwitch/blob/master/app/src/main/res/layout/activity_chatting_fullscreen_resolved.xml
[AndroidManifest_xml_link]: https://github.com/Jacksgong/JKeyboardPanelSwitch/blob/master/app/src/main/AndroidManifest.xml#L25
[KPSwitchFSPanelFrameLayout_link]: https://github.com/Jacksgong/JKeyboardPanelSwitch/blob/master/library/src/main/java/cn/dreamtobe/kpswitch/widget/KPSwitchFSPanelFrameLayout.java
[KPSwitchFSPanelLinearLayout_link]: https://github.com/Jacksgong/JKeyboardPanelSwitch/blob/master/library/src/main/java/cn/dreamtobe/kpswitch/widget/KPSwitchFSPanelLinearLayout.java
[KPSwitchFSPanelRelativeLayout_link]: https://github.com/Jacksgong/JKeyboardPanelSwitch/blob/master/library/src/main/java/cn/dreamtobe/kpswitch/widget/KPSwitchFSPanelRelativeLayout.java
[ChattingResolvedFullScreenActivity_link]: https://github.com/Jacksgong/JKeyboardPanelSwitch/blob/master/app/src/main/java/cn/dreamtobe/kpswitch/demo/activity/ChattingResolvedFullScreenActivity.java
[ChattingResolvedHandleByPlaceholderActivity_link]: https://github.com/Jacksgong/JKeyboardPanelSwitch/blob/master/app/src/main/java/cn/dreamtobe/kpswitch/demo/activity/ChattingResolvedHandleByPlaceholderActivity.java
[KPSwitchConflictUtil_link]: https://github.com/Jacksgong/JKeyboardPanelSwitch/blob/master/library/src/main/java/cn/dreamtobe/kpswitch/util/KPSwitchConflictUtil.java
[KeyboardUtil_attach_link]: https://github.com/Jacksgong/JKeyboardPanelSwitch/blob/master/library/src/main/java/cn/dreamtobe/kpswitch/util/KeyboardUtil.java#L146
[IFSPanelConflictLayout_recordKeyboardStatus_link]: https://github.com/Jacksgong/JKeyboardPanelSwitch/blob/master/library/src/main/java/cn/dreamtobe/kpswitch/IFSPanelConflictLayout.java#L22
[KeyboardUtil_attach_link]: https://github.com/Jacksgong/JKeyboardPanelSwitch/blob/master/library/src/main/java/cn/dreamtobe/kpswitch/util/KeyboardUtil.java#L134
[IFSPanelConflictLayout_recordKeyboardStatus_link]: https://github.com/Jacksgong/JKeyboardPanelSwitch/blob/master/library/src/main/java/cn/dreamtobe/kpswitch/IFSPanelConflictLayout.java#L37
8 changes: 5 additions & 3 deletions NON-FULLSCREEN_TUTORIAL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# 非全屏主题情况下使用引导
# 非全屏主题 或者 透明状态栏主题并且在`fitsSystemWindows=true` 情况下使用引导

> 所谓非全屏主题,就是 `(activity.getWindow().getAttributes().flags & WindowManager.LayoutParams.FLAG_FULLSCREEN) == 0`
> 这个引导覆盖以下两个Case:
> 1. 非全屏主题 (`(activity.getWindow().getAttributes().flags & WindowManager.LayoutParams.FLAG_FULLSCREEN) == 0`) 。
> 2. 透明状态栏主题(`(activity.getWindow().getAttributes().flags & WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS) != 0`) 并且 根布局的 `fitsSystemWindows=true`
![][non-fullscreen_resolved_gif]

Expand Down Expand Up @@ -138,4 +140,4 @@ public boolean dispatchKeyEvent(KeyEvent event){
[KPSwitchRootLinearLayout_link]: https://github.com/Jacksgong/JKeyboardPanelSwitch/blob/master/library/src/main/java/cn/dreamtobe/kpswitch/widget/KPSwitchRootLinearLayout.java
[ChattingResolvedActivity_link]: https://github.com/Jacksgong/JKeyboardPanelSwitch/blob/master/app/src/main/java/cn/dreamtobe/kpswitch/demo/activity/ChattingResolvedActivity.java
[KPSwitchConflictUtil_link]: https://github.com/Jacksgong/JKeyboardPanelSwitch/blob/master/library/src/main/java/cn/dreamtobe/kpswitch/util/KPSwitchConflictUtil.java
[KeyboardUtil_attach_link]: https://github.com/Jacksgong/JKeyboardPanelSwitch/blob/master/library/src/main/java/cn/dreamtobe/kpswitch/util/KeyboardUtil.java#L146
[KeyboardUtil_attach_link]: https://github.com/Jacksgong/JKeyboardPanelSwitch/blob/master/library/src/main/java/cn/dreamtobe/kpswitch/util/KeyboardUtil.java#L134
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,17 @@
`build.gradle`中引入:

```
compile 'cn.dreamtobe.kpswitch:library:1.4.5'
compile 'cn.dreamtobe.kpswitch:library:1.4.6'
```


## 使用引导

- [非全屏主题情况下使用引导](https://github.com/Jacksgong/JKeyboardPanelSwitch/blob/master/NON-FULLSCREEN_TUTORIAL.md)
- [全屏主题情况下使用引导](https://github.com/Jacksgong/JKeyboardPanelSwitch/blob/master/FULLSCREEN_TUTORIAL.md)
> 可以考虑`clone`下来跑下项目中的`demo`,已经用尽量简洁的代码尽量覆盖所有Case了。
![](https://raw.githubusercontent.com/Jacksgong/JKeybordPanelSwitch/master/art/demo_snapshot.jpg)

- [非全屏主题 或者 透明状态栏主题并且在`fitsSystemWindows=true` 情况下使用引导](https://github.com/Jacksgong/JKeyboardPanelSwitch/blob/master/NON-FULLSCREEN_TUTORIAL.md)
- [全屏主题 或者 透明状态栏主题并且在 `fitsSystemWindows=false` 情况下使用引导](https://github.com/Jacksgong/JKeyboardPanelSwitch/blob/master/FULLSCREEN_TUTORIAL.md)

## 基本原理

Expand Down Expand Up @@ -71,8 +74,8 @@ limitations under the License.
[adjust_unresolved_gif]: https://raw.githubusercontent.com/Jacksgong/JKeybordPanelSwitch/master/art/adjust_unresolved.gif
[build_status_svg]: https://travis-ci.org/Jacksgong/JKeyboardPanelSwitch.svg?branch=master
[build_status_link]: https://travis-ci.org/Jacksgong/JKeyboardPanelSwitch
[KeyboardUtil_calculateKeyboardHeight_link]: https://github.com/Jacksgong/JKeyboardPanelSwitch/blob/master/library/src/main/java/cn/dreamtobe/kpswitch/util/KeyboardUtil.java#L196
[KeyboardUtil_calculateKeyboardShowing_link]: https://github.com/Jacksgong/JKeyboardPanelSwitch/blob/master/library/src/main/java/cn/dreamtobe/kpswitch/util/KeyboardUtil.java#L247
[KeyboardUtil_calculateKeyboardHeight_link]: https://github.com/Jacksgong/JKeyboardPanelSwitch/blob/master/library/src/main/java/cn/dreamtobe/kpswitch/util/KeyboardUtil.java#L214
[KeyboardUtil_calculateKeyboardShowing_link]: https://github.com/Jacksgong/JKeyboardPanelSwitch/blob/master/library/src/main/java/cn/dreamtobe/kpswitch/util/KeyboardUtil.java#L266
[KPSwitchRootLayoutHandler_link]: https://github.com/Jacksgong/JKeyboardPanelSwitch/blob/master/library/src/main/java/cn/dreamtobe/kpswitch/handler/KPSwitchRootLayoutHandler.java
[KPSwitchPanelLayoutHandler_link]: https://github.com/Jacksgong/JKeyboardPanelSwitch/blob/master/library/src/main/java/cn/dreamtobe/kpswitch/handler/KPSwitchPanelLayoutHandler.java
[KPSwitchFSPanelLayoutHandler_link]: https://github.com/Jacksgong/JKeyboardPanelSwitch/blob/master/library/src/main/java/cn/dreamtobe/kpswitch/handler/KPSwitchFSPanelLayoutHandler.java
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
VERSION_NAME=1.4.5
VERSION_CODE=12
VERSION_NAME=1.4.6
VERSION_CODE=13
BUILD_TOOLS_VERSION=23.0.1
COMPILE_SDK_VERSION=23

Expand Down

0 comments on commit 9ddf348

Please sign in to comment.