2016-03-02 69 views

回答

1

這是因爲在一個片段中的onCreateOptionsMenu函數需要MenuInflator類型的第二參數。

此功能是按照this article執行此操作的正確方法。

@Override 
public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) { 
    menuInflater.inflate(R.menu.forecastFragment, menu); 
} 
相關問題