亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

請問關于mvvm在xml怎么拿到其他控件的值?

請問關于mvvm在xml怎么拿到其他控件的值?

楊__羊羊 2019-07-24 21:15:10
mvvm在xml怎么拿到其他控件的值
查看完整描述

3 回答

?
米琪卡哇伊

TA貢獻1998條經驗 獲得超6個贊

int defStyleRes) {
Properties properties = getProperties(context, attrs, defStyleAttr, defStyleRes);
setOrientation(properties.orientation);
....
}

public static Properties getProperties(Context context, AttributeSet attrs,
int defStyleAttr, int defStyleRes) {
Properties properties = new Properties();
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.RecyclerView,
defStyleAttr, defStyleRes);
properties.orientation = a.getInt(R.styleable.RecyclerView_android_orientation, VERTICAL);
properties.spanCount = a.getInt(R.styleable.RecyclerView_spanCount, 1);
properties.reverseLayout = a.getBoolean(R.styleable.RecyclerView_reverseLayout, false);
properties.stackFromEnd = a.getBoolean(R.styleable.RecyclerView_stackFromEnd, false);
a.recycle();
return properties;
}


查看完整回答
反對 回復 2019-07-29
?
慕田峪7331174

TA貢獻1828條經驗 獲得超13個贊

比如你在VM定義一個command,然后在view層使用了這個command,那么這個command的parameter就可以指向view層里的控件啊??丶鳛閜arameter傳進VM層的command里做邏輯處理。

查看完整回答
反對 回復 2019-07-29
  • 3 回答
  • 0 關注
  • 799 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號