1
我正在使用適用於Android的MonoDevelop,並且希望能夠幫助您創建自定義的吐司。適用於Android的自定義吐司
這裏是我的代碼:
static public void DisplayCustomToast (Context displayContext, string stringText, int offsetX, int offsetY)
{
Toast toast = new Toast(displayContext);
toast.SetText(stringText);
toast.SetGravity (GravityFlags.Top, offsetX, offsetY);
//toast.Show;
}
此代碼不能正常工作。它建立成功,但應用程序無法正常啓動。
如果我取消了「toast.show」,出現以下錯誤:
Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement.
我可以請在收到此代碼工作的一些幫助?
由於