1 /*
2  * Copyright (C) 2016 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.incallui.answer.impl.hint;
18 
19 import android.view.LayoutInflater;
20 import android.view.View;
21 import android.view.ViewGroup;
22 import android.widget.TextView;
23 
24 /** Interface to overlay a hint of how to answer the call. */
25 public interface AnswerHint {
26 
27   /**
28    * Inflates the hint's layout into the container.
29    *
30    * <p>TODO(twyen): if the hint becomes more dependent on other UI elements of the AnswerFragment,
31    * should put put and hintText into another data structure.
32    */
onCreateView(LayoutInflater inflater, ViewGroup container, View puck, TextView hintText)33   void onCreateView(LayoutInflater inflater, ViewGroup container, View puck, TextView hintText);
34 
35   /** Called when the puck bounce animation begins. */
onBounceStart()36   void onBounceStart();
37 
38   /**
39    * Called when the bounce animation has ended (transitioned into other animations). The hint
40    * should reset itself.
41    */
onBounceEnd()42   void onBounceEnd();
43 
44   /** Called when the call is accepted or rejected through user interaction. */
onAnswered()45   void onAnswered();
46 }
47