1132a8afcb4970d1b783a6dba7944dc0dd5063101Mathew Inwood/*
2132a8afcb4970d1b783a6dba7944dc0dd5063101Mathew Inwood * Copyright (C) 2010 The Android Open Source Project
3132a8afcb4970d1b783a6dba7944dc0dd5063101Mathew Inwood *
4132a8afcb4970d1b783a6dba7944dc0dd5063101Mathew Inwood * Licensed under the Apache License, Version 2.0 (the "License");
5132a8afcb4970d1b783a6dba7944dc0dd5063101Mathew Inwood * you may not use this file except in compliance with the License.
6132a8afcb4970d1b783a6dba7944dc0dd5063101Mathew Inwood * You may obtain a copy of the License at
7132a8afcb4970d1b783a6dba7944dc0dd5063101Mathew Inwood *
8132a8afcb4970d1b783a6dba7944dc0dd5063101Mathew Inwood *      http://www.apache.org/licenses/LICENSE-2.0
9132a8afcb4970d1b783a6dba7944dc0dd5063101Mathew Inwood *
10132a8afcb4970d1b783a6dba7944dc0dd5063101Mathew Inwood * Unless required by applicable law or agreed to in writing, software
11132a8afcb4970d1b783a6dba7944dc0dd5063101Mathew Inwood * distributed under the License is distributed on an "AS IS" BASIS,
12132a8afcb4970d1b783a6dba7944dc0dd5063101Mathew Inwood * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13132a8afcb4970d1b783a6dba7944dc0dd5063101Mathew Inwood * See the License for the specific language governing permissions and
14132a8afcb4970d1b783a6dba7944dc0dd5063101Mathew Inwood * limitations under the License.
15132a8afcb4970d1b783a6dba7944dc0dd5063101Mathew Inwood */
16132a8afcb4970d1b783a6dba7944dc0dd5063101Mathew Inwood
17132a8afcb4970d1b783a6dba7944dc0dd5063101Mathew Inwoodpackage com.android.quicksearchbox;
18132a8afcb4970d1b783a6dba7944dc0dd5063101Mathew Inwood
19132a8afcb4970d1b783a6dba7944dc0dd5063101Mathew Inwoodimport android.content.Context;
20132a8afcb4970d1b783a6dba7944dc0dd5063101Mathew Inwoodimport android.text.style.TextAppearanceSpan;
21132a8afcb4970d1b783a6dba7944dc0dd5063101Mathew Inwood
22132a8afcb4970d1b783a6dba7944dc0dd5063101Mathew Inwood/**
23132a8afcb4970d1b783a6dba7944dc0dd5063101Mathew Inwood * Factory class for text appearances.
24132a8afcb4970d1b783a6dba7944dc0dd5063101Mathew Inwood */
25132a8afcb4970d1b783a6dba7944dc0dd5063101Mathew Inwoodpublic class TextAppearanceFactory {
26132a8afcb4970d1b783a6dba7944dc0dd5063101Mathew Inwood    private final Context mContext;
27132a8afcb4970d1b783a6dba7944dc0dd5063101Mathew Inwood
28132a8afcb4970d1b783a6dba7944dc0dd5063101Mathew Inwood    public TextAppearanceFactory(Context context) {
29132a8afcb4970d1b783a6dba7944dc0dd5063101Mathew Inwood        mContext = context;
30132a8afcb4970d1b783a6dba7944dc0dd5063101Mathew Inwood    }
31132a8afcb4970d1b783a6dba7944dc0dd5063101Mathew Inwood
32132a8afcb4970d1b783a6dba7944dc0dd5063101Mathew Inwood    public Object[] createSuggestionQueryTextAppearance() {
33132a8afcb4970d1b783a6dba7944dc0dd5063101Mathew Inwood        return new Object[]{
34de143166eb775e9135ab73bcc2d7cd062f6cf6f6Bjorn Bringert                new TextAppearanceSpan(mContext, R.style.SuggestionText1_Query)
35132a8afcb4970d1b783a6dba7944dc0dd5063101Mathew Inwood        };
36132a8afcb4970d1b783a6dba7944dc0dd5063101Mathew Inwood    }
37132a8afcb4970d1b783a6dba7944dc0dd5063101Mathew Inwood
38132a8afcb4970d1b783a6dba7944dc0dd5063101Mathew Inwood    public Object[] createSuggestionSuggestedTextAppearance() {
39132a8afcb4970d1b783a6dba7944dc0dd5063101Mathew Inwood        return new Object[]{
40de143166eb775e9135ab73bcc2d7cd062f6cf6f6Bjorn Bringert                new TextAppearanceSpan(mContext, R.style.SuggestionText1_Suggested)
41132a8afcb4970d1b783a6dba7944dc0dd5063101Mathew Inwood        };
42132a8afcb4970d1b783a6dba7944dc0dd5063101Mathew Inwood    }
43132a8afcb4970d1b783a6dba7944dc0dd5063101Mathew Inwood
44132a8afcb4970d1b783a6dba7944dc0dd5063101Mathew Inwood}
45