|
@@ -97,10 +97,12 @@ public class CollapsingTitleBar extends TitleBar implements View.OnTouchListener
|
97
|
97
|
|
98
|
98
|
@Override
|
99
|
99
|
protected void setBackground(StyleParams params) {
|
100
|
|
- titleBarBackground = createBackground(params,
|
101
|
|
- params.collapsingTopBarParams.expendedTitleBarColor,
|
102
|
|
- params.collapsingTopBarParams.scrimColor);
|
103
|
|
- setBackground(titleBarBackground);
|
|
100
|
+ if (titleBarBackground == null) {
|
|
101
|
+ titleBarBackground = createBackground(params,
|
|
102
|
+ params.collapsingTopBarParams.expendedTitleBarColor,
|
|
103
|
+ params.collapsingTopBarParams.scrimColor);
|
|
104
|
+ setBackground(titleBarBackground);
|
|
105
|
+ }
|
104
|
106
|
}
|
105
|
107
|
|
106
|
108
|
private TitleBarBackground createBackground(StyleParams styleParams, StyleParams.Color expendedColor, StyleParams.Color collapsedColor) {
|