1
在我可以在Internet上進行的所有研究中,似乎訪問位於/ res/drawable文件夾中的資源(在我的情況下爲.xml佈局文件)以回報繪製對象是因調用該行簡單:訪問Ruboto中的/ res/drawable文件夾
Ruboto::R::drawable::stroke_bg
然而,當我嘗試了,我收到以下錯誤:
could not coerce Fixnum to class android.graphics.drawable.Drawable
對我的看法行是:
scroll_view :background => Ruboto::R::drawable::stroke_bg, :layout => { :width => :match_parent, height: 1000 }
這是什麼,我想丟失該資源的文件夾?
謝謝,@donV!這更有意義。完美工作 –