diff --git a/tools/check/forbidden_strings_in_resources.txt b/tools/check/forbidden_strings_in_resources.txt index 92eec6cdfd..4ebc4008c1 100644 --- a/tools/check/forbidden_strings_in_resources.txt +++ b/tools/check/forbidden_strings_in_resources.txt @@ -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. - + app:layout_constraintTop_toTopOf="parent"> + + + + + app:layout_constraintTop_toBottomOf="@+id/appBarLayout"> : AppCompatActivity(), HasScr /** * Configure the Toolbar, with default back button. */ - protected fun configureToolbar(toolbar: Toolbar, displayBack: Boolean = true) { + protected fun configureToolbar(toolbar: MaterialToolbar, displayBack: Boolean = true) { setSupportActionBar(toolbar) supportActionBar?.let { it.setDisplayShowHomeEnabled(displayBack) diff --git a/vector/src/main/java/im/vector/app/core/platform/VectorBaseFragment.kt b/vector/src/main/java/im/vector/app/core/platform/VectorBaseFragment.kt index b5b6937aad..c513007c3d 100644 --- a/vector/src/main/java/im/vector/app/core/platform/VectorBaseFragment.kt +++ b/vector/src/main/java/im/vector/app/core/platform/VectorBaseFragment.kt @@ -29,7 +29,7 @@ import android.view.View import android.view.ViewGroup import androidx.annotation.CallSuper import androidx.annotation.MainThread -import androidx.appcompat.widget.Toolbar +import com.google.android.material.appbar.MaterialToolbar import androidx.lifecycle.ViewModelProvider import androidx.viewbinding.ViewBinding import com.airbnb.mvrx.BaseMvRxFragment @@ -224,7 +224,7 @@ abstract class VectorBaseFragment : BaseMvRxFragment(), HasScre /** * Configure the Toolbar. */ - protected fun setupToolbar(toolbar: Toolbar) { + protected fun setupToolbar(toolbar: MaterialToolbar) { val parentActivity = vectorBaseActivity if (parentActivity is ToolbarConfigurable) { parentActivity.configure(toolbar) diff --git a/vector/src/main/java/im/vector/app/features/attachments/preview/AttachmentsPreviewActivity.kt b/vector/src/main/java/im/vector/app/features/attachments/preview/AttachmentsPreviewActivity.kt index f282cc3358..6c25f688bd 100644 --- a/vector/src/main/java/im/vector/app/features/attachments/preview/AttachmentsPreviewActivity.kt +++ b/vector/src/main/java/im/vector/app/features/attachments/preview/AttachmentsPreviewActivity.kt @@ -19,7 +19,7 @@ package im.vector.app.features.attachments.preview 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 @@ -72,7 +72,7 @@ class AttachmentsPreviewActivity : VectorBaseActivity(), finish() } - override fun configure(toolbar: Toolbar) { + override fun configure(toolbar: MaterialToolbar) { configureToolbar(toolbar) } } diff --git a/vector/src/main/java/im/vector/app/features/home/HomeActivity.kt b/vector/src/main/java/im/vector/app/features/home/HomeActivity.kt index 64c87d00e9..4a563b563a 100644 --- a/vector/src/main/java/im/vector/app/features/home/HomeActivity.kt +++ b/vector/src/main/java/im/vector/app/features/home/HomeActivity.kt @@ -24,7 +24,7 @@ import android.os.Bundle import android.os.Parcelable import android.view.Menu import android.view.MenuItem -import androidx.appcompat.widget.Toolbar +import com.google.android.material.appbar.MaterialToolbar import androidx.core.view.GravityCompat import androidx.core.view.isVisible import androidx.drawerlayout.widget.DrawerLayout @@ -437,7 +437,7 @@ class HomeActivity : serverBackupStatusViewModel.refreshRemoteStateIfNeeded() } - override fun configure(toolbar: Toolbar) { + override fun configure(toolbar: MaterialToolbar) { configureToolbar(toolbar, false) } diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailActivity.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailActivity.kt index 640e9a62ff..ce3346f8a6 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailActivity.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailActivity.kt @@ -20,7 +20,7 @@ import android.content.Context import android.content.Intent import android.os.Bundle import android.widget.Toast -import androidx.appcompat.widget.Toolbar +import com.google.android.material.appbar.MaterialToolbar import androidx.core.view.GravityCompat import androidx.drawerlayout.widget.DrawerLayout import com.airbnb.mvrx.viewModel @@ -132,7 +132,7 @@ class RoomDetailActivity : super.onDestroy() } - override fun configure(toolbar: Toolbar) { + override fun configure(toolbar: MaterialToolbar) { configureToolbar(toolbar) } diff --git a/vector/src/main/java/im/vector/app/features/login/LoginActivity.kt b/vector/src/main/java/im/vector/app/features/login/LoginActivity.kt index ae099dba3f..07dfc62602 100644 --- a/vector/src/main/java/im/vector/app/features/login/LoginActivity.kt +++ b/vector/src/main/java/im/vector/app/features/login/LoginActivity.kt @@ -21,7 +21,7 @@ import android.content.Intent import android.view.View import android.view.ViewGroup import androidx.annotation.CallSuper -import androidx.appcompat.widget.Toolbar +import com.google.android.material.appbar.MaterialToolbar import androidx.core.view.ViewCompat import androidx.core.view.children import androidx.core.view.isVisible @@ -356,7 +356,7 @@ open class LoginActivity : VectorBaseActivity(), ToolbarCo } } - override fun configure(toolbar: Toolbar) { + override fun configure(toolbar: MaterialToolbar) { configureToolbar(toolbar) } diff --git a/vector/src/main/java/im/vector/app/features/login2/LoginActivity2.kt b/vector/src/main/java/im/vector/app/features/login2/LoginActivity2.kt index 9adf4bd6c2..60eb1934d0 100644 --- a/vector/src/main/java/im/vector/app/features/login2/LoginActivity2.kt +++ b/vector/src/main/java/im/vector/app/features/login2/LoginActivity2.kt @@ -21,7 +21,7 @@ import android.content.Intent import android.view.View import android.view.ViewGroup import androidx.annotation.CallSuper -import androidx.appcompat.widget.Toolbar +import com.google.android.material.appbar.MaterialToolbar import androidx.core.view.ViewCompat import androidx.core.view.children import androidx.core.view.isVisible @@ -388,7 +388,7 @@ open class LoginActivity2 : VectorBaseActivity(), ToolbarC } } - override fun configure(toolbar: Toolbar) { + override fun configure(toolbar: MaterialToolbar) { configureToolbar(toolbar) } diff --git a/vector/src/main/java/im/vector/app/features/pin/PinActivity.kt b/vector/src/main/java/im/vector/app/features/pin/PinActivity.kt index 66ebfa929d..6866afa0a6 100644 --- a/vector/src/main/java/im/vector/app/features/pin/PinActivity.kt +++ b/vector/src/main/java/im/vector/app/features/pin/PinActivity.kt @@ -18,7 +18,7 @@ package im.vector.app.features.pin import android.content.Context import android.content.Intent -import androidx.appcompat.widget.Toolbar +import com.google.android.material.appbar.MaterialToolbar import com.airbnb.mvrx.MvRx import im.vector.app.R import im.vector.app.core.extensions.addFragment @@ -47,7 +47,7 @@ class PinActivity : VectorBaseActivity(), ToolbarConfigur } } - override fun configure(toolbar: Toolbar) { + override fun configure(toolbar: MaterialToolbar) { configureToolbar(toolbar) } } diff --git a/vector/src/main/java/im/vector/app/features/reactions/EmojiReactionPickerActivity.kt b/vector/src/main/java/im/vector/app/features/reactions/EmojiReactionPickerActivity.kt index b2f1c3c15a..ecfaf93747 100644 --- a/vector/src/main/java/im/vector/app/features/reactions/EmojiReactionPickerActivity.kt +++ b/vector/src/main/java/im/vector/app/features/reactions/EmojiReactionPickerActivity.kt @@ -24,7 +24,6 @@ import android.view.Menu import android.view.MenuInflater import android.view.MenuItem import android.widget.SearchView -import androidx.appcompat.widget.Toolbar import androidx.core.view.isVisible import com.airbnb.mvrx.viewModel import com.google.android.material.tabs.TabLayout @@ -150,13 +149,13 @@ class EmojiReactionPickerActivity : VectorBaseActivity