Project

General

Profile

« Previous | Next » 

Revision e8f3534d

Added by Leszek Koltunski 9 months ago

call setTheme before super() on all activities onCreate()

View differences:

src/main/AndroidManifest.xml
12 12
        android:allowBackup="true"
13 13
        android:icon="@mipmap/icon"
14 14
        android:label="@string/app_name"
15
        android:supportsRtl="true"
16
        android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
15
        android:supportsRtl="true">
17 16

  
18 17
        <meta-data
19 18
            android:name="firebase_crashlytics_collection_enabled"
src/main/java/org/distorted/bandaged/BandagedActivity.java
66 66
    @Override
67 67
    protected void onCreate(Bundle savedState)
68 68
      {
69
      setTheme(R.style.MaterialThemeNoActionBar);
69 70
      super.onCreate(savedState);
70 71

  
71 72
      Bundle b = getIntent().getExtras();
72 73
      mObjectOrdinal = (b != null) ? b.getInt("obj") : 0;
73 74

  
74 75
      DistortedLibrary.onCreate(ACTIVITY_NUMBER);
75
      setTheme(R.style.MaterialThemeNoActionBar);
76 76
      setContentView(R.layout.bandaged);
77 77

  
78 78
      DisplayMetrics displaymetrics = new DisplayMetrics();
src/main/java/org/distorted/config/ConfigActivity.java
56 56
    @Override
57 57
    protected void onCreate(Bundle savedState)
58 58
      {
59
      setTheme(R.style.MaterialThemeNoActionBar);
59 60
      super.onCreate(savedState);
60 61
      DistortedLibrary.onCreate(ACTIVITY_NUMBER);
61
      setTheme(R.style.MaterialThemeNoActionBar);
62 62
      setContentView(R.layout.config);
63 63

  
64 64
      Bundle b = getIntent().getExtras();
src/main/java/org/distorted/info/InfoActivity.java
49 49
    @Override
50 50
    protected void onCreate(Bundle savedState)
51 51
      {
52
      setTheme(R.style.MaterialThemeNoActionBar);
52 53
      super.onCreate(savedState);
53 54
      DistortedLibrary.onCreate(ACTIVITY_NUMBER);
54
      setTheme(R.style.MaterialThemeNoActionBar);
55 55
      setContentView(R.layout.info);
56 56

  
57 57
      Bundle b = getIntent().getExtras();
src/main/java/org/distorted/main/MainActivity.java
79 79
    @Override
80 80
    protected void onCreate(Bundle savedState)
81 81
      {
82
      super.onCreate(savedState);
83 82
      setTheme(R.style.MaterialThemeNoActionBar);
83
      super.onCreate(savedState);
84 84
      setContentView(R.layout.main);
85 85
      hideNavigationBar();
86 86

  
src/main/java/org/distorted/patternui/PatternActivity.java
59 59
    @Override
60 60
    protected void onCreate(Bundle savedState)
61 61
      {
62
      setTheme(R.style.MaterialThemeNoActionBar);
62 63
      super.onCreate(savedState);
63 64
      DistortedLibrary.onCreate(ACTIVITY_NUMBER);
64
      setTheme(R.style.MaterialThemeNoActionBar);
65 65
      setContentView(R.layout.pattern);
66 66
      hideNavigationBar();
67 67

  
src/main/java/org/distorted/playui/PlayActivity.java
70 70
    @Override
71 71
    protected void onCreate(Bundle savedState)
72 72
      {
73
      setTheme(R.style.MaterialThemeNoActionBar);
73 74
      super.onCreate(savedState);
74 75
      DistortedLibrary.onCreate(ACTIVITY_NUMBER);
75
      setTheme(R.style.MaterialThemeNoActionBar);
76 76
      setContentView(R.layout.play);
77 77

  
78 78
      mJustStarted = true;
src/main/java/org/distorted/purchase/PurchaseActivity.java
53 53
    @Override
54 54
    protected void onCreate(Bundle savedState)
55 55
      {
56
      setTheme(R.style.MaterialThemeNoActionBar);
56 57
      super.onCreate(savedState);
57 58
      DistortedLibrary.onCreate(ACTIVITY_NUMBER);
58
      setTheme(R.style.MaterialThemeNoActionBar);
59 59
      setContentView(R.layout.purchase);
60 60

  
61 61
      Bundle b = getIntent().getExtras();
src/main/java/org/distorted/solverui/SolverActivity.java
64 64
    @Override
65 65
    protected void onCreate(Bundle savedState)
66 66
      {
67
      setTheme(R.style.MaterialThemeNoActionBar);
67 68
      super.onCreate(savedState);
68 69
      DistortedLibrary.onCreate(ACTIVITY_NUMBER);
69
      setTheme(R.style.MaterialThemeNoActionBar);
70 70
      setContentView(R.layout.solver);
71 71
      hideNavigationBar();
72 72

  
src/main/java/org/distorted/tutorials/TutorialActivity.java
58 58
    @Override
59 59
    protected void onCreate(Bundle savedState)
60 60
      {
61
      setTheme(R.style.MaterialThemeNoActionBar);
61 62
      super.onCreate(savedState);
62 63
      DistortedLibrary.onCreate(ACTIVITY_NUMBER);
63
      setTheme(R.style.MaterialThemeNoActionBar);
64 64

  
65 65
      try
66 66
        {
src/main/res/values/styles.xml
1 1
<resources>
2 2

  
3
    <!-- Base application theme. -->
4
    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
5
        <!-- Customize your theme here. -->
6
        <item name="colorPrimary">@color/colorPrimary</item>
7
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
8
        <item name="colorAccent">@color/colorAccent</item>
9
    </style>
10

  
11
    <style name="CustomActivityThemeNoActionBar" parent="@style/Theme.AppCompat.NoActionBar">
12
        <item name="android:windowNoTitle">true</item>
13
        <item name="android:windowActionBar">false</item>
14
        <item name="android:windowFullscreen">true</item>
15
        <item name="android:windowContentOverlay">@null</item>
16
    </style>
17

  
18 3
   <style name="MaterialThemeNoActionBar" parent="@style/Theme.MaterialComponents.NoActionBar">
19 4
        <item name="tabBackground">@drawable/tab_background</item>
20 5
        <item name="tabIndicatorHeight">0dp</item>

Also available in: Unified diff