Skip to content
This repository has been archived by the owner on Sep 1, 2018. It is now read-only.

Commit

Permalink
Fix bug op android 4.4
Browse files Browse the repository at this point in the history
De app werkt terug op android 4.4.
  • Loading branch information
mixxamm committed May 9, 2018
1 parent a32c099 commit fa8871d
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 8 deletions.
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ android {
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "one.smartpass.android"
minSdkVersion 21
minSdkVersion 19
targetSdkVersion 27
versionCode 15
versionName "2.1.4"
versionCode 16
versionName "2.1.5"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
nablijven.setTextColor(Color.WHITE);
BottomNavigationView navigation = (BottomNavigationView) getActivity().findViewById(R.id.navigation);
navigation.setBackgroundColor(Color.parseColor("#000000"));
getActivity().getWindow().setNavigationBarColor(Color.parseColor("#000000"));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
getActivity().getWindow().setNavigationBarColor(Color.parseColor("#000000"));
}

int[][] states = new int[][] {
new int[] {-android.R.attr.state_checked}, // unchecked
Expand All @@ -84,7 +86,9 @@ public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
else {
BottomNavigationView navigation = (BottomNavigationView) getActivity().findViewById(R.id.navigation);
navigation.setBackgroundColor(Color.parseColor("#FAFAFA"));
getActivity().getWindow().setNavigationBarColor(Color.parseColor("#000000"));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
getActivity().getWindow().setNavigationBarColor(Color.parseColor("#000000"));
}

int[][] states = new int[][] {
new int[] {-android.R.attr.state_checked}, // unchecked
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ public void onClick(View v) {
nieuweFunctieImageView.setColorFilter(Color.WHITE);
navigation = (BottomNavigationView) getActivity().findViewById(R.id.navigation);
navigation.setBackgroundColor(Color.parseColor("#000000"));
getActivity().getWindow().setNavigationBarColor(Color.parseColor("#000000"));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
getActivity().getWindow().setNavigationBarColor(Color.parseColor("#000000"));
}

int[][] states = new int[][] {
new int[] {-android.R.attr.state_checked}, // unchecked
Expand Down Expand Up @@ -170,7 +172,9 @@ public void onClick(View v) {
ColorStateList lichtLijst = new ColorStateList(states, colors);
navigation.setItemTextColor(lichtLijst);
navigation.setItemIconTintList(lichtLijst);
getActivity().getWindow().setNavigationBarColor(Color.parseColor("#000000"));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
getActivity().getWindow().setNavigationBarColor(Color.parseColor("#000000"));
}
}
donkereModus.setOnClickListener(new View.OnClickListener() {
@Override
Expand Down
10 changes: 10 additions & 0 deletions app/src/main/java/one/smartpass/android/Login.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
import android.os.AsyncTask;
import android.widget.Toast;

import com.google.android.gms.common.GooglePlayServicesNotAvailableException;
import com.google.android.gms.common.GooglePlayServicesRepairableException;
import com.google.android.gms.security.ProviderInstaller;
import com.google.firebase.iid.FirebaseInstanceId;
import com.mixxamm.smartpassalpha.R;

Expand Down Expand Up @@ -50,6 +53,13 @@ public class Login extends AsyncTask<String, Void, String> {

@Override
public String doInBackground(String... params) {
try {
ProviderInstaller.installIfNeeded(context);
} catch (GooglePlayServicesRepairableException e) {
e.printStackTrace();
} catch (GooglePlayServicesNotAvailableException e) {
e.printStackTrace();
}
String type = params[0];
type1 = type;
String login_url;
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ buildscript {
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.1'
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.google.gms:google-services:3.2.0'
classpath 'io.fabric.tools:gradle:1.25.1'//crashlytics
// NOTE: Do not place your application dependencies here; they belong
Expand Down

0 comments on commit fa8871d

Please sign in to comment.