第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

求解決為什么為這樣

public class bar extends RelativeLayout {
? ?private Button leftButton,rightButton;
? ?private TextView tvTitle;

? ?private ?int leftTextColor;
? ?private Drawable leftBackground;
? ?private String leftText;

? ?private ?int rightTextColor;
? ?private Drawable rightBackground;
? ?private String rightText;

? ?private ?int titleTextColor;
? ?private float titleTextSize;
? ?private String titleText;



? ?public bar(Context context, AttributeSet attrs) {
? ? ? ?super(context, attrs);
? ? ? ?TypedArray ta= context.obtainStyledAttributes(attrs,R.styleable.Topbar);
? ? ? ?leftTextColor=ta.getColor(R.styleable.Topbar_leftTextColor, 0);
? ? ? ?leftBackground=ta.getDrawable(R.styleable.Topbar_leftBackground);
? ? ? ?leftText=ta.getString(R.styleable.Topbar_leftText);

? ? ? ?rightTextColor=ta.getColor(R.styleable.Topbar_rightTextColor, 0);
? ? ? ?rightBackground=ta.getDrawable(R.styleable.Topbar_rightBackground);
? ? ? ?rightText=ta.getString(R.styleable.Topbar_rightText);

? ? ? ?titleTextColor=ta.getColor(R.styleable.Topbar_titleTextColor, 0);
? ? ? ?titleTextSize=ta.getDimension(R.styleable.Topbar_titileTextSize, 0);
? ? ? ?titleText=ta.getString(R.styleable.Topbar_title);

? ? ? ?ta.recycle();

? ? ? ?leftButton=new Button(context);
? ? ? ?rightButton=new Button(context);
? ? ? ?tvTitle=new TextView(context);

? ? ? ?leftButton.setTextColor(leftTextColor);
? ? ? ?leftButton.setBackground(leftBackground);
? ? ? ?leftButton.setText(leftText);

? ? ? ?rightButton.setTextColor(rightTextColor);
? ? ? ?rightButton.setBackground(rightBackground);
? ? ? ?rightButton.setText(rightText);

? ? ? ?tvTitle.setText(titleText);
? ? ? ?tvTitle.setTextColor(titleTextColor);
? ? ? ?tvTitle.setTextSize(titleTextSize);
? ?}
}


加粗有下劃線的位置 android studio 會(huì)變紅色波浪線 報(bào)錯(cuò)。

http://img1.sycdn.imooc.com//55a37eaa0001ee5b15200655.jpg

錯(cuò)誤代碼提示如下:

http://img1.sycdn.imooc.com//55a37ef0000136ae13830406.jpg

最低版本選的是4.0


正在回答

1 回答

按ALT加ENTER會(huì)有提示的

0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消
Android UI模板設(shè)計(jì)
  • 參與學(xué)習(xí)       76030    人
  • 解答問題       233    個(gè)

快來(lái)學(xué)習(xí)如何在Android中自定義View,本次課程一定會(huì)讓你獲益匪淺

進(jìn)入課程

求解決為什么為這樣

我要回答 關(guān)注問題
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)