• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2019 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.settings.common;
18 
19 import androidx.fragment.app.Fragment;
20 
21 /**
22  * Implemented by Settings {@link android.app.Activity} instances to host Settings {@link Fragment}
23  * instances.
24  */
25 public interface FragmentHost {
26     /**
27      * Launches a Fragment in the main container of the current Activity.
28      */
launchFragment(Fragment fragment)29     void launchFragment(Fragment fragment);
30 
31     /**
32      * Pops the top off the Fragment stack.
33      */
goBack()34     void goBack();
35 
36     /**
37      * Shows a message to inform the user that the current feature is not available when driving.
38      */
showBlockingMessage()39     void showBlockingMessage();
40 }
41