android - Xamarin.forms : how to add a gradient color for tabbar

标签 android ios xamarin.forms uitabbar

在 xamarin forms 应用程序中,我们有一个标签栏,我们需要在 iOS 和 Android 设备中为该标签栏添加一些渐变颜色。我们怎么能这样? enter image description here

最佳答案

  1. 由您的设计师制作具有渐变色的图像;
  2. 将其应用到标签栏,例如:

    UITabBar.Appearance.BackgroundImage = image;

Official documents: https://developer.xamarin.com/api/type/UIKit.UITabBar+UITabBarAppearance/

关于android - Xamarin.forms : how to add a gradient color for tabbar,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48092841/

相关文章:

android - 在XML中或在Android中以编程方式设置位图更好?

android - 如何检测应用程序的关闭并采取措施? ( Kotlin )

ios - 测试 UIView 是否在动画中间

xamarin - Xamarin表单MVVM验证带有繁忙指示符的表单

c# - Xamarin.Forms 的分辨率相关的 FontSize

android - 当向其中添加项目时,另一个 ListView 中的 ListView 不会扩展

java - 如何为扩展 ArrayAdapter<HashMap<String, String>> 的 Activity 扩展 AppCompatActivity?

ios - NSLocalizedString 总是返回大写的文本

ios - Watchkit 新 session 不起作用

xamarin - 如何将 Xamarin Forms new shell 与 Prism 集成?