Skip to content

Commit

Permalink
Select the longest composition, fix some dark mode issues, fix some d…
Browse files Browse the repository at this point in the history
…ependency issues, bump version numbers, remove firebase performance monitoring
  • Loading branch information
Bertware committed Dec 4, 2021
1 parent 455522d commit 559ac21
Show file tree
Hide file tree
Showing 13 changed files with 69 additions and 84 deletions.
8 changes: 4 additions & 4 deletions Hyperrail/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'

def VERSION_CODE = 54
def VERSION_NAME = '1.2.3'
def VERSION_NAME = '1.3.0'

android {
compileSdkVersion 31
Expand Down Expand Up @@ -44,21 +44,21 @@ android {
}

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


implementation 'com.android.volley:volley:1.2.1@aar'
implementation 'joda-time:joda-time:2.10.3'
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'androidx.appcompat:appcompat:1.4.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'com.google.android.gms:play-services-location:18.0.0'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.google.firebase:firebase-crashlytics:18.2.4'
implementation 'com.google.firebase:firebase-crashlytics:18.2.5'

testImplementation 'junit:junit:4.13.2'
testImplementation 'org.json:json:20200518'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
Expand All @@ -31,7 +30,6 @@
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.view.WindowCompat;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;
Expand All @@ -57,9 +55,6 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_first_launch_guide);

Window window = getWindow();
WindowCompat.setDecorFitsSystemWindows(window, false);

// Create the adapter that will return a fragment for each of the three
// primary sections of the activity.
SectionsPagerAdapter mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;

import androidx.annotation.ColorRes;
import androidx.annotation.IntDef;
Expand All @@ -49,11 +47,7 @@
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.core.content.ContextCompat;
import androidx.core.graphics.Insets;
import androidx.core.view.GravityCompat;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowCompat;
import androidx.core.view.WindowInsetsCompat;
import androidx.drawerlayout.widget.DrawerLayout;
import androidx.fragment.app.Fragment;

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

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

Window window = getWindow();
WindowCompat.setDecorFitsSystemWindows(window, false);
ViewCompat.setOnApplyWindowInsetsListener(vLayoutRoot, (v, windowInsets) -> {
Insets insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars());
// Apply the insets as a margin to the view. Here the system is setting
// only the bottom, left, and right dimensions, but apply whichever insets are
// appropriate to your layout. You can also update the view padding
// if that's more appropriate.
ViewGroup.MarginLayoutParams mlp = (ViewGroup.MarginLayoutParams) v.getLayoutParams();
mlp.leftMargin = insets.left;
mlp.bottomMargin = insets.bottom;
mlp.rightMargin = insets.right;
mlp.topMargin = insets.top;
v.setLayoutParams(mlp);

// Return CONSUMED if we don't want the window insets to keep being passed
// down to descendant views.
return WindowInsetsCompat.CONSUMED;
});

final Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
setTitle(R.string.app_name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.preference.PreferenceFragment;
import android.view.Window;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.core.view.WindowCompat;

import be.hyperrail.android.R;

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

setContentView(R.layout.activity_preferences);

Window window = getWindow();
WindowCompat.setDecorFitsSystemWindows(window, false);

Toolbar toolbar = findViewById(R.id.toolbar);

setSupportActionBar(toolbar);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,13 @@
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.core.app.ActivityCompat;
import androidx.core.view.WindowCompat;

import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
Expand Down Expand Up @@ -61,9 +59,6 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_station);

