mirror of
https://github.com/MinimalBible/MinimalBible
synced 2025-08-29 02:34:45 -04:00
PoC using reflection
Test will need to be something more meaningful later.
This commit is contained in:
@ -9,7 +9,7 @@
|
||||
android:theme="@style/AppTheme"
|
||||
android:name=".MinimalBible" >
|
||||
<activity
|
||||
android:name=".DownloadActivity"
|
||||
android:name=".activity.download.DownloadActivity"
|
||||
android:label="@string/app_name" >
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
@ -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";
|
||||
}
|
||||
}
|
||||
|
@ -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(
|
Reference in New Issue
Block a user