作者热门文章
- html - 我的下拉菜单的内容关闭得太快
- c# - 使用 Html Agility Pack 从网页中的表中获取值而不使用 "SelectNode'
- html - 内容容器下的 CSS 下拉菜单
- html - 如何停止嵌套列表重叠父列表?
我正在使用 Material 组件,但不幸的是,我不能使用 MaterialTextView。我不知道我错过了什么。
在我的 build.gradle
文件:
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'com.google.android.material:material:1.0.0'
<style name="AppTheme" parent="Theme.MaterialComponents.Light.DarkActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.MaterialComponents.Dark.ActionBar" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.MaterialComponents.Light" />
<MaterialTextView android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Some text"
android:textStyle="bold" />
didn't find class android.view.MaterialTextView.
com.google.android.material
来指定但在自动完成结果 TextView 中没有出现。
最佳答案
MaterialTextView
仍处于 alpha 状态,在 1.0.0
中不可用.要使用它,你应该
升级到最新的 Material 依赖 :
implementation 'com.google.android.material:material:1.1.0-alpha09'
关于android - 无法使用 MaterialTextView,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57690848/
我正在使用 Material 组件,但不幸的是,我不能使用 MaterialTextView。我不知道我错过了什么。 在我的 build.gradle文件: implementation 'andro
我在RelativeLayout内设置了MaterialTextView,并以编程方式为每个设备设置了不同的RelativeLayout大小。< 然后我使用 ViewTreeObserver 在 Ma
我是一名优秀的程序员,十分优秀!