[英]Xamarin.Android No style resource found
我在MacOS上將Xamarin用於Android應用程序,我的問題很簡單,但是我沒有在網上找到任何東西,對此我感到非常生氣:我只想將應用程序樣式設置為全屏且沒有標題欄所以我將Manifest.xml
更改如下:
<uses-sdk android:minSdkVersion="23" /> <application android:allowBackup="true" android:icon="@mipmap/icon" android:label="@string/app_name" android:theme="@android:style/Theme.Material.NoTitleBar.FullScreen"></application>
當它嘗試編譯時,出現以下錯誤: No resource found that matches the given name (at 'theme' with value '@android:style/Theme.Material.NoTitleBar.FullScreen')(APT0000)
我嘗試了所有其他全屏主題,並且沒有Xamarin在設計器的下拉菜單中建議的標題欄,但它始終使我遇到資源錯誤
我只想將應用程序樣式設置為全屏且沒有標題欄
您可以在AppTheme
添加它:
<item name="android:windowNoTitle">true</item>
<item name="android:windowFullscreen">true</item>
您的應用程序不需要更改,只需參考它即可:
<application android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
</application>
我在源代碼中找不到style/Theme.Material.NoTitleBar.FullScreen
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.