Java Code Examples for com.android.dialer.app.widget.SearchEditTextLayout

Following code examples demonstrate how to use com.android.dialer.app.widget.SearchEditTextLayoutfrom android. These examples are extracted from various highly rated open source projects. You can directly use these code snippets or view their entire linked source code. These snippets are extracted to provide contextual information about how to use this class in the real world. These samples also let you understand some good practices on how to use com.android.dialer.app.widget.SearchEditTextLayoutand various code implementation of this class.

  public void onResume() {
    super.onResume();

    ActionBar actionBar = ((AppCompatActivity) getActivity()).getSupportActionBar();
    actionBar.setCustomView(R.layout.search_edittext);
    actionBar.setDisplayShowCustomEnabled(true);
    actionBar.setDisplayHomeAsUpEnabled(false);
    actionBar.setDisplayShowHomeEnabled(false);

    final SearchEditTextLayout searchEditTextLayout =
        (SearchEditTextLayout) actionBar.getCustomView().findViewById(R.id.search_view_container);
    searchEditTextLayout.expand(false, true);
    searchEditTextLayout.setCallback(mSearchLayoutCallback);
    searchEditTextLayout.setBackgroundDrawable(null);

    mSearchView = (EditText) searchEditTextLayout.findViewById(R.id.search_view);
    mSearchView.addTextChangedListener(mPhoneSearchQueryTextListener);
    mSearchView.setHint(R.string.block_number_search_hint);

    searchEditTextLayout
        .findViewById(R.id.search_box_expanded)
        .setBackgroundColor(getContext().getResources().getColor(android.R.color.white));

    if (!TextUtils.isEmpty(getQueryString())) {
      mSearchView.setText(getQueryString());
    }

    mSearchView.setTextSize(
        TypedValue.COMPLEX_UNIT_PX,
        getResources().getDimension(R.dimen.blocked_number_search_text_size));
  } 


    public void onResume() {
        super.onResume();
        pl a = ((pz) getActivity()).e().a();
        a.a(buf.hL);
        a.d(true);
        a.b(false);
        a.a(false);
        SearchEditTextLayout searchEditTextLayout = (SearchEditTextLayout) a.a().findViewById(aq.bn);
        searchEditTextLayout.a(false, true);
        searchEditTextLayout.g = this.u;
        searchEditTextLayout.setBackgroundDrawable(null);
        this.w = (EditText) searchEditTextLayout.findViewById(aq.bm);
        this.w.addTextChangedListener(this.t);
        this.w.setHint(cob.be);
        searchEditTextLayout.findViewById(aq.bi).setBackgroundColor(getContext().getResources().getColor(17170443));
        if (!TextUtils.isEmpty(this.f)) {
            this.w.setText(this.f);
        }
        this.w.setTextSize(0, getResources().getDimension(buf.hi));
    } 

    public atd(atg atg, SearchEditTextLayout searchEditTextLayout) {
        this.d = new ate(this);
        this.a = atg;
        this.b = searchEditTextLayout;
    } 

Advertisement
Javadoc
Subclass-visible for testing
Advertisement