Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dark loading indicator page #47

Open
quochuy opened this issue Nov 13, 2018 · 4 comments
Open

Dark loading indicator page #47

quochuy opened this issue Nov 13, 2018 · 4 comments
Labels

Comments

@quochuy
Copy link

quochuy commented Nov 13, 2018

I have an app that uses a MenuBar template with items set with reloadOnSelect.
Every time I change view it reloads the content from an API and the loading indicator shows up. Each view has a dark theme but when the loading indicator shows, the background is bright.

Is it possible to set a dark background when the loader shows?

I thought of setting a class to the element and use CSS but it does not work either.

@emadalam
Copy link
Owner

@quochuy have you may be tried specifying a custom loaderTemplate with theme="dark"?

<!-- loaderTemplate -->
<document>
    <loadingTemplate theme="dark">
        <activityIndicator>
            <title>{{ message }}</title>
        </activityIndicator>
    </loadingTemplate>
</document>
ATV.start({
    templates: {
        loader: loaderTemplate,
        // ... other templates
    },
    // ... menu and other configs
});

References:

@quochuy
Copy link
Author

quochuy commented Nov 14, 2018

Hey @emadalam
I have tried

<document>
	<loadingTemplate theme="dark" class="darkBackgroundColor">
		<activityIndicator>
			<title>{{ message }}</title>
		</activityIndicator>
	</loadingTemplate>
</document>

And it didn't work

@emadalam
Copy link
Owner

Can you please share your sample code in a repo for me to have a look? There might be some other unrelated issue.

@quochuy
Copy link
Author

quochuy commented Nov 21, 2018

Hi @emadalam

I've forked your boiler plate and replicated the issue on the "darkbg" branch:
https://github.com/quochuy/appletv-boilerplate/tree/darkbg

All pages have theme="dark" and class="darkBackground".
Move from "Home" to "Movies" to see that the loader remains "light" despite having the same theme and class as other pages.

Regards
Huy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants