Home | History | Annotate | Download | only in cts
      1 /*
      2  * Copyright (C) 2016 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 
     17 package android.widget.cts;
     18 
     19 import android.content.Context;
     20 import android.content.Intent;
     21 import android.os.Bundle;
     22 import android.util.AttributeSet;
     23 import android.widget.RemoteViews;
     24 import android.widget.TextView;
     25 
     26 @RemoteViews.RemoteView
     27 public class MyRemotableView extends TextView {
     28     private byte mByteField;
     29     private char mCharField;
     30     private double mDoubleField;
     31     private short mShortField;
     32     private Bundle mBundleField;
     33     private Intent mIntentField;
     34 
     35     public MyRemotableView(Context context) {
     36         super(context);
     37     }
     38 
     39     public MyRemotableView(Context context, AttributeSet attrs) {
     40         super(context, attrs);
     41     }
     42 
     43     public MyRemotableView(Context context, AttributeSet attrs, int defStyle) {
     44         super(context, attrs, defStyle);
     45     }
     46 
     47     @android.view.RemotableViewMethod
     48     public void setByteField(byte value) {
     49         mByteField = value;
     50     }
     51 
     52     public byte getByteField() {
     53         return mByteField;
     54     }
     55 
     56     @android.view.RemotableViewMethod
     57     public void setCharField(char value) {
     58         mCharField = value;
     59     }
     60 
     61     public char getCharField() {
     62         return mCharField;
     63     }
     64 
     65     @android.view.RemotableViewMethod
     66     public void setDoubleField(double value) {
     67         mDoubleField = value;
     68     }
     69 
     70     public double getDoubleField() {
     71         return mDoubleField;
     72     }
     73 
     74     @android.view.RemotableViewMethod
     75     public void setShortField(short value) {
     76         mShortField = value;
     77     }
     78 
     79     public short getShortField() {
     80         return mShortField;
     81     }
     82 
     83     @android.view.RemotableViewMethod
     84     public void setBundleField(Bundle value) {
     85         mBundleField = value;
     86     }
     87 
     88     public Bundle getBundleField() {
     89         return mBundleField;
     90     }
     91 
     92     @android.view.RemotableViewMethod
     93     public void setIntentField(Intent value) {
     94         mIntentField = value;
     95     }
     96 
     97     public Intent getIntentField() {
     98         return mIntentField;
     99     }
    100 }
    101