老師你好。
TypedArray a = context.getTheme().obtainStyledAttributes(attrs,
R.styleable.SlidingMenu, defStyle, 0);
獲取自定義屬性的時(shí)候。
R.styleable.SlidingMenu這里styleable標(biāo)記錯(cuò)誤。不知道什么原因。求解釋下~
xml文件:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<attr name="rightPadding" format="dimension">
</attr>
<declare-styleable name="SlidingMenu">
<attr name="rightPadding"></attr>
</declare-styleable>
</resources>
2014-10-26
解決了。~
import android.R;刪除
import com.imooc.slidingmenu.R;
要重新導(dǎo)入一下R包。
2015-09-29
android:background="@drawable/img_frame_background"加到朱布局里面即可
2014-12-13
碰到同樣問題... 謝謝
2014-11-03
謝謝 剛好困擾了?
2014-10-31
我也是有這個(gè)問題,找了好久,謝謝!
2014-10-26
<?xml version="1.0" encoding="utf-8"?>
<resources>
? ? <attr name="rightPadding" format="dimension">
? ? ? ??
? ? </attr>
? ??
? ? <declare-styleable name="SlidingMenu">
? ? ? ? ?<attr name="rightPadding"></attr>
? ? </declare-styleable>
</resources>