File tree 3 files changed +12
-4
lines changed 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -176,7 +176,7 @@ let defaultAccentColor: number = undefined;
176
176
function getDefaultAccentColor ( context : android . content . Context ) : number {
177
177
if ( defaultAccentColor === undefined ) {
178
178
//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 ;
180
180
}
181
181
return defaultAccentColor ;
182
182
}
@@ -299,7 +299,7 @@ export class TabView extends TabViewBase {
299
299
tabLayout . setSelectedIndicatorColors ( [ accentColor ] ) ;
300
300
}
301
301
302
- const primaryColor = ad . resources . getPalleteColor ( PRIMARY_COLOR , context ) ;
302
+ const primaryColor = ad . resources . getPaletteColor ( PRIMARY_COLOR , context ) ;
303
303
if ( primaryColor ) {
304
304
tabLayout . setBackgroundColor ( primaryColor ) ;
305
305
}
Original file line number Diff line number Diff line change @@ -166,8 +166,10 @@ export module ad {
166
166
var uri = packageName + name ;
167
167
return resources . getIdentifier ( uri , null , null ) ;
168
168
}
169
-
170
169
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 {
171
173
if ( attrCache . has ( name ) ) {
172
174
return attrCache . get ( name ) ;
173
175
}
Original file line number Diff line number Diff line change @@ -176,11 +176,17 @@ export module ad {
176
176
*/
177
177
export function getId ( name : string ) : number ;
178
178
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
+
179
185
/**
180
186
* Gets a color from the current theme.
181
187
* @param name - Name of the color resource.
182
188
*/
183
- export function getPalleteColor ( name : string , context : any /* android.content.Context */ ) : number ;
189
+ export function getPaletteColor ( name : string , context : any /* android.content.Context */ ) : number ;
184
190
}
185
191
}
186
192
/**
You can’t perform that action at this time.
0 commit comments