Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions tools/check/forbidden_strings_in_resources.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ layout_constraintLeft_
### Use com.google.android.material.switchmaterial.SwitchMaterial instead of Switch, the inflater will not automatically inflate Material Views for Switch.
<Switch

### Use com.google.android.material.appbar.MaterialToolbar instead of Toolbar, the inflater will not automatically inflate Material Views for Toolbar.
<Toolbar
<androidx\.appcompat\.widget\.Toolbar

### Use colorSecondary
colorAccent

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package ${escapeKotlinIdentifiers(packageName)}

import android.content.Context
import android.content.Intent
import androidx.appcompat.widget.Toolbar
import com.google.android.material.appbar.MaterialToolbar
import im.vector.app.R
import im.vector.app.core.extensions.addFragment
import im.vector.app.core.platform.ToolbarConfigurable
Expand Down Expand Up @@ -42,7 +42,7 @@ class ${activityClass} : VectorBaseActivity(), ToolbarConfigurable {
}
}

override fun configure(toolbar: Toolbar) {
override fun configure(toolbar: MaterialToolbar) {
configureToolbar(toolbar)
}

Expand Down
3 changes: 3 additions & 0 deletions vector/lint.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@
<!-- Manifest -->
<issue id="PermissionImpliesUnsupportedChromeOsHardware" severity="error" />

<!-- Performance -->
<issue id="UselessParent" severity="error" />

<!-- Dependencies -->
<issue id="KtxExtensionAvailable" severity="error" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ abstract class DebugMaterialThemeActivity : AppCompatActivity() {
val views = ActivityTestMaterialThemeBinding.inflate(layoutInflater)
setContentView(views.root)

setSupportActionBar(views.debugToolbar)
supportActionBar?.let {
it.setDisplayShowHomeEnabled(true)
it.setDisplayHomeAsUpEnabled(true)
}

views.debugShowSnackbar.setOnClickListener {
Snackbar.make(views.coordinatorLayout, "Snackbar!", Snackbar.LENGTH_SHORT)
.setAction("Action") { }
Expand Down Expand Up @@ -60,7 +66,7 @@ abstract class DebugMaterialThemeActivity : AppCompatActivity() {
}

override fun onCreateOptionsMenu(menu: Menu): Boolean {
menuInflater.inflate(R.menu.home, menu)
menuInflater.inflate(R.menu.menu_debug, menu)
return true
}
}
Loading