R都是紅色;都報錯?
?TypedArray ta = context.obtainStyledAttributes(attrs,R.styleable.Topbar);
?????? ?
??????? leftTextColor = ta.getColor(R.styleable.Topbar_leftTextColor,0);
??????? leftTextBackground =? ta.getDrawable(R.styleable.Topbar_leftTextBackground);
??????? leftText =? ta.getString(R.styleable.Topbar_leftText);
??????? rightTextColor = ta.getColor(R.styleable.Topbar_rightTextColor, 0);
??????? rightTextBackground =? ta.getDrawable(R.styleable.Topbar_rightTextBackground);
??????? rightText =? ta.getString(R.styleable.Topbar_rightText);
??????? titleText = ta.getString(R.styleable.Topbar_title);
??????? titleTextColor = ta.getColor(R.styleable.Topbar_titleTxtColor, 0);
??????? titleTextSize = ta.getDimension(R.styleable.Topbar_titleTextSize, 0);
為什么所有的R都是紅色;都報錯
2015-04-06
alt enter導入下R
2015-10-04
改一下atts中的屬性名稱再import android.R
2015-10-04
同問!上面的都沒有解決啊
2015-04-20
clean project
2015-04-11
import android.R
2015-03-20
聲明R了么。。。