Added Dark Theme
This commit is contained in:
parent
a2e4585fe8
commit
60dc19d2bc
21 changed files with 318 additions and 256 deletions
|
|
@ -47,8 +47,8 @@ public class SettingsActivity extends PreferenceActivity {
|
|||
@Override
|
||||
protected void onCreate(Bundle savedInstanceBundle) {
|
||||
if (Objects.equals(PreferenceManager.getDefaultSharedPreferences(this)
|
||||
.getString("theme", "1"), "0")) {
|
||||
setTheme(R.style.DarkTheme);
|
||||
.getString("theme", getResources().getString(R.string.light_theme_title)), getResources().getString(R.string.dark_theme_title))) {
|
||||
setTheme(R.style.DarkTheme);
|
||||
}
|
||||
getDelegate().installViewFactory();
|
||||
getDelegate().onCreate(savedInstanceBundle);
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ import org.schabi.newpipe.App;
|
|||
import org.schabi.newpipe.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Objects;
|
||||
|
||||
import info.guardianproject.netcipher.proxy.OrbotHelper;
|
||||
|
||||
|
|
@ -67,7 +68,7 @@ public class SettingsFragment extends PreferenceFragment
|
|||
private Preference downloadPathAudioPreference;
|
||||
private Preference themePreference;
|
||||
private SharedPreferences defaultPreferences;
|
||||
|
||||
private Preference themePreference;
|
||||
|
||||
@Override
|
||||
public void onCreate(final Bundle savedInstanceState) {
|
||||
|
|
@ -86,6 +87,7 @@ public class SettingsFragment extends PreferenceFragment
|
|||
DOWNLOAD_PATH_AUDIO_PREFERENCE = getString(R.string.download_path_audio_key);
|
||||
THEME = getString(R.string.theme_key);
|
||||
USE_TOR_KEY = getString(R.string.use_tor_key);
|
||||
THEME = getString(R.string.theme_key);
|
||||
|
||||
// get pref objects
|
||||
defaultResolutionPreference =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue