MiguelCatalan / MaterialSearchView

Cute library to implement SearchView in a Material Design Approach
http://miguelcatalan.info/2015/09/23/MaterialSearchView/
Apache License 2.0
3.83k stars 616 forks source link

How to change SearchView text size? #236

Open iman2420 opened 5 years ago

iman2420 commented 5 years ago

I Do it by 💯

  `int resourceId = this.getResources().getIdentifier("searchTextView", "id", Objects.requireNonNull(getContext()).getPackageName());
        AppCompatEditText search_text = searchView.findViewById(resourceId);
        search_text.setTextColor(Color.WHITE);
        search_text.setTextSize(TypedValue.COMPLEX_UNIT_PX, getResources().getDimensionPixelSize(R.dimen.text_font_size_small));`
alexlovar commented 5 years ago

int resourceId = this.getResources().getIdentifier("searchTextView", "id", Objects.requireNonNull(getContext()).getPackageName()); AppCompatEditText search_text = searchView.findViewById(resourceId); search_text.setTextColor(Color.WHITE); search_text.setTextSize(TypedValue.COMPLEX_UNIT_PX, getResources().getDimensionPixelSize(R.dimen.text_font_size_small));

hi, where i need to put this code?