fixed #939
This commit is contained in:
parent
b919d50965
commit
b017e520ac
|
@ -62,7 +62,7 @@ before_script:
|
|||
- ./travis/scripts/test_private_files.sh
|
||||
|
||||
script:
|
||||
- ./gradlew clean build --stacktrace
|
||||
- ./gradlew clean build --stacktrace --no-daemon
|
||||
|
||||
after_failure:
|
||||
- ./travis/scripts/upload_error_logs.sh
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
org.gradle.daemon=true
|
||||
org.gradle.jvmargs=-Xmx6144m -XX:+HeapDumpOnOutOfMemoryError
|
||||
kotlin.incremental=true
|
|
@ -51,10 +51,7 @@ import android.support.v7.app.AlertDialog
|
|||
import android.support.v7.app.AppCompatDelegate
|
||||
import android.support.v7.widget.TintTypedArray
|
||||
import android.util.SparseIntArray
|
||||
import android.view.Gravity
|
||||
import android.view.KeyEvent
|
||||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
import android.view.*
|
||||
import android.view.View.OnClickListener
|
||||
import android.view.View.OnLongClickListener
|
||||
import android.view.ViewGroup.MarginLayoutParams
|
||||
|
@ -333,6 +330,12 @@ class HomeActivity : BaseActivity(), OnClickListener, OnPageChangeListener, Supp
|
|||
super.onDestroy()
|
||||
}
|
||||
|
||||
override fun onConfigurationChanged(newConfig: Configuration) {
|
||||
super.onConfigurationChanged(newConfig)
|
||||
// Pass any configuration change to the drawer toggle
|
||||
drawerToggle.onConfigurationChanged(newConfig)
|
||||
}
|
||||
|
||||
override fun onAttachFragment(fragment: Fragment?) {
|
||||
super.onAttachFragment(fragment)
|
||||
updateActionsButton()
|
||||
|
@ -390,6 +393,11 @@ class HomeActivity : BaseActivity(), OnClickListener, OnPageChangeListener, Supp
|
|||
return true
|
||||
}
|
||||
|
||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||
super.onCreateOptionsMenu(menu)
|
||||
return false
|
||||
}
|
||||
|
||||
override fun getSystemWindowInsets(caller: Fragment, insets: Rect): Boolean {
|
||||
if (caller === leftDrawerFragment) return super.getSystemWindowInsets(caller, insets)
|
||||
if (mainTabs == null || homeContent == null) return false
|
||||
|
@ -526,9 +534,10 @@ class HomeActivity : BaseActivity(), OnClickListener, OnPageChangeListener, Supp
|
|||
return super.handleKeyboardShortcutRepeat(handler, keyCode, repeatCount, event, metaState)
|
||||
}
|
||||
|
||||
override fun onKeyUp(keyCode: Int, event: KeyEvent): Boolean {
|
||||
when (keyCode) {
|
||||
override fun dispatchKeyEvent(event: KeyEvent): Boolean {
|
||||
when (event.keyCode) {
|
||||
KeyEvent.KEYCODE_MENU -> {
|
||||
if (event.action != KeyEvent.ACTION_UP) return true
|
||||
if (isDrawerOpen) {
|
||||
homeMenu.closeDrawers()
|
||||
} else {
|
||||
|
@ -536,6 +545,12 @@ class HomeActivity : BaseActivity(), OnClickListener, OnPageChangeListener, Supp
|
|||
}
|
||||
return true
|
||||
}
|
||||
}
|
||||
return super.dispatchKeyEvent(event)
|
||||
}
|
||||
|
||||
override fun onKeyUp(keyCode: Int, event: KeyEvent): Boolean {
|
||||
when (keyCode) {
|
||||
KeyEvent.KEYCODE_BACK -> {
|
||||
if (isDrawerOpen) {
|
||||
homeMenu.closeDrawers()
|
||||
|
@ -572,12 +587,6 @@ class HomeActivity : BaseActivity(), OnClickListener, OnPageChangeListener, Supp
|
|||
val tabs: List<SupportTabSpec>
|
||||
get() = pagerAdapter.tabs
|
||||
|
||||
override fun onConfigurationChanged(newConfig: Configuration) {
|
||||
super.onConfigurationChanged(newConfig)
|
||||
// Pass any configuration change to the drawer toggle
|
||||
drawerToggle.onConfigurationChanged(newConfig)
|
||||
}
|
||||
|
||||
override var controlBarOffset: Float
|
||||
get() {
|
||||
if (mainTabs.columns > 1) {
|
||||
|
|
Loading…
Reference in New Issue