Browse Source

Colors refactoring

pull/70/head
Ezerous 5 years ago
parent
commit
e96d0bd799
  1. 8
      app/src/main/java/gr/thmmy/mthmmy/base/BaseActivity.java
  2. 2
      app/src/main/java/gr/thmmy/mthmmy/base/BaseApplication.java
  3. 2
      app/src/main/res/layout/activity_about.xml
  4. 2
      app/src/main/res/layout/activity_settings.xml
  5. 6
      app/src/main/res/layout/activity_upload.xml
  6. 2
      app/src/main/res/layout/activity_upload_fields_builder.xml
  7. 2
      app/src/main/res/layout/activity_upload_filename_info_popup.xml
  8. 2
      app/src/main/res/layout/download_prompt_dialog.xml
  9. 2
      app/src/main/res/layout/fragment_bookmarks.xml
  10. 2
      app/src/main/res/layout/fragment_forum_board_row.xml
  11. 2
      app/src/main/res/layout/fragment_forum_category_row.xml
  12. 2
      app/src/main/res/layout/fragment_recent_row.xml
  13. 2
      app/src/main/res/layout/fragment_unread_row.xml
  14. 7
      app/src/main/res/values/colors.xml
  15. 6
      app/src/main/res/values/styles.xml

8
app/src/main/java/gr/thmmy/mthmmy/base/BaseActivity.java

