【问题标题】:Xamarin Forms - Add Activity Indicator in the toolbar (Right Side)Xamarin Forms - 在工具栏中添加活动指示器(右侧)
【发布时间】:2016-12-26 15:04:29
【问题描述】:

如何在我的 Xamarin Forms 应用工具栏中设置活动指示器?

我设置 IsBusy=true;在我的页面及其 onAppearing() 函数中,但没有任何反应。

public TestPage()
    {
        InitializeComponent();

        /*ToolbarItem x = new ToolbarItem();
        x.Name = "Save";
        x.Order = ToolbarItemOrder.Primary;
        this.ToolbarItems.Add(x);*/

        IsBusy = true;
    }

protected override async void OnAppearing()
    {
        base.OnAppearing();

        IsBusy = true;

    }

我在右侧有一个工具栏项,但我希望在加载某些内容时将其替换为活动指示器。

我在没有工具栏项的情况下尝试了 isBusy = true 但也没有任何反应...

知道如何实现吗?

【问题讨论】:

    标签: android xamarin.forms


    【解决方案1】:

    对于 android 版本 4.x (Jellybean & kitkat) 将在工具栏右侧显示活动指示器。之后,从棒棒糖开始,即 android 版本 5.x,它将不会显示。

    【讨论】:

      猜你喜欢
      • 2018-04-22
      • 2019-02-04
      • 1970-01-01
      • 2017-03-29
      • 1970-01-01
      • 2019-02-10
      • 1970-01-01
      • 2011-12-10
      • 1970-01-01
      相关资源
      最近更新 更多