10a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood/*
20a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood * Copyright (C) 2010 The Android Open Source Project
30a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood *
40a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood * Licensed under the Apache License, Version 2.0 (the "License");
50a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood * you may not use this file except in compliance with the License.
60a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood * You may obtain a copy of the License at
70a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood *
80a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood *      http://www.apache.org/licenses/LICENSE-2.0
90a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood *
100a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood * Unless required by applicable law or agreed to in writing, software
110a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood * distributed under the License is distributed on an "AS IS" BASIS,
120a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
130a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood * See the License for the specific language governing permissions and
140a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood * limitations under the License.
150a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood */
160a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood
170a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwoodpackage com.android.quicksearchbox.ui;
180a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood
190a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwoodimport com.android.quicksearchbox.R;
20ecf356c15143ab0583c64682de16d94a57f7dd1cMathew Inwoodimport com.android.quicksearchbox.Source;
210a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood
220a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwoodimport android.content.Context;
230a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwoodimport android.graphics.drawable.Drawable;
240a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwoodimport android.util.AttributeSet;
250a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwoodimport android.view.View;
260a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwoodimport android.widget.ImageButton;
270a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood
280a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood/**
290a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood * Finishes the containing activity on BACK, even if input method is showing.
300a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood */
310a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwoodpublic class SearchActivityViewSinglePane extends SearchActivityView {
320a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood
330a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood    public SearchActivityViewSinglePane(Context context) {
340a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood        super(context);
350a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood    }
360a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood
370a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood    public SearchActivityViewSinglePane(Context context, AttributeSet attrs) {
380a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood        super(context, attrs);
390a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood    }
400a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood
410a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood    public SearchActivityViewSinglePane(Context context, AttributeSet attrs, int defStyle) {
420a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood        super(context, attrs, defStyle);
430a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood    }
440a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood
450a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood    @Override
460a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood    public void onResume() {
47ecf356c15143ab0583c64682de16d94a57f7dd1cMathew Inwood        focusQueryTextView();
480a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood    }
490a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood
500a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood    @Override
518749e424d7645e708f238530621248abb567e3beBjorn Bringert    public void considerHidingInputMethod() {
520a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood        mQueryTextView.hideInputMethod();
530a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood    }
540a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood
55ecf356c15143ab0583c64682de16d94a57f7dd1cMathew Inwood    @Override
56ecf356c15143ab0583c64682de16d94a57f7dd1cMathew Inwood    public void onStop() {
570a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood    }
580a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood
590a73d81f02118d0343d3f1c9219a8354466f72b3Mathew Inwood}
60