expand the status bar on down fling gesture
This commit is contained in:
parent
04f6e14b3f
commit
85d255d434
|
@ -9,6 +9,7 @@
|
||||||
tools:ignore="QueryAllPackagesPermission" />
|
tools:ignore="QueryAllPackagesPermission" />
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.REQUEST_DELETE_PACKAGES" />
|
<uses-permission android:name="android.permission.REQUEST_DELETE_PACKAGES" />
|
||||||
|
<uses-permission android:name="android.permission.EXPAND_STATUS_BAR" />
|
||||||
|
|
||||||
<uses-permission
|
<uses-permission
|
||||||
android:name="android.permission.USE_FINGERPRINT"
|
android:name="android.permission.USE_FINGERPRINT"
|
||||||
|
|
|
@ -324,7 +324,14 @@ class MainActivity : SimpleActivity(), FlingListener {
|
||||||
|
|
||||||
override fun onFlingDown() {
|
override fun onFlingDown() {
|
||||||
mIgnoreUpEvent = true
|
mIgnoreUpEvent = true
|
||||||
hideFragment(all_apps_fragment)
|
if (all_apps_fragment.y != mScreenHeight.toFloat()) {
|
||||||
|
hideFragment(all_apps_fragment)
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
Class.forName("android.app.StatusBarManager").getMethod("expandNotificationsPanel").invoke(getSystemService("statusbar"))
|
||||||
|
} catch (e: Exception) {
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("WrongConstant")
|
@SuppressLint("WrongConstant")
|
||||||
|
|
Loading…
Reference in New Issue