0
我試圖在用戶單擊清除按鈕後在c#中重新啓動當前活動。在c#中重新啓動Android活動
我在網上找到的所有例子都是用java編寫的。什麼是C#的等效以下
Intent intent = getIntent();
finish();
startActivity(intent);
的一如往常,任何幫助是極大的讚賞。
我試圖在用戶單擊清除按鈕後在c#中重新啓動當前活動。在c#中重新啓動Android活動
我在網上找到的所有例子都是用java編寫的。什麼是C#的等效以下
Intent intent = getIntent();
finish();
startActivity(intent);
的一如往常,任何幫助是極大的讚賞。
也許是這樣的:
var intent = new Intent(this, typeof(YourActivityYouWantToRestart));
Finish();
StartActivity(intent);
或者你可以使用:
this.Recreate();
我想我已經回答了這個問題,但我想不會。上面的例子訣竅。