0
在我的Xamarin Android應用程序中,我的一些活動.xml組件使用layout_weight
屬性。我希望將這些屬性的值存儲到我創建的我的Integers.xml
文件中。@ integer not beeing resolved Xaramin Android layout
<?xml version="1.0" encoding="utf-8"?>
<resources>
<integer name="finish_button_weight">10</integer>
</resources>
呼喚:
Resources.GetInteger(Resource.Integer.finish_button_weight)
收益10預期。
但使用layout_weight="@integer/finish_button_weight"
編譯時會導致未定義的參考... 我該如何解決這個問題?
你的Integers.xml放在哪裏?它在文件夾res /值? –
因爲它是Xamarin,Integers.xml放在那裏: MyApp/Resources/values/Integer.xml – FrenchFalcon