继承XML界面/设置activity/setView
Inherit XML interface / set activity / setView
我想详细了解 phone 应用程序编程。但我想通过 F# 学习它。
在Java中你可以像这样继承一个XML接口:
public class DanishRegisterSite extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.register_denmark_ui);
}
}
关于 F# 这个主题的指南很少。所以我希望这里有人可以告诉我如何像上面那样设置 xml 文档的内容视图,但在 F# 中?
感谢
这将设置基于 F# 的视图 phone android App
namespace setView
// library adding
open System
open Android.App
open Android.Content
open Android.OS
open Android.Runtime
open Android.Views
open Android.Widget
[<Activity (Label = "setView", MainLauncher = true)>]
type MainActivity () =
inherit Activity()
override this.OnCreate (bundle) = base.OnCreate (bundle)
this.SetContentView (Resource_Layout.Hello)
我想详细了解 phone 应用程序编程。但我想通过 F# 学习它。
在Java中你可以像这样继承一个XML接口:
public class DanishRegisterSite extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.register_denmark_ui);
}
}
关于 F# 这个主题的指南很少。所以我希望这里有人可以告诉我如何像上面那样设置 xml 文档的内容视图,但在 F# 中?
感谢
这将设置基于 F# 的视图 phone android App
namespace setView
// library adding
open System
open Android.App
open Android.Content
open Android.OS
open Android.Runtime
open Android.Views
open Android.Widget
[<Activity (Label = "setView", MainLauncher = true)>]
type MainActivity () =
inherit Activity()
override this.OnCreate (bundle) = base.OnCreate (bundle)
this.SetContentView (Resource_Layout.Hello)