【问题标题】:How to use MonoTouch.Dialog's ActivityElement?如何使用 MonoTouch.Dialog 的 ActivityElement?
【发布时间】:2012-08-09 20:08:19
【问题描述】:

我可能在这里遗漏了一些东西,但是这段代码:

this.oSectionDRs = new Section()
{
    new ActivityElement()
    {
        Caption = Locale.GetLocale("Settings_Loading"), 
        Animating = true
    }
};

// To begin with just show a loading indicator.
this.Root = new RootElement (Locale.GetLocale("Settings_Select"))
{
    this.oSectionDRs
};

不显示任何动画的东西。它只显示标签。如何获得动画明星?

【问题讨论】:

    标签: c# xamarin.ios monotouch.dialog


    【解决方案1】:

    使用此代码:

    var root = new RootElement("foo");
          root.Add (new Section("foo", "bar") {
          new ActivityElement()
          {
            Caption = "foo",
            Animating = true
          }
        });
    
        var dvc = new DialogViewController(root, false);
    
    
        window.RootViewController = dvc;
    

    我得到了标题和活动滚动条的东西。不确定它对你有帮助!我只是在使用内置的 MT.D。

    【讨论】:

    • 问题是 ActivityElement 从未被调整为与弹出框一起使用。它使用 UIScreen.MainScreen.Bounds 来计算它的位置。这就是为什么如果它是根控制器它对你有用。我有一个解决问题的固定版本示例:github.com/Krumelur/ReviewSelection/blob/master/ReviewSelection/…
    • 啊,是的。您需要将其更改为现在使用 Bounds - MT.D 中有一些位假定全屏并在 iPad 上失败。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多