File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -176,7 +176,7 @@ let defaultAccentColor: number = undefined;
176176function getDefaultAccentColor ( context : android . content . Context ) : number {
177177 if ( defaultAccentColor === undefined ) {
178178 //Fallback color: https://developer.android.com/samples/SlidingTabsColors/src/com.example.android.common/view/SlidingTabStrip.html
179- defaultAccentColor = ad . resources . getPalleteColor ( ACCENT_COLOR , context ) || 0xFF33B5E5 ;
179+ defaultAccentColor = ad . resources . getPaletteColor ( ACCENT_COLOR , context ) || 0xFF33B5E5 ;
180180 }
181181 return defaultAccentColor ;
182182}
@@ -299,7 +299,7 @@ export class TabView extends TabViewBase {
299299 tabLayout . setSelectedIndicatorColors ( [ accentColor ] ) ;
300300 }
301301
302- const primaryColor = ad . resources . getPalleteColor ( PRIMARY_COLOR , context ) ;
302+ const primaryColor = ad . resources . getPaletteColor ( PRIMARY_COLOR , context ) ;
303303 if ( primaryColor ) {
304304 tabLayout . setBackgroundColor ( primaryColor ) ;
305305 }
Original file line number Diff line number Diff line change @@ -166,8 +166,10 @@ export module ad {
166166 var uri = packageName + name ;
167167 return resources . getIdentifier ( uri , null , null ) ;
168168 }
169-
170169 export function getPalleteColor ( name : string , context : android . content . Context ) : number {
170+ return getPaletteColor ( name , context ) ;
171+ }
172+ export function getPaletteColor ( name : string , context : android . content . Context ) : number {
171173 if ( attrCache . has ( name ) ) {
172174 return attrCache . get ( name ) ;
173175 }
Original file line number Diff line number Diff line change @@ -176,11 +176,17 @@ export module ad {
176176 */
177177 export function getId ( name : string ) : number ;
178178
179+ /**
180+ * [Obsolete - please use getPaletteColor] Gets a color from current theme.
181+ * @param name - Name of the color
182+ */
183+ export function getPalleteColor ( ) ;
184+
179185 /**
180186 * Gets a color from the current theme.
181187 * @param name - Name of the color resource.
182188 */
183- export function getPalleteColor ( name : string , context : any /* android.content.Context */ ) : number ;
189+ export function getPaletteColor ( name : string , context : any /* android.content.Context */ ) : number ;
184190 }
185191}
186192/**
You can’t perform that action at this time.
0 commit comments