Hi everyone, my app is showing black screen when minimized and reopened on 
Tecno android phone with custom OS (HiOS) but works well on other brands we 
have tested on.

Main class: 
package com.xdplax.playsafe;

import com.codename1.notifications.LocalNotificationCallback;
import com.codename1.ui.Display;
import com.codename1.ui.Form;
import com.codename1.ui.Dialog;
import com.codename1.ui.FontImage;
import com.codename1.ui.plaf.UIManager;
import com.codename1.ui.util.Resources;
import com.codename1.ui.plaf.DefaultLookAndFeel;
import com.codename1.ui.plaf.Style;
import com.xdplax.playsafe.model.Reminder;
import com.xdplax.playsafe.model.Settings;
import com.xdplax.playsafe.ui.HomeScreen;

/**
 *
 * @author CHiBEX
 */
public class PlaySafe implements LocalNotificationCallback {

    private Form current;
    private Resources theme;

    public void init(Object context) {
        theme = UIManager.initFirstTheme("/theme");
        
        new Reminder().getPropertyIndex().registerExternalizable();
        new Settings().getPropertyIndex().registerExternalizable();
        
        Style s = new Style();
        s.setFgColor(0xe91e63);
        s.setBgTransparency(0);
        ((DefaultLookAndFeel) UIManager.getInstance().getLookAndFeel()).
                setComboBoxImage(FontImage.createMaterial(FontImage.
MATERIAL_ARROW_DROP_DOWN, s, 5F));
    }
    
    public void start() {
        if(current != null){
            current.show();
            current.forceRevalidate();
            return;
        }
        HomeScreen homeScreen = new HomeScreen();
        homeScreen.show();
    }

    public void stop() {
        current = Display.getInstance().getCurrent();
        if(current instanceof Dialog) {
            ((Dialog)current).dispose();
            current = Display.getInstance().getCurrent();
        }
    }
    
    public void destroy() {
    }
    
    @Override
    public void localNotificationReceived(String notificationId) {
        theme = UIManager.initFirstTheme("/theme");
        
        Dialog.show("Noti", notificationId, "OK", null);
        System.out.println("Received local notification "+notificationId);
    }
}


One of the attached screenshots shows the app in good condition while the 
other shows the black screen.


Please your assistance is highly appreciated.

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/ecd4b5ad-0719-4b3f-a3cd-740e0071f660%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to