@ -206,7 +206,7 @@ public abstract class BaseActivity extends AppCompatActivity {
*/
protected void createDrawer() {
final int primaryColor = ContextCompat.getColor(this, R.color.iron);
final int selectedPrimaryColor = ContextCompat.getColor(this, R.color.primary_dark);
final int selectedPrimaryColor = ContextCompat.getColor(this, R.color.primary_light);
final int selectedSecondaryColor = ContextCompat.getColor(this, R.color.accent);
PrimaryDrawerItem homeItem, bookmarksItem, settingsItem, aboutItem, shoutboxItem;
@ -361,7 +361,7 @@ public abstract class BaseActivity extends AppCompatActivity {
.withActivity(this)
.withCompactStyle(true)
.withSelectionListEnabledForSingleProfile(false)
.withHeaderBackground(R.color.primary)
.withHeaderBackground(R.color.primary_dark)
.withTextColor(getResources().getColor(R.color.iron))
.addProfiles(profileDrawerItem)
.withOnAccountHeaderListener((view, profile, currentProfile) -> {
@ -390,7 +390,7 @@ public abstract class BaseActivity extends AppCompatActivity {
.withActivity(this)
.withToolbar(toolbar)
.withDrawerWidthDp((int) BaseApplication.getInstance().getWidthInDp() / 2)
.withSliderBackgroundColor(ContextCompat.getColor(this, R.color.primary_light))
.withSliderBackgroundColor(ContextCompat.getColor(this, R.color.primary_lighter))
.withAccountHeader(accountHeader)
.withOnDrawerItemClickListener((view, position, drawerItem) -> {
if (drawerItem.equals(HOME_ID)) {
@ -494,7 +494,7 @@ public abstract class BaseActivity extends AppCompatActivity {
.icon(FontAwesome.Icon.faw_user)
.paddingDp(10)
.color(ContextCompat.getColor(this, R.color.iron))
.backgroundColor(ContextCompat.getColor(this, R.color.primary_light)));
.backgroundColor(ContextCompat.getColor(this, R.color.primary_lighter)));
}
//-------------------------------------------LOGOUT-------------------------------------------------

2
app/src/main/java/gr/thmmy/mthmmy/base/BaseApplication.java

@ -183,7 +183,7 @@ public class BaseApplication extends MultiDexApplication {
return new IconicsDrawable(ctx).icon(FontAwesome.Icon.faw_user)
.paddingDp(10)
.color(ContextCompat.getColor(ctx, R.color.iron))
.backgroundColor(ContextCompat.getColor(ctx, R.color.primary));
.backgroundColor(ContextCompat.getColor(ctx, R.color.primary_lighter));
}
return super.placeholder(ctx, tag);
}

2
app/src/main/res/layout/activity_about.xml

@ -28,7 +28,7 @@
android:id="@+id/scrollview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/primary_light"
android:background="@color/primary_lighter"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"

2
app/src/main/res/layout/activity_settings.xml

@ -28,7 +28,7 @@
android:id="@+id/pref_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/primary_light"
android:background="@color/primary_lighter"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>

6
app/src/main/res/layout/activity_upload.xml

@ -28,7 +28,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="top|start"
android:background="@color/primary_light"
android:background="@color/primary_lighter"
android:paddingStart="@dimen/activity_horizontal_margin"
android:paddingEnd="@dimen/activity_horizontal_margin"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
@ -37,7 +37,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/primary_light"
android:background="@color/primary_lighter"
android:focusableInTouchMode="true"
android:orientation="vertical">
@ -46,7 +46,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:background="@color/primary_light"
android:background="@color/primary_lighter"
android:orientation="vertical">
<gr.thmmy.mthmmy.views.AppCompatSpinnerWithoutDefault

2
app/src/main/res/layout/activity_upload_fields_builder.xml

@ -27,7 +27,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="top|start"
android:background="@color/primary_light"
android:background="@color/primary_lighter"
android:paddingEnd="@dimen/activity_horizontal_margin"
android:paddingStart="@dimen/activity_horizontal_margin"
app:layout_behavior="@string/appbar_scrolling_view_behavior"

2
app/src/main/res/layout/activity_upload_filename_info_popup.xml

@ -3,7 +3,7 @@
android:id="@+id/upload_filename_info_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/primary_light"
android:background="@color/primary_lighter"
android:linksClickable="true"
android:padding="8dp"
android:text="@string/upload_filename_info"

2
app/src/main/res/layout/download_prompt_dialog.xml

@ -3,7 +3,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/primary_light"
android:background="@color/primary_lighter"
android:padding="4dp">

2
app/src/main/res/layout/fragment_bookmarks.xml

@ -9,7 +9,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="top|start"
android:background="@color/primary_light"
android:background="@color/primary_lighter"
android:scrollbars="none"
app:layout_behavior="@string/appbar_scrolling_view_behavior">

2
app/src/main/res/layout/fragment_forum_board_row.xml

@ -2,7 +2,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/primary_lighter"
android:background="@color/primary_lighter_2"
android:orientation="vertical">
<TextView

2
app/src/main/res/layout/fragment_forum_category_row.xml

@ -3,7 +3,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@color/primary_light">
android:background="@color/primary_lighter">
<TextView
android:id="@+id/category"

2
app/src/main/res/layout/fragment_recent_row.xml

@ -8,7 +8,7 @@
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/primary_light"
android:background="@color/primary_lighter"
android:foreground="?android:attr/selectableItemBackground"
android:paddingBottom="6dp"
android:paddingLeft="10dp"

2
app/src/main/res/layout/fragment_unread_row.xml

@ -8,7 +8,7 @@
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/primary_light"
android:background="@color/primary_lighter"
android:foreground="?android:attr/selectableItemBackground"
android:paddingBottom="6dp"
android:paddingLeft="10dp"

7
app/src/main/res/values/colors.xml

@ -7,9 +7,10 @@
<!--Dark-->
<color name="primary">#2B2B2B</color>
<color name="primary_dark">#333333</color>
<color name="primary_light">#3C3C3C</color>
<color name="primary_lighter">#494949</color>
<color name="primary_light">#333333</color>
<color name="primary_lighter">#3C3C3C</color>
<color name="primary_lighter_2">#494949</color>
<color name="primary_dark">#222222</color>
<color name="accent">#26A69A</color>
<color name="primary_text">#E7E7E7</color>
<color name="secondary_text">#757575</color>

6
app/src/main/res/values/styles.xml

@ -2,7 +2,7 @@
<!-- Base Theme to also be inherited in v21 -->
<style name="BaseAppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">@color/primary</item>
<item name="colorPrimaryDark">@color/primary_dark</item>
<item name="colorPrimaryDark">@color/primary_light</item>
<item name="colorAccent">@color/accent</item>
<item name="android:textColorPrimary">@color/primary_text</item>
<item name="android:textColorSecondary">@color/secondary_text</item>
@ -36,7 +36,7 @@
</style>
<style name="PopupMenuStyle">
<item name="android:popupBackground">@color/primary_light</item>
<item name="android:popupBackground">@color/primary_lighter</item>
<item name="android:textAppearanceLargePopupMenu">@color/accent</item>
<item name="android:textAppearanceSmallPopupMenu">@color/accent</item>
</style>
@ -86,6 +86,6 @@
</style>
<style name="LightBackgroundColoredButton" parent="Widget.AppCompat.ImageButton">
<item name="colorButtonNormal">@color/primary_light</item>
<item name="colorButtonNormal">@color/primary_lighter</item>
</style>
</resources>

Loading…
Cancel
Save