Skip to content
Snippets Groups Projects
Commit cdf83927 authored by Ernir Erlingsson's avatar Ernir Erlingsson
Browse files

code nitpicks and color fix

parent 6ac999c1
No related branches found
No related tags found
No related merge requests found
......@@ -15,8 +15,12 @@
<color name="settings_title_text">#2D3E50</color>
<color name="settings_title_underline">#2D3E50</color>
<color name="briar_primary">#2D3E50</color>
<color name="briar_primary_dark">#0f1720</color>
<color name="briar_text_link">#2D3E50</color>
<color name="briar_green_light">#95d220</color>
<color name="briar_green_dark">#75ab0d</color>
<color name="briar_text_primary">#333333</color>
<color name="briar_text_primary_inverse">#ffffff</color>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="BriarTheme" parent="Theme.AppCompat.Light">
<style name="BriarTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="actionBarStyle">@style/BriarActionBar</item>
<item name="colorPrimary">@color/briar_green_light</item>
<item name="colorPrimaryDark">@color/briar_green_dark</item>
<item name="colorPrimary">@color/briar_primary</item>
<item name="colorPrimaryDark">@color/briar_primary_dark</item>
<item name="android:textColorPrimary">@color/briar_text_primary</item>
<item name="android:textColorPrimaryInverse">@color/briar_text_primary_inverse</item>
<item name="android:textColorSecondary">@color/briar_text_primary</item>
<item name="android:textColorLink">@color/briar_text_link</item>
<!-- The rest of your attributes -->
......@@ -15,14 +17,6 @@
<item name="elevation">1dp</item>
</style>
<style name="WindowTitle">
<item name="android:paddingLeft">5dp</item>
<item name="android:textColor">@color/action_bar_text</item>
</style>
<style name="WindowTitleBackground">
<item name="android:background">@color/action_bar_background</item>
</style>
<style name="BriarButton">
<item name="android:textSize">@dimen/text_size_medium</item>
<item name="android:padding">@dimen/margin_large</item>
......
......@@ -47,42 +47,42 @@ public abstract class BaseActivity extends AppCompatActivity implements RoboCont
@Override
public void onCreate(Bundle savedInstanceState) {
RoboInjector injector = RoboGuice.getInjector(this);
this.eventManager = (EventManager) injector.getInstance(EventManager.class);
eventManager = (EventManager) injector.getInstance(EventManager.class);
injector.injectMembersWithoutViews(this);
super.onCreate(savedInstanceState);
this.eventManager.fire(new OnCreateEvent(savedInstanceState));
eventManager.fire(new OnCreateEvent(savedInstanceState));
if (PREVENT_SCREENSHOTS) getWindow().addFlags(FLAG_SECURE);
}
protected void onRestart() {
super.onRestart();
this.eventManager.fire(new OnRestartEvent());
eventManager.fire(new OnRestartEvent());
}
protected void onStart() {
super.onStart();
this.eventManager.fire(new OnStartEvent());
eventManager.fire(new OnStartEvent());
}
protected void onResume() {
super.onResume();
this.eventManager.fire(new OnResumeEvent());
eventManager.fire(new OnResumeEvent());
}
protected void onPause() {
super.onPause();
this.eventManager.fire(new OnPauseEvent());
eventManager.fire(new OnPauseEvent());
}
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
this.eventManager.fire(new OnNewIntentEvent());
eventManager.fire(new OnNewIntentEvent());
}
protected void onStop() {
try {
this.eventManager.fire(new OnStopEvent());
eventManager.fire(new OnStopEvent());
} finally {
super.onStop();
}
......@@ -91,7 +91,7 @@ public abstract class BaseActivity extends AppCompatActivity implements RoboCont
protected void onDestroy() {
try {
this.eventManager.fire(new OnDestroyEvent());
eventManager.fire(new OnDestroyEvent());
} finally {
try {
RoboGuice.destroyInjector(this);
......@@ -103,25 +103,25 @@ public abstract class BaseActivity extends AppCompatActivity implements RoboCont
}
public void onConfigurationChanged(Configuration newConfig) {
Configuration currentConfig = this.getResources().getConfiguration();
Configuration currentConfig = getResources().getConfiguration();
super.onConfigurationChanged(newConfig);
this.eventManager.fire(new OnConfigurationChangedEvent(currentConfig, newConfig));
eventManager.fire(new OnConfigurationChangedEvent(currentConfig, newConfig));
}
public void onContentChanged() {
super.onContentChanged();
RoboGuice.getInjector(this).injectViewMembers(this);
this.eventManager.fire(new OnContentChangedEvent());
eventManager.fire(new OnContentChangedEvent());
}
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
this.eventManager.fire(new OnActivityResultEvent(requestCode, resultCode, data));
eventManager.fire(new OnActivityResultEvent(requestCode, resultCode, data));
}
@Override
public Map<Key<?>, Object> getScopedObjectMap() {
return this.scopedObjects;
return scopedObjects;
}
private SharedPreferences getBriarPrefs(String prefsName) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment