• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2021 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.car.ui.sharedlibrary.oemapis.appstyledview;
18 
19 import android.view.View;
20 import android.view.WindowManager;
21 
22 /** The OEM interface for a AppStyledView. */
23 public interface AppStyledViewControllerOEMV1 {
24 
25     /**
26      * Creates a app styled view.
27      *
28      * @param content app content view.
29      * @return the view used for app styled view.
30      */
getAppStyledView(View content)31     View getAppStyledView(View content);
32 
33     /**
34      * Sets a {@link Runnable} to be called whenever the close icon is clicked.
35      */
setOnCloseClickListener(Runnable listener)36     void setOnCloseClickListener(Runnable listener);
37 
38     /**
39      * Sets the nav icon to be used.
40      */
setNavIcon(int navIcon)41     void setNavIcon(int navIcon);
42 
43     /**
44      * Returns the layout params for the AppStyledView dialog
45      */
getDialogWindowLayoutParam(WindowManager.LayoutParams params)46     WindowManager.LayoutParams getDialogWindowLayoutParam(WindowManager.LayoutParams params);
47 }
48