On This Page

{#jumplink-list}  
[Markdown](/docs/vas/en-us/pax-all-in-one/integration/all/na/pax-all-in-one/pax-aio-get-started-intro/pax-aio-customize-default-ui-intro/pax-aio-customize-default-ui-change-style.md)  
Filter  
FILTER BY TAG

Customize Style Elements Using a Theme {#pax-aio-customize-default-ui-change-style}
===================================================================================

Follow these steps to customize the Default UI style elements.

1. Introduce a new theme to your application that includes the `Theme.PayButton2` theme as a parent theme:

   ```
   &lt;!-- Paybutton theme --&gt;
   &lt;style name="Theme.AppTheme.SampleTheme" parent="Theme.PayButton2"&gt;
       &lt;!-- Text color --&gt;
       &lt;item name="colorOnSurface"&gt;@color/black&lt;/item&gt;
    
       &lt;!-- Background color --&gt;
       &lt;item name="colorSurface"&gt;@color/white&lt;/item&gt;
    
       &lt;!-- Contactless indicators --&gt;
       &lt;item name="contactlessStateActiveColor"&gt;@color/dui_green&lt;/item&gt;
       &lt;item name="contactlessStateInactiveColor"&gt;@color/dui_light_gray2&lt;/item&gt;
       &lt;item name="contactlessStateErrorColor"&gt;@color/dui_red&lt;/item&gt;
    
       &lt;!-- Transaction status --&gt;
       &lt;item name="approvedStateColor"&gt;@color/dui_green&lt;/item&gt;
       &lt;item name="declinedErrorStateColor"&gt;@color/dui_red&lt;/item&gt; &lt;!-- Also used for error messages and dialogs --&gt;
       &lt;item name="preAuthorizedStateColor"&gt;@color/dui_dark_gray&lt;/item&gt;
    
       &lt;!-- Filled buttons and animations primary color --&gt;
       &lt;item name="colorPrimary"&gt;@color/dui_blue&lt;/item&gt;
    
       &lt;!-- Used over the primary color for text on filled buttons and details on animations --&gt;
       &lt;item name="colorOnPrimary"&gt;@color/dui_white&lt;/item&gt;
    
       &lt;!-- Corner radius for the buttons and transaction status badges --&gt;
       &lt;item name="smallComponentCornerSize"&gt;4dp&lt;/item&gt;
    
       &lt;!-- Company logo --&gt;
       &lt;item name="toolBarLogo"&gt;@drawable/logo_140x36&lt;/item&gt;
    
       &lt;!-- Stroke color for icons and animations --&gt;
       &lt;item name="animationStrokeColor"&gt;@color/dui_black&lt;/item&gt;
    
       &lt;!-- Stroke color for terminal in present card animation. By default the same as animationStrokeColor --&gt;
       &lt;item name="cardPresentAnimationStrokeColor"&gt;@color/dui_black&lt;/item&gt;
   &lt;/style&gt;
   ```
2. Call one of these methods to set the theme:

   ```
   mposUi.themeRes = R.style.Theme_AppTheme_SampleTheme
   ```

RELATED TO THIS PAGE

