How to add background color transition?
See original GitHub issueI am trying to enable the background color transition, and this is my code:
public class AppIntro extends AppIntro2 implements ISlideBackgroundColorHolder
{
@Override
public int getDefaultBackgroundColor() {
// Return the default background color of the slide.
return Color.parseColor("#000000");
}
@Override
public void setBackgroundColor(@ColorInt int backgroundColor) {
// Set the background color of the view within your slide to which the transition should be applied.
if (layoutContainer != null) {
layoutContainer.setBackgroundColor(backgroundColor);
}
}
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
showSkipButton(false);
showStatusBar(false);
addSlide(AppIntroFragment.newInstance("Hello", "world", R.drawable.bunny, Color.parseColor("#FFB300")));
}
@Override
public void onSkipPressed(Fragment currentFragment) {
super.onSkipPressed(currentFragment);
finish();
}
@Override
public void onDonePressed(Fragment currentFragment) {
super.onDonePressed(currentFragment);
finish();
}
}
Now the issue is pretty small. ie I cannot resolve layoutContainer
in Android Studio. What should I replace it with if I am using AppIntro2
? I searched the entire repo for layoutContainer
, however it is only seen in the readme file it seems.
Kindly help, 😃
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Transition of background-color - css - Stack Overflow
As far as I know, transitions currently work in Safari, Chrome, Firefox, Opera and Internet Explorer 10+. This should produce a fade effect ......
Read more >transition | CSS-Tricks
Specifying which properties to transition. Notice that we've called out the background-color property in the transition declaration.
Read more >How To - Transition on Hover - W3Schools
Learn how to add transition on hover with CSS. ... over a given duration. Add a transition effect (opacity and background color) to...
Read more >Background Color Animation With CSS (Simple Examples)
Use CSS transition to progressively change the background color. <div id="demo">Demo</div> · Use CSS keyframes to specify a sequence of ...
Read more >How to Add & Change Background Color in HTML
Scan your HTML code to pinpoint which element you'd like to change. If it's the header, look for the <header> opening tag. If...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I found a way to enable the transition colors, you need to put the
setColorTransitionsEnabled
totrue
@shaheenkdr Please close your own issues – no need to wait on us…