File tree Expand file tree Collapse file tree 3 files changed +3
-2
lines changed
app/src/main/java/com/vansuita/materialabout/sample Expand file tree Collapse file tree 3 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ public class ActivitySample extends AppCompatActivity {
1515 protected void onCreate (Bundle savedInstanceState ) {
1616 super .onCreate (savedInstanceState );
1717
18+ setTheme (SampleHelper .theme );
1819 setContentView (R .layout .sample_view );
1920 SampleHelper .with (this ).init ().loadAbout ();
2021 }
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ public class FragmentActivitySample extends AppCompatActivity {
2020 @ Override
2121 protected void onCreate (@ Nullable Bundle savedInstanceState ) {
2222 super .onCreate (savedInstanceState );
23+ setTheme (SampleHelper .theme );
2324 setContentView (new LinearLayout (this ));
2425
2526 getSupportFragmentManager ()
Original file line number Diff line number Diff line change 1515public class SampleHelper implements View .OnClickListener {
1616
1717 private Activity activity ;
18- private int theme = R .style .AppThemeDark ;
18+ public static int theme = R .style .AppThemeDark ;
1919
2020 private SampleHelper (Activity activity ) {
2121 this .activity = activity ;
@@ -26,7 +26,6 @@ public static SampleHelper with(Activity activity) {
2626 }
2727
2828 public SampleHelper init () {
29- activity .setTheme (theme );
3029
3130 activity .findViewById (R .id .dark ).setOnClickListener (this );
3231 activity .findViewById (R .id .light ).setOnClickListener (this );
You can’t perform that action at this time.
0 commit comments