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

RTApi methods in onCreate Method affects the activity performace (Black screen for sometime before activity start) #25

Closed
rajazeeshanahmed opened this issue Nov 13, 2015 · 1 comment

Comments

@rajazeeshanahmed
Copy link

Here is my code

protected void onCreate(Bundle savedInstanceState) {
setTheme(R.style.ThemeLight);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_app_form);
RTApi rtApi = new RTApi(this, new RTProxyImpl(this), new RTMediaFactoryImpl(this, true));
rtManager = new RTManager(rtApi, savedInstanceState);
ViewGroup toolbarContainer = (ViewGroup) findViewById(R.id.rte_toolbar_container);
RTToolbar rtToolbar0 = (RTToolbar) findViewById(R.id.rte_toolbar);
if (rtToolbar0 != null) {
rtManager.registerToolbar(toolbarContainer, rtToolbar0);
}

    RTToolbar rtToolbar1 = (RTToolbar) findViewById(R.id.rte_toolbar_character);
    if (rtToolbar1 != null) {
        rtManager.registerToolbar(toolbarContainer, rtToolbar1);
    }

    // register toolbar 2 (if it exists)
    RTToolbar rtToolbar2 = (RTToolbar) findViewById(R.id.rte_toolbar_paragraph);
    if (rtToolbar2 != null) {
        rtManager.registerToolbar(toolbarContainer, rtToolbar2);
    }
    initialize();
}

When i start this activity, A black empty screen become appear for 4-5 seconds and then activity starts. Is there any problem in my implementation?

@rajazeeshanahmed rajazeeshanahmed changed the title RTApi methods in onCreate Method affects the activity performace RTApi methods in onCreate Method affects the activity performace (Black screen for sometime before activity start) Nov 13, 2015
@1gravity
Copy link
Owner

I'm fairly certain, it's not the RTApi methods, RTApi is just a proxy and doesn't do much of its own. Inflating the layout with the icons is what takes time on certain devices. The only way to get around that is to use other icons with lower resolution or use less icons.

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

No branches or pull requests

2 participants