diff --git a/app/src/androidTest/java/org/bspeice/minimalbible/DownloadActivityTest.java b/app/src/androidTest/java/org/bspeice/minimalbible/DownloadActivityTest.java index ad245a3..3729f3e 100644 --- a/app/src/androidTest/java/org/bspeice/minimalbible/DownloadActivityTest.java +++ b/app/src/androidTest/java/org/bspeice/minimalbible/DownloadActivityTest.java @@ -1,10 +1,12 @@ package org.bspeice.minimalbible; -import android.content.Intent; import android.test.ActivityInstrumentationTestCase2; -import android.test.ActivityUnitTestCase; import android.util.Log; +import org.bspeice.minimalbible.activity.download.DownloadActivity; + +import java.lang.reflect.Field; + /** * Created by Bradlee Speice on 7/5/2014. */ @@ -12,7 +14,8 @@ import android.util.Log; on using an activity that sets up any underlying fragments (includes navigation drawers). The ActivityUnitTestCase doesn't set up enough of the Activity lifecycle. */ -public class DownloadActivityTest extends ActivityInstrumentationTestCase2 { +public class DownloadActivityTest extends + ActivityInstrumentationTestCase2 { public DownloadActivityTest() { super(DownloadActivity.class); @@ -22,7 +25,17 @@ public class DownloadActivityTest extends ActivityInstrumentationTestCase2 diff --git a/app/src/main/java/org/bspeice/minimalbible/MinimalBibleModules.java b/app/src/main/java/org/bspeice/minimalbible/MinimalBibleModules.java index 8a971fc..50a3694 100644 --- a/app/src/main/java/org/bspeice/minimalbible/MinimalBibleModules.java +++ b/app/src/main/java/org/bspeice/minimalbible/MinimalBibleModules.java @@ -2,6 +2,8 @@ package org.bspeice.minimalbible; import android.app.Application; +import org.bspeice.minimalbible.activity.download.DownloadActivity; + import javax.inject.Singleton; import dagger.Module; @@ -24,7 +26,7 @@ public class MinimalBibleModules { return app; } - @Provides String provideString() { + @Provides CharSequence provideString() { return "Main"; } } diff --git a/app/src/main/java/org/bspeice/minimalbible/DownloadActivity.java b/app/src/main/java/org/bspeice/minimalbible/activity/download/DownloadActivity.java similarity index 93% rename from app/src/main/java/org/bspeice/minimalbible/DownloadActivity.java rename to app/src/main/java/org/bspeice/minimalbible/activity/download/DownloadActivity.java index f047bd8..ddd11aa 100644 --- a/app/src/main/java/org/bspeice/minimalbible/DownloadActivity.java +++ b/app/src/main/java/org/bspeice/minimalbible/activity/download/DownloadActivity.java @@ -1,4 +1,4 @@ -package org.bspeice.minimalbible; +package org.bspeice.minimalbible.activity.download; import android.app.Activity; import android.os.Bundle; @@ -14,6 +14,10 @@ import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; +import org.bspeice.minimalbible.MinimalBible; +import org.bspeice.minimalbible.NavigationDrawerFragment; +import org.bspeice.minimalbible.R; + import javax.inject.Inject; @@ -28,9 +32,10 @@ public class DownloadActivity extends ActionBarActivity /** * Used to store the last screen title. For use in {@link #restoreActionBar()}. */ - private CharSequence mTitle; + protected CharSequence mTitle; - @Inject String actionTitle; + //TODO: This will need to be refactored out later, for now it's a proof of concept. + @Inject CharSequence testInject; @Override protected void onCreate(Bundle savedInstanceState) { @@ -44,7 +49,6 @@ public class DownloadActivity extends ActionBarActivity mNavigationDrawerFragment = (NavigationDrawerFragment) getSupportFragmentManager().findFragmentById(R.id.navigation_drawer); mTitle = getTitle(); - Log.w("DownloadActivity", "Title: " + mTitle.toString()); // Set up the drawer. mNavigationDrawerFragment.setUp( diff --git a/app/src/testConfig/java/org/bspeice/minimalbible/TestModules.java b/app/src/testConfig/java/org/bspeice/minimalbible/TestModules.java index f534cda..53bf3a0 100644 --- a/app/src/testConfig/java/org/bspeice/minimalbible/TestModules.java +++ b/app/src/testConfig/java/org/bspeice/minimalbible/TestModules.java @@ -1,5 +1,7 @@ package org.bspeice.minimalbible; +import org.bspeice.minimalbible.activity.download.DownloadActivity; + import dagger.Module; import dagger.Provides; @@ -10,7 +12,8 @@ import dagger.Provides; overrides = true) public class TestModules { - @Provides String provideString() { - return "Test"; + public static CharSequence testActivityTitle = "Test"; + @Provides CharSequence provideString() { + return testActivityTitle; } } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 8c0fb64..0087cd3 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 1e61d1f..da39622 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Wed Apr 10 15:27:10 PDT 2013 +#Sun Jul 06 17:56:45 EDT 2014 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-1.12-bin.zip diff --git a/gradlew b/gradlew old mode 100644 new mode 100755