Can anybody tell me why this isn't working? I want it to load a specific layout depending on what page is loaded. The if clause seems to be faulty. It's always going to the else.
     wordArray = getResources().getStringArray(resId);
     int resIdBack = getResources().getIdentifier(wordArray[5], "drawable", "com.bobgle.libretto");
    // If Background Image is dark use light theme, if not use dark theme.
    if(wordArray[5] == "libretto"){
        view = inflater.inflate(R.layout.activity_fragment_dark, container, false);
    } else {
        view = inflater.inflate(R.layout.activity_fragment_light, container, false);
    }
 
     
    