Migrate to non-transitive R
This commit is contained in:
@@ -13,6 +13,7 @@ android.databinding.incremental=true
|
||||
android.enableJetifier=true
|
||||
android.enableR8.fullMode=true
|
||||
android.enableResourceOptimizations=false
|
||||
android.nonTransitiveRClass=true
|
||||
android.useAndroidX=true
|
||||
kapt.incremental.apt=true
|
||||
org.gradle.jvmargs=-Xmx1536m
|
||||
|
||||
@@ -40,13 +40,15 @@ class MainActivity : AppCompatActivity(), NavigationBarView.OnItemSelectedListen
|
||||
binding.navigation.setOnItemSelectedListener(this)
|
||||
val badge = binding.navigation.getOrCreateBadge(R.id.navigation_clients).apply {
|
||||
backgroundColor = ContextCompat.getColor(this@MainActivity, R.color.colorSecondary)
|
||||
badgeTextColor = ContextCompat.getColor(this@MainActivity, R.color.primary_text_default_material_light)
|
||||
badgeTextColor = ContextCompat.getColor(this@MainActivity,
|
||||
androidx.appcompat.R.color.primary_text_default_material_light)
|
||||
}
|
||||
updateItem = binding.navigation.menu.findItem(R.id.navigation_update)
|
||||
updateItem.isCheckable = false
|
||||
updateBadge = binding.navigation.getOrCreateBadge(R.id.navigation_update).apply {
|
||||
backgroundColor = ContextCompat.getColor(this@MainActivity, R.color.colorSecondary)
|
||||
badgeTextColor = ContextCompat.getColor(this@MainActivity, R.color.primary_text_default_material_light)
|
||||
badgeTextColor = ContextCompat.getColor(this@MainActivity,
|
||||
androidx.appcompat.R.color.primary_text_default_material_light)
|
||||
}
|
||||
if (savedInstanceState == null) displayFragment(TetheringFragment())
|
||||
val model by viewModels<ClientViewModel>()
|
||||
|
||||
@@ -121,7 +121,7 @@ class SettingsPreferenceFragment : PreferenceFragmentCompat() {
|
||||
.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
|
||||
.putExtra(Intent.EXTRA_STREAM,
|
||||
FileProvider.getUriForFile(context, "be.mygod.vpnhotspot.log", logFile)),
|
||||
context.getString(R.string.abc_shareactionprovider_share_with)))
|
||||
context.getString(androidx.appcompat.R.string.abc_shareactionprovider_share_with)))
|
||||
}
|
||||
true
|
||||
}
|
||||
|
||||
@@ -5,14 +5,15 @@ import android.graphics.Rect
|
||||
import android.util.AttributeSet
|
||||
import android.view.View
|
||||
import androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||
import be.mygod.vpnhotspot.R
|
||||
|
||||
/**
|
||||
* Based on: https://gist.github.com/furycomptuers/4961368
|
||||
*/
|
||||
class AlwaysAutoCompleteEditText @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = R.attr.autoCompleteTextViewStyle) :
|
||||
AppCompatAutoCompleteTextView(context, attrs, defStyleAttr) {
|
||||
class AlwaysAutoCompleteEditText @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = androidx.appcompat.R.attr.autoCompleteTextViewStyle,
|
||||
) : AppCompatAutoCompleteTextView(context, attrs, defStyleAttr) {
|
||||
override fun enoughToFilter() = true
|
||||
|
||||
override fun onFocusChanged(focused: Boolean, direction: Int, previouslyFocusedRect: Rect?) {
|
||||
|
||||
Reference in New Issue
Block a user