package com.jackli.mvvm.model;
import android.databinding.BaseObservable;
import android.databinding.Bindable;
import android.util.Log;
import com.jackli.mvvm.BR;
/**
* Created by liguoqing on 2017/4/28.
*/
public class User extends BaseObservable {
private String realName;
private String userName;
private String mobile;
private int age;
/**
* 注意: 在BR里对应的常量为follow
*/
private boolean isFollow;
public User(String realName, String mobile) {
this.realName = realName;
this.mobile = mobile;
Log.d("User", "user construct invoked");
}
@Bindable
public boolean isFollow() {
return isFollow;
}
public void setIsFollow(boolean isFollow) {
this.isFollow = isFollow;
notifyPropertyChanged(BR.follow);
}
public User( ) {
}
@Bindable
public String getRealName() {
return realName;
}
public void setRealName(String realName) {
this.realName = realName;
}
@Bindable
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
notifyPropertyChanged(BR.mobile);
}
@Bindable
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
notifyPropertyChanged(BR.userName);
}
@Bindable
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
notifyPropertyChanged(BR.age);
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
MVVM.zip (76个子文件)
MVVM
gradlew 5KB
settings.gradle 15B
.DS_Store 6KB
.idea
libraries
junit_4_12.xml 467B
antlr4_annotations_4_5.xml 303B
ST4_4_0_8.xml 253B
guava_17_0.xml 399B
rxjava_1_0_14.xml 496B
antlr4_4_5.xml 267B
compilerCommon_2_0_0.xml 300B
hamcrest_core_1_3.xml 516B
support_vector_drawable_23_4_0.xml 646B
commons_io_2_4.xml 407B
compiler_2_0_0.xml 282B
kotlin_stdlib_1_0_0.xml 294B
baseLibrary_2_0_0.xml 291B
kotlin_runtime_1_0_0.xml 297B
commons_codec_1_10.xml 284B
support_v4_23_4_0.xml 905B
juniversalchardet_1_0_3.xml 318B
org_abego_treelayout_core_1_0_1.xml 330B
library_1_0_rc5.xml 583B
adapters_1_0_rc5.xml 588B
antlr4_runtime_4_5.xml 291B
appcompat_v7_23_4_0.xml 764B
antlr_runtime_3_5_2.xml 283B
animated_vector_drawable_23_4_0.xml 651B
rxbinding_0_2_0.xml 617B
support_annotations_23_4_0.xml 519B
runConfigurations.xml 564B
misc.xml 3KB
compiler.xml 709B
workspace.xml 149KB
gradle.xml 816B
.name 4B
encodings.xml 159B
modules.xml 345B
copyright
profiles_settings.xml 74B
MVVM.iml 935B
gradle
.DS_Store 6KB
wrapper
gradle-wrapper.properties 231B
gradle-wrapper.jar 52KB
.gradle
2.10
taskArtifacts
cache.properties.lock 17B
fileHashes.bin 159KB
outputFileStates.bin 20KB
taskArtifacts.bin 96KB
fileSnapshots.bin 3.57MB
cache.properties 30B
local.properties 438B
gradlew.bat 2KB
gradle.properties 855B
.gitignore 97B
app
.DS_Store 6KB
src
androidTest
java
com
jackli
mvvm
ApplicationTest.java 346B
test
java
com
jackli
mvvm
ExampleUnitTest.java 308B
main
AndroidManifest.xml 718B
res
mipmap-hdpi
ic_launcher.png 3KB
mipmap-xxxhdpi
ic_launcher.png 10KB
mipmap-xhdpi
ic_launcher.png 5KB
mipmap-mdpi
ic_launcher.png 2KB
drawable
layout
activity_data.xml 1KB
activity_main.xml 545B
values-w820dp
dimens.xml 358B
values
colors.xml 208B
strings.xml 67B
styles.xml 383B
dimens.xml 211B
mipmap-xxhdpi
ic_launcher.png 8KB
java
com
jackli
mvvm
ui
MainActivity.java 727B
JumpActivity.java 539B
model
User.java 2KB
libs
app.iml 11KB
.gitignore 7B
build.gradle 815B
proguard-rules.pro 667B
build.gradle 498B
共 76 条
- 1
资源评论
恋恋西风
- 粉丝: 8634
- 资源: 122
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功