/* * Aegis Bitcoin Wallet - The secure Bitcoin wallet for Android * Copyright 2014 Bojan Simic and specularX.co, designed by Reuven Yamrom * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package com.aegiswallet.widgets; import android.content.Context; import android.content.res.TypedArray; import android.util.AttributeSet; import android.widget.AutoCompleteTextView; import android.widget.EditText; import com.aegiswallet.R; import static com.aegiswallet.widgets.AegisTypeface.applyTypeface; import static com.aegiswallet.widgets.AegisTypeface.getFont; public class AegisAutoCompleteEditText extends AutoCompleteTextView { public AegisAutoCompleteEditText(Context context) { super(context); applyTypeface(this); } public AegisAutoCompleteEditText(Context context, AttributeSet attrs) { super(context, attrs); init(context, attrs); } public AegisAutoCompleteEditText(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); init(context, attrs); } private void init(Context context, AttributeSet attrs) { TypedArray config = context.obtainStyledAttributes(attrs, R.styleable.AegisEditText); applyTypeface(this, getFont(config, R.styleable.AegisEditText_scsFont)); config.recycle(); } }