Skip to content

Handle when header color is White #13

Open
@Sampath-Lokuge

Description

@Sampath-Lokuge

Hi,
This is really nice work.Thanks for the project.
I have 2 questions:

  1. How can I handle when header color is White? Because text color is also white, we cannot see the items in the status bar.

  2. Can we use your option for Android and native status bar plugin for iOS devices on the same project?

Activity

jeneser

jeneser commented on Jun 28, 2017

@jeneser
Owner

How can I handle when header color is White? Because text color is also white, we cannot see the items in the status bar.

Android 5.0, We are able to change only status bar color not status bar text color. Android Lollipop Set Status Bar Text Color
If you use API 23, There's a solution here. API 23 status bar color is White
I'm not sure. Can it work perfectly in ionic? I can't give a solution to you. I need to know more and do more testing. If you find the solution, I'm happy to accept a pull request.

Can we use your option for Android and native status bar plugin for iOS devices on the same project?

Of course.
I can answer your question now. A pr merged: Platform separately: Each platform does not affect each other.
I did some work to make all the code only act on android platform. The code is harmless!
E.g:

// src/app/app.component.ts
if (this.platform.is('android')) {
	this.statusBar.backgroundColorByHexString("#33000000");
}
/* src/app/app.scss */
.platform-android {
  page-home, page-language-details {
    @extend %super-bar;
  }
}

I use this.platform.is('android') and .platform-android selector to get information about current device. So that the code only acts on android device. More information, please check the source code.
Are you satisfied with these answers?😀

Sampath-Lokuge

Sampath-Lokuge commented on Jun 29, 2017

@Sampath-Lokuge
Author

Thanks a lot @jeneser
I'll try to implement your solution later today and will let you know if I'll have any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @Sampath-Lokuge@jeneser

        Issue actions

          Handle when header color is White · Issue #13 · jeneser/ionic-super-bar