-1


I discovered for myself Google's material design, but I can't use their library for some reasons, but I want to implement such bottom border highlight.
Desired effect

Do I need to create a custom view for this or maybe use some library? It'll be great if a solution will support API >=19 but any help appreciated.

Thanks for attention!

  • Refer to this question https://stackoverflow.com/questions/31722034/how-to-change-color-of-textinputlayouts-label-and-edittext-underline-android – AIK Jun 01 '18 at 04:16

1 Answers1

0

Referring to the part of your question where you indicate "but I can't use their library for some reason" I have a potential solution for that. You can add the material design dependency using the Project Structure or directly to Gradle in Android Studio.

Project Structure: File > Project Structure > app > Dependencies > "+" sign > Library dependency > search for "design" > select option "com.android.support:design:27.1.1" (or whichever version aligns with your system.

Gradle: In build.gradle (Module: app) add implementation 'com.android.support:design:27.1.1' in your dependencies.

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:design:27.1.1'
}
timclancy
  • 316
  • 2
  • 5