1086e7db1ab6ef49b4b7974c471b70f81b2d13aefAlan Viverette/* 2086e7db1ab6ef49b4b7974c471b70f81b2d13aefAlan Viverette * Copyright (C) 2013 The Android Open Source Project 3086e7db1ab6ef49b4b7974c471b70f81b2d13aefAlan Viverette * 4086e7db1ab6ef49b4b7974c471b70f81b2d13aefAlan Viverette * Licensed under the Apache License, Version 2.0 (the "License"); 5086e7db1ab6ef49b4b7974c471b70f81b2d13aefAlan Viverette * you may not use this file except in compliance with the License. 6086e7db1ab6ef49b4b7974c471b70f81b2d13aefAlan Viverette * You may obtain a copy of the License at 7086e7db1ab6ef49b4b7974c471b70f81b2d13aefAlan Viverette * 8086e7db1ab6ef49b4b7974c471b70f81b2d13aefAlan Viverette * http://www.apache.org/licenses/LICENSE-2.0 9086e7db1ab6ef49b4b7974c471b70f81b2d13aefAlan Viverette * 10086e7db1ab6ef49b4b7974c471b70f81b2d13aefAlan Viverette * Unless required by applicable law or agreed to in writing, software 11086e7db1ab6ef49b4b7974c471b70f81b2d13aefAlan Viverette * distributed under the License is distributed on an "AS IS" BASIS, 12086e7db1ab6ef49b4b7974c471b70f81b2d13aefAlan Viverette * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13086e7db1ab6ef49b4b7974c471b70f81b2d13aefAlan Viverette * See the License for the specific language governing permissions and 14086e7db1ab6ef49b4b7974c471b70f81b2d13aefAlan Viverette * limitations under the License. 15086e7db1ab6ef49b4b7974c471b70f81b2d13aefAlan Viverette */ 16086e7db1ab6ef49b4b7974c471b70f81b2d13aefAlan Viverette 17086e7db1ab6ef49b4b7974c471b70f81b2d13aefAlan Viverettepackage android.support.v4.view; 18086e7db1ab6ef49b4b7974c471b70f81b2d13aefAlan Viverette 19086e7db1ab6ef49b4b7974c471b70f81b2d13aefAlan Viveretteimport android.view.View; 20086e7db1ab6ef49b4b7974c471b70f81b2d13aefAlan Viverette 21086e7db1ab6ef49b4b7974c471b70f81b2d13aefAlan Viverette/** 22086e7db1ab6ef49b4b7974c471b70f81b2d13aefAlan Viverette * KitKat-specific View API implementation. 23086e7db1ab6ef49b4b7974c471b70f81b2d13aefAlan Viverette */ 24f91071ff037056101389f2cbfc5fadb0229a36a7Chris Banesclass ViewCompatKitKat { 25086e7db1ab6ef49b4b7974c471b70f81b2d13aefAlan Viverette public static int getAccessibilityLiveRegion(View view) { 26086e7db1ab6ef49b4b7974c471b70f81b2d13aefAlan Viverette return view.getAccessibilityLiveRegion(); 27086e7db1ab6ef49b4b7974c471b70f81b2d13aefAlan Viverette } 28086e7db1ab6ef49b4b7974c471b70f81b2d13aefAlan Viverette 29086e7db1ab6ef49b4b7974c471b70f81b2d13aefAlan Viverette public static void setAccessibilityLiveRegion(View view, int mode) { 30086e7db1ab6ef49b4b7974c471b70f81b2d13aefAlan Viverette view.setAccessibilityLiveRegion(mode); 31086e7db1ab6ef49b4b7974c471b70f81b2d13aefAlan Viverette } 32f91071ff037056101389f2cbfc5fadb0229a36a7Chris Banes 33f91071ff037056101389f2cbfc5fadb0229a36a7Chris Banes public static boolean isLaidOut(View view) { 34f91071ff037056101389f2cbfc5fadb0229a36a7Chris Banes return view.isLaidOut(); 35f91071ff037056101389f2cbfc5fadb0229a36a7Chris Banes } 36f6610f183f0afe6e392dea804474f722d82083fdChris Banes 37f6610f183f0afe6e392dea804474f722d82083fdChris Banes public static boolean isAttachedToWindow(View view) { 38f6610f183f0afe6e392dea804474f722d82083fdChris Banes return view.isAttachedToWindow(); 39f6610f183f0afe6e392dea804474f722d82083fdChris Banes } 40d589411e30b9760e8e95a5e8d6bc1c244526214fAlan Viverette 41d589411e30b9760e8e95a5e8d6bc1c244526214fAlan Viverette public static boolean isLayoutDirectionResolved(View view) { 42d589411e30b9760e8e95a5e8d6bc1c244526214fAlan Viverette return view.isLayoutDirectionResolved(); 43d589411e30b9760e8e95a5e8d6bc1c244526214fAlan Viverette } 44086e7db1ab6ef49b4b7974c471b70f81b2d13aefAlan Viverette} 45