android - After updating implementation 'com.android.support:design:28.0.0' this item.setShiftingMode(false); has been removed
问题描述
after updating 28.0.0 i removed item.setShiftingMode(false);
then i added this app:labelVisibilityMode="labeled"
to xml.
But icon showing correct but label is cut off long text showing only half
performance cut off please give me suggestion thank you for your advance.
解决方案
嗨,伙计们,我找到了更改文本大小的解决方案,但它的工作我不确定这是正确的方法。我的问题已经解决的任何方式现在都按照我的示例进行操作。添加您的 style.xml 文件这些行:
<style name="BottomNavigationView">
<item name="itemTextAppearanceActive">@style/TextAppearance.BottomNavigationView.Active</item>
<item name="itemTextAppearanceInactive">@style/TextAppearance.BottomNavigationView.Inactive</item>
</style>
<style name="TextAppearance"/>
<style name="TextAppearance.BottomNavigationView"/>
<style name="TextAppearance.BottomNavigationView.Inactive">
<item name="android:textSize">12sp</item>
</style>
<style name="TextAppearance.BottomNavigationView.Active">
<item name="android:textSize">11sp</item>
</style>
然后将此行添加到您的底部导航视图:
style="@style/BottomNavigationView"
推荐阅读
- linq - 如何比较 IEnumerable
在 Linq 查询中为 null - box2d - Farseer/Box2D:BuoyancyController:将其设为多边形或圆形(矩形除外)?
- scipy - 如何在 MIMO 系统中使用 scipy 信号
- r - 更改列的数字元素的值
- rust - 此错误消息是否意味着我可以在 for 循环中使用模式匹配?
- matlab - Matlab 3dplot函数绘制正弦变化频率和时间的幅度
- python - Matplotlib subplot2grid 无法正常工作
- ldap - 引起:org.springframework.ldap.AuthenticationException:[LDAP:错误代码 49 - 80090308:
- php - Laravel 验证或
- java - 通过套接字将 JTable 数据从服务器发送到客户端 JTable