- Visit Google Material Icons site: https://material.io/tools/icons/?style=baseline
- Select the theme option on the left side.
- Find the icon suitable for the app.
- Click on the wanted icon.
- On the bottom left, a new link Selected Icon appears. Click on it.
- Select the size of the icon. For Android app, select Android.
- Click to download the SVG format of the icon.
- Open the project in Android Studio.
- Click on menu File|New|Image Asset.
- Select Action Bar and Tab Icons for Icon Type.
- Create a name for the icon.
- Select Image for Asset Type.
- Enter the path to the downloaded file.
- Choose a Theme according to that is used in the app.
- Click on the Next button.
- Click on the Finish button.
- The icon is then added into res/drawable. e.g. res/drawable/myicon.
- Use the icon as "@drawable/myicon".
Thursday, May 2, 2019
Android programming: use Google's Material Icons in the App
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment