Skip to content

Commit

Permalink
Version 0.7.1, broken up the Enchiridion into separate parts to try t…
Browse files Browse the repository at this point in the history
…o mitigate crashing on Sony Xperia device.
  • Loading branch information
zikalify committed Jun 8, 2018
1 parent 54e0551 commit 2765fac
Show file tree
Hide file tree
Showing 20 changed files with 511 additions and 67 deletions.
Binary file modified .idea/caches/build_file_checksums.ser
Binary file not shown.
5 changes: 3 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ android {
applicationId "app.reading.stoic.stoicreading"
minSdkVersion 15
targetSdkVersion 27
versionCode 3
versionName "0.7"
versionCode 4
versionName "0.7.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand All @@ -18,6 +18,7 @@ android {
}
productFlavors {
}
sourceSets { main { assets.srcDirs = ['src/main/assets', 'src/main/assets/'] } }
}

dependencies {
Expand Down
7 changes: 6 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,12 @@
<activity android:name=".AureliusMeditations.AureliusMedBook_11" />
<activity android:name=".AureliusMeditations.AureliusMedBook_12" />
<activity android:name=".AureliusMeditations.AureliusMedBookHome" />
<activity android:name=".EpictetusEnchiridion.TheEnchiridion"></activity>
<activity android:name=".EpictetusEnchiridion.TheEnchiridionHome" />
<activity android:name=".EpictetusEnchiridion.TheEnchiridion_Part2" />
<activity android:name=".EpictetusEnchiridion.TheEnchiridion_Part1" />
<activity android:name=".EpictetusEnchiridion.TheEnchiridion_Part3" />
<activity android:name=".EpictetusEnchiridion.TheEnchiridion_Part4" />
<activity android:name=".EpictetusEnchiridion.TheEnchiridion_Part5"></activity>
</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ protected void onCreate(Bundle savedInstanceState) {
if (useDarkTheme) {
setTheme(R.style.AppThemeDark);
}

super.onCreate(savedInstanceState);
setContentView(R.layout.activity_aurelius_med_book_1);
setTitle(this.getString(R.string.AureliusMedTitle1));
Expand Down
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);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import app.reading.stoic.stoicreading.R;

public class TheEnchiridion extends AppCompatActivity {
public class TheEnchiridion_Part1 extends AppCompatActivity {
private static final String PREFS_NAME = "prefs";
private static final String PREF_DARK_THEME = "dark_theme";

Expand All @@ -19,7 +19,7 @@ protected void onCreate(Bundle savedInstanceState) {
setTheme(R.style.AppThemeDark);
}
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_the_enchiridion);
setTitle(this.getString(R.string.EpictetusEnchiridionTitle));
setContentView(R.layout.activity_the_enchiridion_part1);
setTitle(this.getString(R.string.EpictetusEncTitle1));
}
}
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));
}
}
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));
}
}
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));
}
}
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));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import android.view.View;
import android.widget.Button;

import app.reading.stoic.stoicreading.EpictetusEnchiridion.TheEnchiridion;
import app.reading.stoic.stoicreading.EpictetusEnchiridion.TheEnchiridionHome;

public class EpictetusHome extends AppCompatActivity {
private Button button;
Expand Down Expand Up @@ -38,7 +38,7 @@ public void onClick(View v) {

//Activity call methods, called by buttons above
public void EpictetusEnchiridion() {
Intent intent = new Intent(this, TheEnchiridion.class);
Intent intent = new Intent(this, TheEnchiridionHome.class);
startActivity(intent);
}
}
45 changes: 0 additions & 45 deletions app/src/main/res/layout/activity_the_enchiridion.xml

This file was deleted.

Loading

0 comments on commit 2765fac

Please sign in to comment.