ObservableInLibrary.java revision 99a3d3102887d5b4c9c6713cb35d97b478088931
1/*
2 * Copyright (C) 2015 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.databinding.testlibrary;
18
19import android.databinding.Bindable;
20
21import android.databinding.testlibrary.BR;
22
23import android.databinding.BaseObservable;
24
25public class ObservableInLibrary extends BaseObservable {
26
27    @Bindable
28    private String mLibField1;
29
30    @Bindable
31    private String mLibField2;
32
33    @Bindable
34    private int mSharedField;
35
36    public String getLibField1() {
37        return mLibField1;
38    }
39
40    public void setLibField1(String libField1) {
41        mLibField1 = libField1;
42        notifyPropertyChanged(BR.libField1);
43    }
44
45    public String getLibField2() {
46        return mLibField2;
47    }
48
49    public void setLibField2(String libField2) {
50        mLibField2 = libField2;
51        notifyPropertyChanged(BR.libField2);
52    }
53
54    public int getSharedField() {
55        return mSharedField;
56    }
57
58    public void setSharedField(int sharedField) {
59        mSharedField = sharedField;
60        notifyPropertyChanged(BR.sharedField);
61    }
62}
63