1f49117b4bfcac616d6c97d14437f0d19bad5c453Deepanshu Gupta/* 2f49117b4bfcac616d6c97d14437f0d19bad5c453Deepanshu Gupta * Copyright (C) 2014 The Android Open Source Project 3f49117b4bfcac616d6c97d14437f0d19bad5c453Deepanshu Gupta * 4f49117b4bfcac616d6c97d14437f0d19bad5c453Deepanshu Gupta * Licensed under the Apache License, Version 2.0 (the "License"); 5f49117b4bfcac616d6c97d14437f0d19bad5c453Deepanshu Gupta * you may not use this file except in compliance with the License. 6f49117b4bfcac616d6c97d14437f0d19bad5c453Deepanshu Gupta * You may obtain a copy of the License at 7f49117b4bfcac616d6c97d14437f0d19bad5c453Deepanshu Gupta * 8f49117b4bfcac616d6c97d14437f0d19bad5c453Deepanshu Gupta * http://www.apache.org/licenses/LICENSE-2.0 9f49117b4bfcac616d6c97d14437f0d19bad5c453Deepanshu Gupta * 10f49117b4bfcac616d6c97d14437f0d19bad5c453Deepanshu Gupta * Unless required by applicable law or agreed to in writing, software 11f49117b4bfcac616d6c97d14437f0d19bad5c453Deepanshu Gupta * distributed under the License is distributed on an "AS IS" BASIS, 12f49117b4bfcac616d6c97d14437f0d19bad5c453Deepanshu Gupta * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13f49117b4bfcac616d6c97d14437f0d19bad5c453Deepanshu Gupta * See the License for the specific language governing permissions and 14f49117b4bfcac616d6c97d14437f0d19bad5c453Deepanshu Gupta * limitations under the License. 15f49117b4bfcac616d6c97d14437f0d19bad5c453Deepanshu Gupta */ 16f49117b4bfcac616d6c97d14437f0d19bad5c453Deepanshu Gupta 17f49117b4bfcac616d6c97d14437f0d19bad5c453Deepanshu Guptapackage com.android.layoutlib.bridge.impl; 18f49117b4bfcac616d6c97d14437f0d19bad5c453Deepanshu Gupta 19f49117b4bfcac616d6c97d14437f0d19bad5c453Deepanshu Guptaimport com.android.ide.common.rendering.api.ViewInfo; 2070114b33f8054cc38090a2bbd213ebf15abee63dDeepanshu Guptaimport com.android.ide.common.rendering.api.ViewType; 21f49117b4bfcac616d6c97d14437f0d19bad5c453Deepanshu Gupta 2270114b33f8054cc38090a2bbd213ebf15abee63dDeepanshu Gupta/** 2370114b33f8054cc38090a2bbd213ebf15abee63dDeepanshu Gupta * ViewInfo for views added by the platform. 2470114b33f8054cc38090a2bbd213ebf15abee63dDeepanshu Gupta */ 25f49117b4bfcac616d6c97d14437f0d19bad5c453Deepanshu Guptapublic class SystemViewInfo extends ViewInfo { 26f49117b4bfcac616d6c97d14437f0d19bad5c453Deepanshu Gupta 2770114b33f8054cc38090a2bbd213ebf15abee63dDeepanshu Gupta private ViewType mViewType; 2870114b33f8054cc38090a2bbd213ebf15abee63dDeepanshu Gupta 29f49117b4bfcac616d6c97d14437f0d19bad5c453Deepanshu Gupta public SystemViewInfo(String name, Object cookie, int left, int top, 30f49117b4bfcac616d6c97d14437f0d19bad5c453Deepanshu Gupta int right, int bottom) { 31f49117b4bfcac616d6c97d14437f0d19bad5c453Deepanshu Gupta super(name, cookie, left, top, right, bottom); 32f49117b4bfcac616d6c97d14437f0d19bad5c453Deepanshu Gupta } 33f49117b4bfcac616d6c97d14437f0d19bad5c453Deepanshu Gupta 34f49117b4bfcac616d6c97d14437f0d19bad5c453Deepanshu Gupta public SystemViewInfo(String name, Object cookie, int left, int top, 35f49117b4bfcac616d6c97d14437f0d19bad5c453Deepanshu Gupta int right, int bottom, Object viewObject, Object layoutParamsObject) { 36f49117b4bfcac616d6c97d14437f0d19bad5c453Deepanshu Gupta super(name, cookie, left, top, right, bottom, viewObject, 37f49117b4bfcac616d6c97d14437f0d19bad5c453Deepanshu Gupta layoutParamsObject); 38f49117b4bfcac616d6c97d14437f0d19bad5c453Deepanshu Gupta } 39f49117b4bfcac616d6c97d14437f0d19bad5c453Deepanshu Gupta 40f49117b4bfcac616d6c97d14437f0d19bad5c453Deepanshu Gupta @Override 4170114b33f8054cc38090a2bbd213ebf15abee63dDeepanshu Gupta public ViewType getViewType() { 4270114b33f8054cc38090a2bbd213ebf15abee63dDeepanshu Gupta if (mViewType != null) { 4370114b33f8054cc38090a2bbd213ebf15abee63dDeepanshu Gupta return mViewType; 4470114b33f8054cc38090a2bbd213ebf15abee63dDeepanshu Gupta } 4570114b33f8054cc38090a2bbd213ebf15abee63dDeepanshu Gupta return ViewType.SYSTEM_UNKNOWN; 4670114b33f8054cc38090a2bbd213ebf15abee63dDeepanshu Gupta } 4770114b33f8054cc38090a2bbd213ebf15abee63dDeepanshu Gupta 4870114b33f8054cc38090a2bbd213ebf15abee63dDeepanshu Gupta public void setViewType(ViewType type) { 4970114b33f8054cc38090a2bbd213ebf15abee63dDeepanshu Gupta mViewType = type; 50f49117b4bfcac616d6c97d14437f0d19bad5c453Deepanshu Gupta } 51f49117b4bfcac616d6c97d14437f0d19bad5c453Deepanshu Gupta} 52