Backwards support back to API 21

Things still crash pre-21
This commit is contained in:
topjohnwu 2020-01-05 16:05:22 +08:00
parent b38e940088
commit e04f943980
13 changed files with 24 additions and 24 deletions

View File

@ -130,7 +130,7 @@ dependencies {
implementation 'androidx.work:work-runtime:2.2.0'
implementation 'androidx.transition:transition:1.3.0-rc02'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.core:core-ktx:1.1.0'
implementation 'androidx.core:core-ktx:1.2.0-rc01'
// DO NOT UPDATE, 1.2.x has bunch of things broken in functionality against 1.1.x
implementation 'com.google.android.material:material:1.1.0-beta02'
}

View File

@ -1,11 +1,11 @@
package com.topjohnwu.magisk.redesign
import android.graphics.Insets
import android.os.Bundle
import android.view.MenuItem
import android.view.View
import android.view.ViewTreeObserver
import androidx.coordinatorlayout.widget.CoordinatorLayout
import androidx.core.graphics.Insets
import androidx.core.view.setPadding
import androidx.core.view.updateLayoutParams
import androidx.fragment.app.Fragment

View File

@ -1,7 +1,7 @@
package com.topjohnwu.magisk.redesign.compat
import android.graphics.Insets
import android.view.View
import androidx.core.graphics.Insets
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import androidx.fragment.app.Fragment

View File

@ -1,7 +1,7 @@
package com.topjohnwu.magisk.redesign.compat
import android.graphics.Insets
import android.view.View
import androidx.core.graphics.Insets
internal interface CompatView<ViewModel : CompatViewModel> {

View File

@ -1,7 +1,7 @@
package com.topjohnwu.magisk.redesign.compat
import android.graphics.Insets
import androidx.annotation.CallSuper
import androidx.core.graphics.Insets
import androidx.databinding.Observable
import com.topjohnwu.magisk.base.viewmodel.BaseViewModel
import com.topjohnwu.magisk.utils.KObservableField

View File

@ -1,12 +1,12 @@
package com.topjohnwu.magisk.redesign.hide
import android.content.Context
import android.graphics.Insets
import android.os.Bundle
import android.view.Menu
import android.view.MenuInflater
import android.view.MenuItem
import android.view.View
import androidx.core.graphics.Insets
import androidx.core.view.isVisible
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView

View File

@ -1,9 +1,9 @@
package com.topjohnwu.magisk.redesign.home
import android.graphics.Insets
import android.view.Menu
import android.view.MenuInflater
import android.view.MenuItem
import androidx.core.graphics.Insets
import com.topjohnwu.magisk.R
import com.topjohnwu.magisk.databinding.FragmentHomeMd2Binding
import com.topjohnwu.magisk.model.navigation.Navigation

View File

@ -1,7 +1,7 @@
package com.topjohnwu.magisk.redesign.install
import android.content.Intent
import android.graphics.Insets
import androidx.core.graphics.Insets
import com.topjohnwu.magisk.R
import com.topjohnwu.magisk.databinding.FragmentInstallMd2Binding
import com.topjohnwu.magisk.model.events.RequestFileEvent

View File

@ -1,11 +1,11 @@
package com.topjohnwu.magisk.redesign.log
import android.graphics.Insets
import android.os.Bundle
import android.view.Menu
import android.view.MenuInflater
import android.view.MenuItem
import android.view.View
import androidx.core.graphics.Insets
import androidx.core.view.isVisible
import com.topjohnwu.magisk.R
import com.topjohnwu.magisk.databinding.FragmentLogMd2Binding

View File

@ -1,12 +1,12 @@
package com.topjohnwu.magisk.redesign.module
import android.content.Intent
import android.graphics.Insets
import android.os.Bundle
import android.view.Menu
import android.view.MenuInflater
import android.view.MenuItem
import android.view.View
import androidx.core.graphics.Insets
import androidx.core.view.isVisible
import androidx.recyclerview.widget.RecyclerView
import androidx.recyclerview.widget.StaggeredGridLayoutManager

View File

@ -1,8 +1,8 @@
package com.topjohnwu.magisk.redesign.settings
import android.graphics.Insets
import android.os.Bundle
import android.view.View
import androidx.core.graphics.Insets
import com.topjohnwu.magisk.R
import com.topjohnwu.magisk.databinding.FragmentSettingsMd2Binding
import com.topjohnwu.magisk.redesign.compat.CompatFragment

View File

@ -1,11 +1,11 @@
package com.topjohnwu.magisk.redesign.superuser
import android.graphics.Insets
import android.os.Bundle
import android.view.Menu
import android.view.MenuInflater
import android.view.MenuItem
import android.view.View
import androidx.core.graphics.Insets
import com.topjohnwu.magisk.R
import com.topjohnwu.magisk.databinding.FragmentSuperuserMd2Binding
import com.topjohnwu.magisk.model.navigation.Navigation

View File

@ -1,6 +1,6 @@
package com.topjohnwu.magisk.redesign.theme
import android.graphics.Insets
import androidx.core.graphics.Insets
import com.topjohnwu.magisk.R
import com.topjohnwu.magisk.databinding.FragmentThemeMd2Binding
import com.topjohnwu.magisk.redesign.compat.CompatFragment