-
Notifications
You must be signed in to change notification settings - Fork 432
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3cbf87f
commit c2c5857
Showing
10 changed files
with
99 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
easyfloat/src/main/java/com/lzf/easyfloat/interfaces/OnDisplayHeight.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.lzf.easyfloat.interfaces; | ||
|
||
import android.content.Context; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
|
||
/** | ||
* @author: liuzhenfeng | ||
* @function: 通过接口获取屏幕的有效显示高度 | ||
* @date: 2020-02-16 16:21 | ||
*/ | ||
public interface OnDisplayHeight { | ||
|
||
/** | ||
* 获取屏幕有效的显示高度,不包含虚拟导航栏 | ||
* | ||
* @param context ApplicationContext | ||
* @return 高度值(int类型) | ||
*/ | ||
int getDisplayRealHeight(@NotNull Context context); | ||
} |
15 changes: 15 additions & 0 deletions
15
easyfloat/src/main/java/com/lzf/easyfloat/utils/DefaultDisplayHeight.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.lzf.easyfloat.utils | ||
|
||
import android.content.Context | ||
import com.lzf.easyfloat.interfaces.OnDisplayHeight | ||
|
||
/** | ||
* @author: liuzhenfeng | ||
* @function: 获取屏幕有效高度的实现类 | ||
* @date: 2020-02-16 16:26 | ||
*/ | ||
internal class DefaultDisplayHeight : OnDisplayHeight { | ||
|
||
override fun getDisplayRealHeight(context: Context) = DisplayUtils.rejectedNavHeight(context) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters