Thursday, May 2, 2019

Android programming: use Google's Material Icons in the App


  1. Visit Google Material Icons site: https://material.io/tools/icons/?style=baseline
  2. Select the theme option on the left side.
  3. Find the icon suitable for the app.
  4. Click on the wanted icon.
  5. On the bottom left, a new link Selected Icon appears.  Click on it.
  6. Select the size of the icon. For Android app, select Android.
  7. Click to download the SVG format of the icon.
  8. Open the project in Android Studio.
  9. Click on menu File|New|Image Asset.
  10. Select Action Bar and Tab Icons for Icon Type.
  11. Create a name for the icon.
  12. Select Image for Asset Type.
  13. Enter the path to the downloaded file.
  14. Choose a Theme according to that is used in the app.
  15. Click on the Next button.
  16. Click on the Finish button.
  17. The icon is then added into res/drawable. e.g. res/drawable/myicon.
  18. Use the icon as "@drawable/myicon".

No comments:

 
Get This <