Home | History | Annotate | Download | only in testingcamera2
      1 /*
      2  * Copyright (C) 2014 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 com.android.testingcamera2;
     18 
     19 import android.util.AttributeSet;
     20 
     21 import org.xmlpull.v1.XmlPullParser;
     22 import org.xmlpull.v1.XmlPullParserException;
     23 
     24 import java.io.IOException;
     25 
     26 public class UtilControlPane extends ControlPane {
     27     // XML attributes
     28 
     29     /** Name of pane tag */
     30     private static final String PANE_NAME = "util_pane";
     31 
     32     // End XML attributes
     33 
     34     public UtilControlPane(TestingCamera21 tc, AttributeSet attrs, StatusListener listener) {
     35         super(tc, attrs, listener, tc.getPaneTracker());
     36 
     37         this.setName(tc.getResources().getString(R.string.util_pane_title));
     38     }
     39 
     40     public UtilControlPane(TestingCamera21 tc, XmlPullParser configParser, StatusListener listener)
     41             throws XmlPullParserException, IOException {
     42         super(tc, null, listener, tc.getPaneTracker());
     43 
     44         this.setName(tc.getResources().getString(R.string.util_pane_title));
     45 
     46         configParser.require(XmlPullParser.START_TAG,
     47                 XmlPullParser.NO_NAMESPACE, PANE_NAME);
     48         // Parse attributes here
     49         configParser.next();
     50         configParser.require(XmlPullParser.END_TAG,
     51                 XmlPullParser.NO_NAMESPACE, PANE_NAME);
     52     }
     53 
     54 }
     55