aboutsummaryrefslogtreecommitdiffstats
path: root/target/imagebuilder/Makefile
Commit message (Expand)AuthorAgeFilesLines
...
* fix imagebuilder compileFelix Fietkau2007-12-131-2/+2
* Use $(CP) instead of $(INSTALL_BIN) for binaries.Felix Fietkau2007-12-091-2/+2
* fix the image builderFelix Fietkau2007-11-141-17/+19
* Fix the imagebuilder generation (does not mean it works with the recent changes)Florian Fainelli2007-09-091-1/+1
* Fix image builder generation (#2213)Florian Fainelli2007-08-141-1/+1
* Fix the imagebuilder compilation (#2213)Florian Fainelli2007-08-131-1/+1
* Suppress spaces in uname -mFlorian Fainelli2007-06-121-1/+1
* fixes for a few build errors on osx without finkFelix Fietkau2007-04-291-2/+2
* revert find | xargs => find | exec changes - this is completely unnecessary a...Felix Fietkau2007-04-121-2/+2
* Accidentially broke sdk and imagebuilder in [6857]Mike Baker2007-04-031-1/+1
* more [6849]Mike Baker2007-04-031-2/+2
* Use find -exec instead of xargsFlorian Fainelli2007-04-021-2/+2
* include .pkginfo in image builderFelix Fietkau2007-01-201-0/+1
* Fix config checks for Image Builder and SDK - only build them when requested....Felix Fietkau2007-01-141-2/+2
* include .targetinfo in the image builder, and allow direct calls to the packa...Felix Fietkau2007-01-141-0/+1
* force rebuild of the imagebuilderFelix Fietkau2007-01-111-1/+1
* Add initial version of the new Image Builder It's still a bit rough in a few ...Felix Fietkau2007-01-101-0/+46
6; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/*
 * Copyright (C) 2014 Dominik Schürmann <dominik@dominikschuermann.de>
 *
 * 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 org.sufficientlysecure.keychain.ui.widget;

import android.content.Context;
import android.support.v7.widget.AppCompatAutoCompleteTextView;
import android.util.AttributeSet;
import android.view.inputmethod.EditorInfo;
import android.widget.ArrayAdapter;

import org.sufficientlysecure.keychain.util.ContactHelper;

public class NameEditText extends AppCompatAutoCompleteTextView {
    public NameEditText(Context context) {
        super(context);
        init();
    }

    public NameEditText(Context context, AttributeSet attrs) {
        super(context, attrs);
        init();
    }

    public NameEditText(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        init();
    }

    private void init() {
        reenableKeyboardSuggestions();
        initAdapter();
    }

    private void initAdapter() {
        setThreshold(1); // Start working from first character
        setAdapter(new ArrayAdapter<>(
                getContext(), android.R.layout.simple_spinner_dropdown_item,
                new ContactHelper(getContext()).getPossibleUserNames()));
    }

    /**
     * Hack to re-enable keyboard suggestions in AutoCompleteTextView.
     * From http://stackoverflow.com/a/22512858
     */
    private void reenableKeyboardSuggestions() {
        int inputType = getInputType();
        inputType &= ~EditorInfo.TYPE_TEXT_FLAG_AUTO_COMPLETE;
        setRawInputType(inputType);
    }
}