XML configuration and java files for Salesforce Lightning Design System Tokens.
Current release: Spring ’17
The library is offered as a Bintray repository that can be pulled into any project easily via the Gradle build. See the Bintray here.
Add the following to build.gradle (Module) in the Gradle Scripts:
repositories {
jcenter()
}
Under depenecies in the same script add:
compile 'com.salesforce.ux:SalesforceDesignSystem:3.0.0'
Replace 3.0.0 with the latest design-system-android build version.
Sync the Gradle Scripts, and perform a Gradle build. The Design System is now ready for use in your project.
Add the following import statment to any file which requires the use of Design System icons:
import com.salesforce.designsystem.Icons;
See Demo App
android:background="@color/slds_color_brand_dark"
TextView textView = (TextView)findViewById(R.id.textView);
Typeface custom_font = Typeface.createFromAsset(getAssets(), "SalesforceSans-bold.ttf");
textView.setTypeface(custom_font);
Icons.getDrawable(context,
Icons.ActionIcons.ActionNewTask,
resources.getDimensionPixelSize(R.dimen.slds_square_icon_medium),
resources.getColor(R.color.slds_color_text_link));
Icons.getDrawable(context,
Icons.CustomIcons.Custom1,
resources.getDimensionPixelSize(R.dimen.slds_square_icon_medium),
resources.getColor(R.color.slds_color_text_link));
Icons.getDrawable(context,
Icons.StandardIcons.Account,
resources.getDimensionPixelSize(R.dimen.slds_square_icon_medium),
resources.getColor(R.color.slds_color_text_link));
Icons.getDrawable(context,
Icons.Utility.AddContact,
resources.getDimensionPixelSize(R.dimen.slds_square_icon_medium),
resources.getColor(R.color.slds_color_text_link));
$ npm install
$ gulp
- Source code is licensed under BSD 3-Clause
- All icons and images are licensed under Creative Commons Attribution-NoDerivatives 4.0
- The Salesforce Sans font is licensed under our font license