-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Version 0.7.1, broken up the Enchiridion into separate parts to try t…
…o mitigate crashing on Sony Xperia device.
- Loading branch information
Showing
20 changed files
with
511 additions
and
67 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
97 changes: 97 additions & 0 deletions
97
...src/main/java/app/reading/stoic/stoicreading/EpictetusEnchiridion/TheEnchiridionHome.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
package app.reading.stoic.stoicreading.EpictetusEnchiridion; | ||
|
||
import android.content.Intent; | ||
import android.content.SharedPreferences; | ||
import android.support.v7.app.AppCompatActivity; | ||
import android.os.Bundle; | ||
import android.view.View; | ||
import android.widget.Button; | ||
|
||
import app.reading.stoic.stoicreading.R; | ||
|
||
|
||
public class TheEnchiridionHome extends AppCompatActivity { | ||
private Button button; | ||
private static final String PREFS_NAME = "prefs"; | ||
private static final String PREF_DARK_THEME = "dark_theme"; | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
SharedPreferences preferences = getSharedPreferences(PREFS_NAME, MODE_PRIVATE); | ||
boolean useDarkTheme = preferences.getBoolean(PREF_DARK_THEME, false); | ||
|
||
if (useDarkTheme) { | ||
setTheme(R.style.AppThemeDark); | ||
} | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_the_enchiridion_home); | ||
setTitle(this.getString(R.string.EpictetusEnchiridionTitle)); | ||
|
||
//Call each activity when click corresponding button | ||
button = findViewById(R.id.enchiridion_part_1); | ||
button.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
TheEnchiridion_Part1(); | ||
} | ||
}); | ||
|
||
button = findViewById(R.id.enchiridion_part_2); | ||
button.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
TheEnchiridion_Part2(); | ||
} | ||
}); | ||
|
||
button = findViewById(R.id.enchiridion_part_3); | ||
button.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
TheEnchiridion_Part3(); | ||
} | ||
}); | ||
|
||
button = findViewById(R.id.enchiridion_part_4); | ||
button.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
TheEnchiridion_Part4(); | ||
} | ||
}); | ||
|
||
button = findViewById(R.id.enchiridion_part_5); | ||
button.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
TheEnchiridion_Part5(); | ||
} | ||
}); | ||
} | ||
|
||
//Activity call methods, called by buttons above | ||
public void TheEnchiridion_Part1() { | ||
Intent intent = new Intent(this, TheEnchiridion_Part1.class); | ||
startActivity(intent); | ||
} | ||
|
||
public void TheEnchiridion_Part2() { | ||
Intent intent = new Intent(this, TheEnchiridion_Part2.class); | ||
startActivity(intent); | ||
} | ||
|
||
public void TheEnchiridion_Part3() { | ||
Intent intent = new Intent(this, TheEnchiridion_Part3.class); | ||
startActivity(intent); | ||
} | ||
|
||
public void TheEnchiridion_Part4() { | ||
Intent intent = new Intent(this, TheEnchiridion_Part4.class); | ||
startActivity(intent); | ||
} | ||
|
||
public void TheEnchiridion_Part5() { | ||
Intent intent = new Intent(this, TheEnchiridion_Part5.class); | ||
startActivity(intent); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...c/main/java/app/reading/stoic/stoicreading/EpictetusEnchiridion/TheEnchiridion_Part2.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package app.reading.stoic.stoicreading.EpictetusEnchiridion; | ||
|
||
import android.content.SharedPreferences; | ||
import android.support.v7.app.AppCompatActivity; | ||
import android.os.Bundle; | ||
|
||
import app.reading.stoic.stoicreading.R; | ||
|
||
public class TheEnchiridion_Part2 extends AppCompatActivity { | ||
private static final String PREFS_NAME = "prefs"; | ||
private static final String PREF_DARK_THEME = "dark_theme"; | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
SharedPreferences preferences = getSharedPreferences(PREFS_NAME, MODE_PRIVATE); | ||
boolean useDarkTheme = preferences.getBoolean(PREF_DARK_THEME, false); | ||
|
||
if (useDarkTheme) { | ||
setTheme(R.style.AppThemeDark); | ||
} | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_the_enchiridion_part2); | ||
setTitle(this.getString(R.string.EpictetusEncTitle2)); | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
...c/main/java/app/reading/stoic/stoicreading/EpictetusEnchiridion/TheEnchiridion_Part3.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package app.reading.stoic.stoicreading.EpictetusEnchiridion; | ||
|
||
import android.content.SharedPreferences; | ||
import android.support.v7.app.AppCompatActivity; | ||
import android.os.Bundle; | ||
|
||
import app.reading.stoic.stoicreading.R; | ||
|
||
public class TheEnchiridion_Part3 extends AppCompatActivity { | ||
private static final String PREFS_NAME = "prefs"; | ||
private static final String PREF_DARK_THEME = "dark_theme"; | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
SharedPreferences preferences = getSharedPreferences(PREFS_NAME, MODE_PRIVATE); | ||
boolean useDarkTheme = preferences.getBoolean(PREF_DARK_THEME, false); | ||
|
||
if (useDarkTheme) { | ||
setTheme(R.style.AppThemeDark); | ||
} | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_the_enchiridion_part3); | ||
setTitle(this.getString(R.string.EpictetusEncTitle3)); | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
...c/main/java/app/reading/stoic/stoicreading/EpictetusEnchiridion/TheEnchiridion_Part4.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package app.reading.stoic.stoicreading.EpictetusEnchiridion; | ||
|
||
import android.content.SharedPreferences; | ||
import android.support.v7.app.AppCompatActivity; | ||
import android.os.Bundle; | ||
|
||
import app.reading.stoic.stoicreading.R; | ||
|
||
public class TheEnchiridion_Part4 extends AppCompatActivity { | ||
private static final String PREFS_NAME = "prefs"; | ||
private static final String PREF_DARK_THEME = "dark_theme"; | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
SharedPreferences preferences = getSharedPreferences(PREFS_NAME, MODE_PRIVATE); | ||
boolean useDarkTheme = preferences.getBoolean(PREF_DARK_THEME, false); | ||
|
||
if (useDarkTheme) { | ||
setTheme(R.style.AppThemeDark); | ||
} | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_the_enchiridion_part4); | ||
setTitle(this.getString(R.string.EpictetusEncTitle4)); | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
...c/main/java/app/reading/stoic/stoicreading/EpictetusEnchiridion/TheEnchiridion_Part5.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package app.reading.stoic.stoicreading.EpictetusEnchiridion; | ||
|
||
import android.content.SharedPreferences; | ||
import android.support.v7.app.AppCompatActivity; | ||
import android.os.Bundle; | ||
|
||
import app.reading.stoic.stoicreading.R; | ||
|
||
public class TheEnchiridion_Part5 extends AppCompatActivity { | ||
private static final String PREFS_NAME = "prefs"; | ||
private static final String PREF_DARK_THEME = "dark_theme"; | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
SharedPreferences preferences = getSharedPreferences(PREFS_NAME, MODE_PRIVATE); | ||
boolean useDarkTheme = preferences.getBoolean(PREF_DARK_THEME, false); | ||
|
||
if (useDarkTheme) { | ||
setTheme(R.style.AppThemeDark); | ||
} | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_the_enchiridion_part5); | ||
setTitle(this.getString(R.string.EpictetusEncTitle5)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.