Skip to content

Commit

Permalink
Added explicit color attributes for text + card colors.
Browse files Browse the repository at this point in the history
On different devices, the default colors may be different- dependent on a device's default color scheme and dark/light settings.

Specifying explicit colors prevents elements from showing up in different colors across devices.
  • Loading branch information
andrewvora committed Oct 18, 2018
1 parent 17c35fb commit fb9ef6f
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 12 deletions.
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ android {
applicationId "com.andrewvora.apps.rideatlanta"
minSdkVersion 21
targetSdkVersion 26
versionCode 3
versionName "1.2.0"
versionCode 4
versionName "1.2.1"
testInstrumentationRunner "com.andrewvora.apps.rideatlanta.testing.RideAtlantaTestRunner"
}

Expand Down Expand Up @@ -85,7 +85,7 @@ dependencies {
kapt "com.google.dagger:dagger-android-processor:$dagger_version"
implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofit_version"
implementation 'com.google.code.gson:gson:2.8.0'
implementation 'com.google.code.gson:gson:2.8.2'

// dev
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/layout/activity_route_details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
android:id="@+id/fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/toolbar_height"/>
android:layout_marginTop="@dimen/toolbar_height"
android:background="@color/md_white_1000"/>

<android.support.v7.widget.Toolbar
style="@style/LowElevationStyle"
Expand Down
6 changes: 4 additions & 2 deletions app/src/main/res/layout/activity_see_and_say.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/toolbar_height">
android:layout_marginTop="@dimen/toolbar_height"
android:fillViewport="true">

<LinearLayout
android:layout_width="match_parent"
Expand All @@ -26,7 +27,8 @@
android:paddingStart="@dimen/activity_horizontal_margin"
android:paddingEnd="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin">
android:paddingBottom="@dimen/activity_vertical_margin"
android:background="@color/md_white_1000">

<TextView
style="@style/BaseTextViewStyle"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/element_home_alert_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
android:layout_marginEnd="16dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:background="@color/md_white_1000"
app:cardBackgroundColor="@color/md_white_1000"
app:contentPadding="12dp">

<RelativeLayout
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/element_home_info_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
android:layout_marginEnd="16dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="12dp"
android:background="@color/md_white_1000"
app:cardBackgroundColor="@color/md_white_1000"
app:contentPadding="12dp">

<LinearLayout
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/element_home_route_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
android:layout_marginEnd="16dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:background="@color/md_white_1000"
app:cardBackgroundColor="@color/md_white_1000"
app:contentPadding="12dp">

<RelativeLayout
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/layout/fragment_bus_routes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/text_no_buses_running"/>
android:text="@string/text_no_buses_running"
android:textColor="@color/md_grey_700"/>

</LinearLayout>

Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/layout/fragment_favorite_routes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/text_no_favorited_routes"/>
android:text="@string/text_no_favorited_routes"
android:textColor="@color/md_grey_700"/>

</LinearLayout>

Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/layout/fragment_train_routes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/text_no_trains_running"/>
android:text="@string/text_no_trains_running"
android:textColor="@color/md_grey_700"/>

</LinearLayout>

Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

<style name="RouteTitleTextStyle" parent="BaseTextViewStyle">
<item name="android:textSize">@dimen/train_title_text_size</item>
<item name="android:maxLines">1</item>
<item name="android:ellipsize">end</item>
</style>

Expand Down

0 comments on commit fb9ef6f

Please sign in to comment.