Skip to content

Commit 559ac21

Browse files
committed
Select the longest composition, fix some dark mode issues, fix some dependency issues, bump version numbers, remove firebase performance monitoring
1 parent 455522d commit 559ac21

File tree

13 files changed

+69
-84
lines changed

13 files changed

+69
-84
lines changed

Hyperrail/build.gradle

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ apply plugin: 'com.google.gms.google-services'
99
apply plugin: 'com.google.firebase.crashlytics'
1010

1111
def VERSION_CODE = 54
12-
def VERSION_NAME = '1.2.3'
12+
def VERSION_NAME = '1.3.0'
1313

1414
android {
1515
compileSdkVersion 31
@@ -44,21 +44,21 @@ android {
4444
}
4545

4646
dependencies {
47-
implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
47+
implementation 'androidx.constraintlayout:constraintlayout:2.1.2'
4848
implementation 'com.google.android.gms:play-services-maps:18.0.0'
4949
implementation fileTree(include: ['*.jar'], dir: 'libs')
5050

5151

5252
implementation 'com.android.volley:volley:1.2.1@aar'
5353
implementation 'joda-time:joda-time:2.10.3'
54-
implementation 'androidx.appcompat:appcompat:1.3.1'
54+
implementation 'androidx.appcompat:appcompat:1.4.0'
5555
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
5656
implementation 'androidx.cardview:cardview:1.0.0'
5757
implementation 'androidx.recyclerview:recyclerview:1.2.1'
5858
implementation 'com.google.android.material:material:1.4.0'
5959
implementation 'com.google.android.gms:play-services-location:18.0.0'
6060
implementation 'com.squareup.picasso:picasso:2.71828'
61-
implementation 'com.google.firebase:firebase-crashlytics:18.2.4'
61+
implementation 'com.google.firebase:firebase-crashlytics:18.2.5'
6262

6363
testImplementation 'junit:junit:4.13.2'
6464
testImplementation 'org.json:json:20200518'

Hyperrail/src/main/java/be/hyperrail/android/activities/FirstLaunchGuide.java

-5
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import android.view.MenuItem;
2323
import android.view.View;
2424
import android.view.ViewGroup;
25-
import android.view.Window;
2625
import android.widget.Button;
2726
import android.widget.ImageView;
2827
import android.widget.TextView;
@@ -31,7 +30,6 @@
3130
import androidx.annotation.NonNull;
3231
import androidx.annotation.Nullable;
3332
import androidx.appcompat.app.AppCompatActivity;
34-
import androidx.core.view.WindowCompat;
3533
import androidx.fragment.app.Fragment;
3634
import androidx.fragment.app.FragmentManager;
3735
import androidx.fragment.app.FragmentPagerAdapter;
@@ -57,9 +55,6 @@ protected void onCreate(Bundle savedInstanceState) {
5755
super.onCreate(savedInstanceState);
5856
setContentView(R.layout.activity_first_launch_guide);
5957

60-
Window window = getWindow();
61-
WindowCompat.setDecorFitsSystemWindows(window, false);
62-
6358
// Create the adapter that will return a fragment for each of the three
6459
// primary sections of the activity.
6560
SectionsPagerAdapter mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager());

Hyperrail/src/main/java/be/hyperrail/android/activities/MainActivity.java

-26
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@
3838
import android.view.MenuInflater;
3939
import android.view.MenuItem;
4040
import android.view.View;
41-
import android.view.ViewGroup;
42-
import android.view.Window;
4341

4442
import androidx.annotation.ColorRes;
4543
import androidx.annotation.IntDef;
@@ -49,11 +47,7 @@
4947
import androidx.appcompat.app.AppCompatActivity;
5048
import androidx.appcompat.widget.Toolbar;
5149
import androidx.core.content.ContextCompat;
52-
import androidx.core.graphics.Insets;
5350
import androidx.core.view.GravityCompat;
54-
import androidx.core.view.ViewCompat;
55-
import androidx.core.view.WindowCompat;
56-
import androidx.core.view.WindowInsetsCompat;
5751
import androidx.drawerlayout.widget.DrawerLayout;
5852
import androidx.fragment.app.Fragment;
5953

@@ -129,26 +123,6 @@ protected void onCreate(Bundle savedInstanceState) {
129123

130124
PreferenceManager.setDefaultValues(this, R.xml.pref_general, false);
131125

132-
Window window = getWindow();
133-
WindowCompat.setDecorFitsSystemWindows(window, false);
134-
ViewCompat.setOnApplyWindowInsetsListener(vLayoutRoot, (v, windowInsets) -> {
135-
Insets insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars());
136-
// Apply the insets as a margin to the view. Here the system is setting
137-
// only the bottom, left, and right dimensions, but apply whichever insets are
138-
// appropriate to your layout. You can also update the view padding
139-
// if that's more appropriate.
140-
ViewGroup.MarginLayoutParams mlp = (ViewGroup.MarginLayoutParams) v.getLayoutParams();
141-
mlp.leftMargin = insets.left;
142-
mlp.bottomMargin = insets.bottom;
143-
mlp.rightMargin = insets.right;
144-
mlp.topMargin = insets.top;
145-
v.setLayoutParams(mlp);
146-
147-
// Return CONSUMED if we don't want the window insets to keep being passed
148-
// down to descendant views.
149-
return WindowInsetsCompat.CONSUMED;
150-
});
151-
152126
final Toolbar toolbar = findViewById(R.id.toolbar);
153127
setSupportActionBar(toolbar);
154128
setTitle(R.string.app_name);

Hyperrail/src/main/java/be/hyperrail/android/activities/SettingsActivity.java

-6
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,9 @@
2121
import android.os.Bundle;
2222
import android.preference.PreferenceActivity;
2323
import android.preference.PreferenceFragment;
24-
import android.view.Window;
2524

2625
import androidx.appcompat.app.AppCompatActivity;
2726
import androidx.appcompat.widget.Toolbar;
28-
import androidx.core.view.WindowCompat;
2927

3028
import be.hyperrail.android.R;
3129

@@ -47,10 +45,6 @@ protected void onCreate(Bundle savedInstanceState) {
4745
super.onCreate(savedInstanceState);
4846

4947
setContentView(R.layout.activity_preferences);
50-
51-
Window window = getWindow();
52-
WindowCompat.setDecorFitsSystemWindows(window, false);
53-
5448
Toolbar toolbar = findViewById(R.id.toolbar);
5549

5650
setSupportActionBar(toolbar);

Hyperrail/src/main/java/be/hyperrail/android/activities/StationActivity.java

-5
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,13 @@
1717
import android.content.pm.PackageManager;
1818
import android.os.Bundle;
1919
import android.view.View;
20-
import android.view.Window;
2120
import android.widget.TextView;
2221

2322
import androidx.annotation.NonNull;
2423
import androidx.appcompat.app.AlertDialog;
2524
import androidx.appcompat.app.AppCompatActivity;
2625
import androidx.appcompat.widget.Toolbar;
2726
import androidx.core.app.ActivityCompat;
28-
import androidx.core.view.WindowCompat;
2927

3028
import com.google.android.gms.maps.CameraUpdateFactory;
3129
import com.google.android.gms.maps.GoogleMap;
@@ -61,9 +59,6 @@ protected void onCreate(Bundle savedInstanceState) {
6159
super.onCreate(savedInstanceState);
6260
setContentView(R.layout.activity_station);
6361

64-
Window window = getWindow();
65-
WindowCompat.setDecorFitsSystemWindows(window, false);
66-
6762
Toolbar toolbar = findViewById(R.id.toolbar);
6863
setSupportActionBar(toolbar);
6964
if (getSupportActionBar() != null) {

Hyperrail/src/main/res/layout/activity_station.xml

+17-1
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
android:layout_width="match_parent"
8181
android:layout_height="40dp"
8282
android:gravity="center_vertical"
83+
android:textColor="@color/colorTextDark"
8384
android:text="@string/title_station_facilities" />
8485

8586
<ImageView
@@ -90,6 +91,7 @@
9091
android:layout_below="@+id/title_facilities"
9192
android:contentDescription="@string/facility_ticket_vending_machines"
9293
android:padding="2dp"
94+
android:tint="@color/colorTextDark"
9395
android:src="@drawable/ic_action_ticket" />
9496

9597
<TextView
@@ -99,6 +101,7 @@
99101
android:layout_below="@id/title_facilities"
100102
android:layout_toRightOf="@id/image_ticket"
101103
android:padding="2dp"
104+
android:textColor="@color/colorTextDark"
102105
android:text="@string/facility_ticket_vending_machines" />
103106

104107
<ImageView
@@ -108,6 +111,7 @@
108111
android:layout_below="@+id/image_ticket"
109112
android:contentDescription="@string/facility_bus_stop"
110113
android:padding="2dp"
114+
android:tint="@color/colorTextDark"
111115
android:src="@drawable/ic_directions_bus" />
112116

113117
<TextView
@@ -117,6 +121,7 @@
117121
android:layout_below="@id/text_ticket"
118122
android:layout_toRightOf="@id/image_bus"
119123
android:padding="2dp"
124+
android:textColor="@color/colorTextDark"
120125
android:text="@string/facility_bus_stop" />
121126

122127
<ImageView
@@ -126,6 +131,7 @@
126131
android:layout_below="@id/image_bus"
127132
android:contentDescription="@string/facility_tram_stop"
128133
android:padding="2dp"
134+
android:tint="@color/colorTextDark"
129135
android:src="@drawable/ic_tram" />
130136

131137
<TextView
@@ -135,6 +141,8 @@
135141
android:layout_below="@id/text_bus"
136142
android:layout_toRightOf="@id/image_tram"
137143
android:padding="2dp"
144+
android:textColor="@color/colorTextDark"
145+
android:tint="@color/colorTextDark"
138146
android:text="@string/facility_tram_stop" />
139147

140148
<ImageView
@@ -144,6 +152,7 @@
144152
android:layout_below="@id/image_tram"
145153
android:contentDescription="@string/facility_subway_stop"
146154
android:padding="2dp"
155+
android:tint="@color/colorTextDark"
147156
android:src="@drawable/ic_subway" />
148157

149158
<TextView
@@ -153,6 +162,7 @@
153162
android:layout_below="@id/text_tram"
154163
android:layout_toRightOf="@id/image_subway"
155164
android:padding="2dp"
165+
android:textColor="@color/colorTextDark"
156166
android:text="@string/facility_subway_stop" />
157167

158168

@@ -163,6 +173,7 @@
163173
android:layout_below="@id/image_subway"
164174
android:contentDescription="@string/facility_taxi_stop"
165175
android:padding="2dp"
176+
android:tint="@color/colorTextDark"
166177
android:src="@drawable/ic_local_taxi" />
167178

168179
<TextView
@@ -172,6 +183,7 @@
172183
android:layout_below="@id/text_subway"
173184
android:layout_toRightOf="@id/image_taxi"
174185
android:padding="2dp"
186+
android:textColor="@color/colorTextDark"
175187
android:text="@string/facility_taxi_stop" />
176188

177189
<ImageView
@@ -181,6 +193,8 @@
181193
android:layout_below="@id/image_taxi"
182194
android:contentDescription="@string/facility_bicycle_parking"
183195
android:padding="2dp"
196+
android:textColor="@color/colorTextDark"
197+
android:tint="@color/colorTextDark"
184198
android:src="@drawable/ic_action_bike" />
185199

186200
<TextView
@@ -200,7 +214,8 @@
200214
android:contentDescription="@string/facility_blue_bikes"
201215
android:padding="2dp"
202216
android:src="@drawable/ic_action_bike"
203-
android:tint="#0d47a1" />
217+
android:textColor="@color/colorTextDark"
218+
android:tint="@color/colorTextDark" />
204219

205220
<TextView
206221
android:id="@+id/text_blue_bike"
@@ -209,6 +224,7 @@
209224
android:layout_below="@id/text_bike"
210225
android:layout_toRightOf="@id/image_blue_bike"
211226
android:padding="2dp"
227+
android:textColor="@color/colorTextDark"
212228
android:text="@string/facility_blue_bikes" />
213229
</RelativeLayout>
214230
</androidx.cardview.widget.CardView>

Hyperrail/src/main/res/layout/drawer_header.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@
3131
android:paddingTop="@dimen/nav_header_vertical_spacing"
3232
android:text="@string/app_name"
3333
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
34-
android:textColor="@color/colorTextLight" />
34+
android:textColor="@color/colorOnPrimary" />
3535

3636
<TextView
3737
android:layout_width="wrap_content"
3838
android:layout_height="wrap_content"
3939
android:text="@string/powered_by_irail_be"
40-
android:textColor="@color/colorTextLight" />
40+
android:textColor="@color/colorOnPrimary" />
4141
</LinearLayout>
4242
</LinearLayout>

OpenTransport/build.gradle

+3-5
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,10 @@ dependencies {
4343
// Advanced DateTime library
4444
implementation 'joda-time:joda-time:2.10.3'
4545

46-
// Performance logging
47-
implementation 'com.google.firebase:firebase-perf:20.0.3'
48-
implementation 'com.google.firebase:firebase-core:20.0.0'
46+
implementation 'androidx.annotation:annotation:1.3.0'
4947

50-
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.6.2'
48+
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.7.0'
5149
testImplementation 'org.json:json:20200518'
5250
testImplementation 'org.mockito:mockito-core:2.18.3'
53-
androidTestImplementation 'org.junit.jupiter:junit-jupiter-engine:5.6.2'
51+
androidTestImplementation 'org.junit.jupiter:junit-jupiter-engine:5.7.0'
5452
}

OpenTransport/src/main/java/be/hyperrail/opentransportdata/common/contracts/MeteredDataSource.java

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
package be.hyperrail.opentransportdata.common.contracts;
88

99
import android.net.TrafficStats;
10+
1011
import androidx.annotation.IntDef;
1112

1213
/**

OpenTransport_be_experimental/build.gradle

+9-9
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ def VERSION_CODE = 1
44
def VERSION_NAME = '1.0.0'
55

66
android {
7-
compileSdkVersion 30
8-
buildToolsVersion '30.0.0'
7+
compileSdkVersion 31
8+
buildToolsVersion '30.0.3'
99
defaultConfig {
1010
minSdkVersion 21
11-
targetSdkVersion 30
11+
targetSdkVersion 31
1212
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1313
multiDexEnabled true
1414
}
@@ -40,8 +40,8 @@ repositories {
4040
dependencies {
4141
implementation fileTree(dir: 'libs', include: ['*.jar'])
4242

43-
implementation 'com.google.firebase:firebase-perf:19.0.8'
44-
implementation 'com.google.firebase:firebase-core:17.4.4'
43+
implementation 'com.google.firebase:firebase-perf:20.0.4'
44+
implementation 'com.google.firebase:firebase-core:20.0.0'
4545

4646
// High performance JSON parsing for Linked Connections
4747
annotationProcessor 'com.bluelinelabs:logansquare-compiler:1.3.7'
@@ -50,7 +50,7 @@ dependencies {
5050
implementation 'joda-time:joda-time:2.10.3'
5151

5252
// Networking
53-
implementation 'com.android.volley:volley:1.1.0@aar'
53+
implementation 'com.android.volley:volley:1.2.1@aar'
5454

5555
// Easy communication with JSON APIs
5656
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
@@ -60,9 +60,9 @@ dependencies {
6060
implementation project(path: ':OpenTransport_be')
6161

6262
testImplementation "org.mockito:mockito-core:2.18.3"
63-
testImplementation 'junit:junit:4.13'
64-
androidTestImplementation 'androidx.test:runner:1.2.0'
65-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
63+
testImplementation 'junit:junit:4.13.2'
64+
androidTestImplementation 'androidx.test:runner:1.4.0'
65+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
6666
androidTestImplementation "org.mockito:mockito-core:2.18.3"
6767

6868
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.11.1'

opentransport_be/build.gradle

+1-4
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,14 @@ repositories {
3737
dependencies {
3838
implementation fileTree(dir: 'libs', include: ['*.jar'])
3939

40-
41-
implementation 'com.google.firebase:firebase-perf:20.0.3'
42-
implementation 'com.google.firebase:firebase-core:20.0.0'
43-
4440
// Advanced DateTime library
4541
implementation 'joda-time:joda-time:2.10.3'
4642

4743
// Networking
4844
implementation 'com.android.volley:volley:1.2.1@aar'
4945

5046
implementation project(path: ':OpenTransport')
47+
implementation 'androidx.annotation:annotation:1.3.0'
5148

5249
testImplementation "org.mockito:mockito-core:2.18.3"
5350
testImplementation 'junit:junit:4.13.2'

0 commit comments

Comments
 (0)