114bf0cef7eeed572a67c29a328581afac4decc20Deepanshu Gupta/* 214bf0cef7eeed572a67c29a328581afac4decc20Deepanshu Gupta * Copyright (C) 2014 The Android Open Source Project 314bf0cef7eeed572a67c29a328581afac4decc20Deepanshu Gupta * 414bf0cef7eeed572a67c29a328581afac4decc20Deepanshu Gupta * Licensed under the Apache License, Version 2.0 (the "License"); 514bf0cef7eeed572a67c29a328581afac4decc20Deepanshu Gupta * you may not use this file except in compliance with the License. 614bf0cef7eeed572a67c29a328581afac4decc20Deepanshu Gupta * You may obtain a copy of the License at 714bf0cef7eeed572a67c29a328581afac4decc20Deepanshu Gupta * 814bf0cef7eeed572a67c29a328581afac4decc20Deepanshu Gupta * http://www.apache.org/licenses/LICENSE-2.0 914bf0cef7eeed572a67c29a328581afac4decc20Deepanshu Gupta * 1014bf0cef7eeed572a67c29a328581afac4decc20Deepanshu Gupta * Unless required by applicable law or agreed to in writing, software 1114bf0cef7eeed572a67c29a328581afac4decc20Deepanshu Gupta * distributed under the License is distributed on an "AS IS" BASIS, 1214bf0cef7eeed572a67c29a328581afac4decc20Deepanshu Gupta * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1314bf0cef7eeed572a67c29a328581afac4decc20Deepanshu Gupta * See the License for the specific language governing permissions and 1414bf0cef7eeed572a67c29a328581afac4decc20Deepanshu Gupta * limitations under the License. 1514bf0cef7eeed572a67c29a328581afac4decc20Deepanshu Gupta */ 1614bf0cef7eeed572a67c29a328581afac4decc20Deepanshu Gupta 1714bf0cef7eeed572a67c29a328581afac4decc20Deepanshu Guptapackage com.android.layoutlib.bridge.impl; 1814bf0cef7eeed572a67c29a328581afac4decc20Deepanshu Gupta 1914bf0cef7eeed572a67c29a328581afac4decc20Deepanshu Guptaimport com.android.ide.common.rendering.api.ViewInfo; 20bac0d9ae796920360ee2f2babd8f2c03d4c3c2b8Deepanshu Guptaimport com.android.ide.common.rendering.api.ViewType; 2114bf0cef7eeed572a67c29a328581afac4decc20Deepanshu Gupta 22bac0d9ae796920360ee2f2babd8f2c03d4c3c2b8Deepanshu Gupta/** 23bac0d9ae796920360ee2f2babd8f2c03d4c3c2b8Deepanshu Gupta * ViewInfo for views added by the platform. 24bac0d9ae796920360ee2f2babd8f2c03d4c3c2b8Deepanshu Gupta */ 2514bf0cef7eeed572a67c29a328581afac4decc20Deepanshu Guptapublic class SystemViewInfo extends ViewInfo { 2614bf0cef7eeed572a67c29a328581afac4decc20Deepanshu Gupta 27bac0d9ae796920360ee2f2babd8f2c03d4c3c2b8Deepanshu Gupta private ViewType mViewType; 28bac0d9ae796920360ee2f2babd8f2c03d4c3c2b8Deepanshu Gupta 2914bf0cef7eeed572a67c29a328581afac4decc20Deepanshu Gupta public SystemViewInfo(String name, Object cookie, int left, int top, 3014bf0cef7eeed572a67c29a328581afac4decc20Deepanshu Gupta int right, int bottom) { 3114bf0cef7eeed572a67c29a328581afac4decc20Deepanshu Gupta super(name, cookie, left, top, right, bottom); 3214bf0cef7eeed572a67c29a328581afac4decc20Deepanshu Gupta } 3314bf0cef7eeed572a67c29a328581afac4decc20Deepanshu Gupta 3414bf0cef7eeed572a67c29a328581afac4decc20Deepanshu Gupta public SystemViewInfo(String name, Object cookie, int left, int top, 3514bf0cef7eeed572a67c29a328581afac4decc20Deepanshu Gupta int right, int bottom, Object viewObject, Object layoutParamsObject) { 3614bf0cef7eeed572a67c29a328581afac4decc20Deepanshu Gupta super(name, cookie, left, top, right, bottom, viewObject, 3714bf0cef7eeed572a67c29a328581afac4decc20Deepanshu Gupta layoutParamsObject); 3814bf0cef7eeed572a67c29a328581afac4decc20Deepanshu Gupta } 3914bf0cef7eeed572a67c29a328581afac4decc20Deepanshu Gupta 4014bf0cef7eeed572a67c29a328581afac4decc20Deepanshu Gupta @Override 41bac0d9ae796920360ee2f2babd8f2c03d4c3c2b8Deepanshu Gupta public ViewType getViewType() { 42bac0d9ae796920360ee2f2babd8f2c03d4c3c2b8Deepanshu Gupta if (mViewType != null) { 43bac0d9ae796920360ee2f2babd8f2c03d4c3c2b8Deepanshu Gupta return mViewType; 44bac0d9ae796920360ee2f2babd8f2c03d4c3c2b8Deepanshu Gupta } 45bac0d9ae796920360ee2f2babd8f2c03d4c3c2b8Deepanshu Gupta return ViewType.SYSTEM_UNKNOWN; 46bac0d9ae796920360ee2f2babd8f2c03d4c3c2b8Deepanshu Gupta } 47bac0d9ae796920360ee2f2babd8f2c03d4c3c2b8Deepanshu Gupta 48bac0d9ae796920360ee2f2babd8f2c03d4c3c2b8Deepanshu Gupta public void setViewType(ViewType type) { 49bac0d9ae796920360ee2f2babd8f2c03d4c3c2b8Deepanshu Gupta mViewType = type; 5014bf0cef7eeed572a67c29a328581afac4decc20Deepanshu Gupta } 5114bf0cef7eeed572a67c29a328581afac4decc20Deepanshu Gupta} 52