Calculating Material Colors
You can use the following method to get a darker primary color: Example:
Technical answers from my Stack Overflow history, with source links and licenses.
Showing 5 of 5 answers tagged material-design
Exported May 9, 2026
You can use the following method to get a darker primary color: Example:
ColorStateList in android:tint was not supported prior to API 21. See: https://code.google.com/p/android/issues/detail?id=204671 You can use AppCompat's AppCompatResources and support-v4 DrawableCompat to support...
TextInputLayout relies on resources/attributes in AppCompat. You need to use an AppCompat base theme. The AppCompat themes are a parent of the Material based themes on API 21+. So, you will be using the Material theme.
The first screenshot in your question is not a public widget. The support SearchView ( android.support.v7.widget.SearchView ) mimics Android 5.0 Lollipop's SearchView ( android.widget.SearchView ). Your second...
Every Activity needs to extend ActionBarActivity. AppCompat doesn't use the native Toolbar or ActionBar, even on Lollipop. For more info see:...