I want to make a button exactly like in this image
I want to use a xml file that will us
It's called a Chip in Material and can be used like so:
More info can be found here and here.
To use Material components in your project, you'll to add the appropriate lib to your build.gradle:
dependencies {
// ...
implementation 'com.google.android.material:material:1.0.0-beta01'
// ...
}
More info on adding Material to your project can be found here.
Alternatively, you can use the latest version of the support design lib:
Also pull in the appropriate libs:
dependencies {
// ...
implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'
implementation 'com.android.support:design:28.0.0-alpha1'
// OR
implementation 'com.android.support:design-chip:28.0.0-alpha1'
// ...
}
See this answer for more on the latter approach.