ObservableInLibrary.java revision fead9ca09b117136b35bc5bf137340a754f9eddd
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.binding.Bindable;
20
21import android.databinding.library.BaseObservable;
22import android.databinding.testlibrary.BR;
23
24public class ObservableInLibrary extends BaseObservable {
25
26    @Bindable
27    private String mLibField1;
28
29    @Bindable
30    private String mLibField2;
31
32    @Bindable
33    private int mSharedField;
34
35    public String getLibField1() {
36        return mLibField1;
37    }
38
39    public void setLibField1(String libField1) {
40        mLibField1 = libField1;
41        notifyPropertyChanged(BR.libField1);
42    }
43
44    public String getLibField2() {
45        return mLibField2;
46    }
47
48    public void setLibField2(String libField2) {
49        mLibField2 = libField2;
50        notifyPropertyChanged(BR.libField2);
51    }
52
53    public int getSharedField() {
54        return mSharedField;
55    }
56
57    public void setSharedField(int sharedField) {
58        mSharedField = sharedField;
59        notifyPropertyChanged(BR.sharedField);
60    }
61}
62