Window window = getWindow();
WindowCompat.setDecorFitsSystemWindows(window, false);

Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
if (getSupportActionBar() != null) {
Expand Down
18 changes: 17 additions & 1 deletion Hyperrail/src/main/res/layout/activity_station.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
android:layout_width="match_parent"
android:layout_height="40dp"
android:gravity="center_vertical"
android:textColor="@color/colorTextDark"
android:text="@string/title_station_facilities" />

<ImageView
Expand All @@ -90,6 +91,7 @@
android:layout_below="@+id/title_facilities"
android:contentDescription="@string/facility_ticket_vending_machines"
android:padding="2dp"
android:tint="@color/colorTextDark"
android:src="@drawable/ic_action_ticket" />

<TextView
Expand All @@ -99,6 +101,7 @@
android:layout_below="@id/title_facilities"
android:layout_toRightOf="@id/image_ticket"
android:padding="2dp"
android:textColor="@color/colorTextDark"
android:text="@string/facility_ticket_vending_machines" />

<ImageView
Expand All @@ -108,6 +111,7 @@
android:layout_below="@+id/image_ticket"
android:contentDescription="@string/facility_bus_stop"
android:padding="2dp"
android:tint="@color/colorTextDark"
android:src="@drawable/ic_directions_bus" />

<TextView
Expand All @@ -117,6 +121,7 @@
android:layout_below="@id/text_ticket"
android:layout_toRightOf="@id/image_bus"
android:padding="2dp"
android:textColor="@color/colorTextDark"
android:text="@string/facility_bus_stop" />

<ImageView
Expand All @@ -126,6 +131,7 @@
android:layout_below="@id/image_bus"
android:contentDescription="@string/facility_tram_stop"
android:padding="2dp"
android:tint="@color/colorTextDark"
android:src="@drawable/ic_tram" />

<TextView
Expand All @@ -135,6 +141,8 @@
android:layout_below="@id/text_bus"
android:layout_toRightOf="@id/image_tram"
android:padding="2dp"
android:textColor="@color/colorTextDark"
android:tint="@color/colorTextDark"
android:text="@string/facility_tram_stop" />

<ImageView
Expand All @@ -144,6 +152,7 @@
android:layout_below="@id/image_tram"
android:contentDescription="@string/facility_subway_stop"
android:padding="2dp"
android:tint="@color/colorTextDark"
android:src="@drawable/ic_subway" />

<TextView
Expand All @@ -153,6 +162,7 @@
android:layout_below="@id/text_tram"
android:layout_toRightOf="@id/image_subway"
android:padding="2dp"
android:textColor="@color/colorTextDark"
android:text="@string/facility_subway_stop" />


Expand All @@ -163,6 +173,7 @@
android:layout_below="@id/image_subway"
android:contentDescription="@string/facility_taxi_stop"
android:padding="2dp"
android:tint="@color/colorTextDark"
android:src="@drawable/ic_local_taxi" />

<TextView
Expand All @@ -172,6 +183,7 @@
android:layout_below="@id/text_subway"
android:layout_toRightOf="@id/image_taxi"
android:padding="2dp"
android:textColor="@color/colorTextDark"
android:text="@string/facility_taxi_stop" />

<ImageView
Expand All @@ -181,6 +193,8 @@
android:layout_below="@id/image_taxi"
android:contentDescription="@string/facility_bicycle_parking"
android:padding="2dp"
android:textColor="@color/colorTextDark"
android:tint="@color/colorTextDark"
android:src="@drawable/ic_action_bike" />

<TextView
Expand All @@ -200,7 +214,8 @@
android:contentDescription="@string/facility_blue_bikes"
android:padding="2dp"
android:src="@drawable/ic_action_bike"
android:tint="#0d47a1" />
android:textColor="@color/colorTextDark"
android:tint="@color/colorTextDark" />

<TextView
android:id="@+id/text_blue_bike"
Expand All @@ -209,6 +224,7 @@
android:layout_below="@id/text_bike"
android:layout_toRightOf="@id/image_blue_bike"
android:padding="2dp"
android:textColor="@color/colorTextDark"
android:text="@string/facility_blue_bikes" />
</RelativeLayout>
</androidx.cardview.widget.CardView>
Expand Down
4 changes: 2 additions & 2 deletions Hyperrail/src/main/res/layout/drawer_header.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
android:paddingTop="@dimen/nav_header_vertical_spacing"
android:text="@string/app_name"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
android:textColor="@color/colorTextLight" />
android:textColor="@color/colorOnPrimary" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/powered_by_irail_be"
android:textColor="@color/colorTextLight" />
android:textColor="@color/colorOnPrimary" />
</LinearLayout>
</LinearLayout>
8 changes: 3 additions & 5 deletions OpenTransport/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,10 @@ dependencies {
// Advanced DateTime library
implementation 'joda-time:joda-time:2.10.3'

// Performance logging
implementation 'com.google.firebase:firebase-perf:20.0.3'
implementation 'com.google.firebase:firebase-core:20.0.0'
implementation 'androidx.annotation:annotation:1.3.0'

testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.6.2'
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.7.0'
testImplementation 'org.json:json:20200518'
testImplementation 'org.mockito:mockito-core:2.18.3'
androidTestImplementation 'org.junit.jupiter:junit-jupiter-engine:5.6.2'
androidTestImplementation 'org.junit.jupiter:junit-jupiter-engine:5.7.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
package be.hyperrail.opentransportdata.common.contracts;

import android.net.TrafficStats;

import androidx.annotation.IntDef;

/**
Expand Down
18 changes: 9 additions & 9 deletions OpenTransport_be_experimental/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ def VERSION_CODE = 1
def VERSION_NAME = '1.0.0'

android {
compileSdkVersion 30
buildToolsVersion '30.0.0'
compileSdkVersion 31
buildToolsVersion '30.0.3'
defaultConfig {
minSdkVersion 21
targetSdkVersion 30
targetSdkVersion 31
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
Expand Down Expand Up @@ -40,8 +40,8 @@ repositories {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

implementation 'com.google.firebase:firebase-perf:19.0.8'
implementation 'com.google.firebase:firebase-core:17.4.4'
implementation 'com.google.firebase:firebase-perf:20.0.4'
implementation 'com.google.firebase:firebase-core:20.0.0'

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

// Networking
implementation 'com.android.volley:volley:1.1.0@aar'
implementation 'com.android.volley:volley:1.2.1@aar'

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

testImplementation "org.mockito:mockito-core:2.18.3"
testImplementation 'junit:junit:4.13'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test:runner:1.4.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
androidTestImplementation "org.mockito:mockito-core:2.18.3"

implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.11.1'
Expand Down
5 changes: 1 addition & 4 deletions opentransport_be/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,14 @@ repositories {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])


implementation 'com.google.firebase:firebase-perf:20.0.3'
implementation 'com.google.firebase:firebase-core:20.0.0'

// Advanced DateTime library
implementation 'joda-time:joda-time:2.10.3'

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

implementation project(path: ':OpenTransport')
implementation 'androidx.annotation:annotation:1.3.0'

testImplementation "org.mockito:mockito-core:2.18.3"
testImplementation 'junit:junit:4.13.2'
Expand Down
Loading

0 comments on commit 559ac21

Please sign in to comment.