diff --git a/app/src/main/java/de/gymnasium_beetzendorf/vertretungsplan/DatabaseHandler.java b/app/src/main/java/de/gymnasium_beetzendorf/vertretungsplan/DatabaseHandler.java index 9b33635..e60b5a8 100644 --- a/app/src/main/java/de/gymnasium_beetzendorf/vertretungsplan/DatabaseHandler.java +++ b/app/src/main/java/de/gymnasium_beetzendorf/vertretungsplan/DatabaseHandler.java @@ -7,7 +7,9 @@ import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; -import android.preference.PreferenceManager; + +import androidx.preference.PreferenceManager; + import android.util.Log; import java.text.ParseException; diff --git a/app/src/main/java/de/gymnasium_beetzendorf/vertretungsplan/XmlParser.java b/app/src/main/java/de/gymnasium_beetzendorf/vertretungsplan/XmlParser.java index 92bf8f8..6d59386 100644 --- a/app/src/main/java/de/gymnasium_beetzendorf/vertretungsplan/XmlParser.java +++ b/app/src/main/java/de/gymnasium_beetzendorf/vertretungsplan/XmlParser.java @@ -2,7 +2,9 @@ import android.content.Context; import android.content.SharedPreferences; -import android.preference.PreferenceManager; + +import androidx.preference.PreferenceManager; + import android.util.Log; import org.xmlpull.v1.XmlPullParser; diff --git a/app/src/main/java/de/gymnasium_beetzendorf/vertretungsplan/activity/AboutActivity.java b/app/src/main/java/de/gymnasium_beetzendorf/vertretungsplan/activity/AboutActivity.java index 60700d5..1b6bfea 100644 --- a/app/src/main/java/de/gymnasium_beetzendorf/vertretungsplan/activity/AboutActivity.java +++ b/app/src/main/java/de/gymnasium_beetzendorf/vertretungsplan/activity/AboutActivity.java @@ -24,7 +24,7 @@ protected int getLayoutId() { @Override protected Toolbar getToolbar() { - return (Toolbar) findViewById(R.id.mainToolbar); + return findViewById(R.id.mainToolbar); } @Override @@ -42,7 +42,7 @@ protected void onCreate(Bundle savedInstanceState) { } if (packageInfo != null) { - mVersionTextView.setText(String.format(getString(R.string.version_number), packageInfo.versionName, packageInfo.versionCode)); + mVersionTextView.setText(String.format(getString(R.string.version_number), packageInfo.versionName, packageInfo.getLongVersionCode())); } else { mVersionTextView.setText(R.string.version_number_not_found); } diff --git a/app/src/main/java/de/gymnasium_beetzendorf/vertretungsplan/fragment/ChooseFragment.java b/app/src/main/java/de/gymnasium_beetzendorf/vertretungsplan/fragment/ChooseFragment.java index 10d6799..0ca7b58 100644 --- a/app/src/main/java/de/gymnasium_beetzendorf/vertretungsplan/fragment/ChooseFragment.java +++ b/app/src/main/java/de/gymnasium_beetzendorf/vertretungsplan/fragment/ChooseFragment.java @@ -4,16 +4,19 @@ import androidx.annotation.NonNull; import androidx.fragment.app.Fragment; + import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.SharedPreferences; import android.os.Bundle; -import android.preference.PreferenceManager; + +import androidx.preference.PreferenceManager; import androidx.annotation.Nullable; import androidx.coordinatorlayout.widget.CoordinatorLayout; import androidx.localbroadcastmanager.content.LocalBroadcastManager; + import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -73,7 +76,7 @@ protected SharedPreferences getSharedPreferences(Context context) { } protected CoordinatorLayout getCoordinatorLayout() { - return (CoordinatorLayout) activity.findViewById(R.id.welcome_coordinator); + return activity.findViewById(R.id.welcome_coordinator); } protected abstract String getNextButtonText();