mirror of
https://github.com/TeamNewPipe/NewPipe.git
synced 2024-11-22 19:12:45 +01:00
Made changes for ICS and JB
This commit is contained in:
parent
9e76f94cf6
commit
9a1da5cc75
@ -73,8 +73,9 @@ public class ChannelActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
if (Objects.equals(PreferenceManager.getDefaultSharedPreferences(this)
|
if (PreferenceManager.getDefaultSharedPreferences(this)
|
||||||
.getString("theme", getResources().getString(R.string.light_theme_title)), getResources().getString(R.string.dark_theme_title))) {
|
.getString("theme", getResources().getString(R.string.light_theme_title)).
|
||||||
|
equals(getResources().getString(R.string.dark_theme_title))) {
|
||||||
setTheme(R.style.DarkTheme_NoActionBar);
|
setTheme(R.style.DarkTheme_NoActionBar);
|
||||||
}
|
}
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
@ -1,20 +1,18 @@
|
|||||||
package org.schabi.newpipe;
|
package org.schabi.newpipe;
|
||||||
|
|
||||||
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
import android.support.v7.app.AppCompatActivity;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
import static org.schabi.newpipe.R.attr.theme;
|
|
||||||
|
|
||||||
public class ThemableActivity extends AppCompatActivity {
|
public class ThemableActivity extends AppCompatActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
if (Objects.equals(PreferenceManager.getDefaultSharedPreferences(this)
|
if (PreferenceManager.getDefaultSharedPreferences(this)
|
||||||
.getString("theme", getResources().getString(R.string.light_theme_title)), getResources().getString(R.string.dark_theme_title))) {
|
.getString("theme", getResources().getString(R.string.light_theme_title)).
|
||||||
|
equals(getResources().getString(R.string.dark_theme_title))) {
|
||||||
setTheme(R.style.DarkTheme);
|
setTheme(R.style.DarkTheme);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -46,8 +46,9 @@ public class SettingsActivity extends PreferenceActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceBundle) {
|
protected void onCreate(Bundle savedInstanceBundle) {
|
||||||
if (Objects.equals(PreferenceManager.getDefaultSharedPreferences(this)
|
if (PreferenceManager.getDefaultSharedPreferences(this)
|
||||||
.getString("theme", getResources().getString(R.string.light_theme_title)), getResources().getString(R.string.dark_theme_title))) {
|
.getString("theme", getResources().getString(R.string.light_theme_title)).
|
||||||
|
equals(getResources().getString(R.string.dark_theme_title))) {
|
||||||
setTheme(R.style.DarkTheme);
|
setTheme(R.style.DarkTheme);
|
||||||
}
|
}
|
||||||
getDelegate().installViewFactory();
|
getDelegate().installViewFactory();
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
android:id="@+id/errorMessageView"
|
android:id="@+id/errorMessageView"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textColor="?android:attr/colorAccent"
|
android:textColor="?attr/colorAccent"
|
||||||
android:text="@string/info_labels"/>
|
android:text="@string/info_labels"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -63,7 +63,7 @@
|
|||||||
android:id="@+id/errorInfoLabelsView"
|
android:id="@+id/errorInfoLabelsView"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textColor="?android:attr/colorAccent"
|
android:textColor="?attr/colorAccent"
|
||||||
android:text="@string/info_labels"/>
|
android:text="@string/info_labels"/>
|
||||||
|
|
||||||
<HorizontalScrollView
|
<HorizontalScrollView
|
||||||
|
Loading…
Reference in New Issue
Block a user