Commit bec8d207 authored by Schoumi's avatar Schoumi

move from old libraries to androidx libraries

parent 254f3bf4
......@@ -23,10 +23,9 @@ android {
dependencies {
implementation project(':anymaps-base')
implementation project(':anymaps-osm')
compile 'com.github.car2go.AnyMaps:anymaps-base:6.0.0'
compile 'com.github.car2go.AnyMaps:anymaps-osm:6.0.0'
compile 'com.android.support:appcompat-v7:26.0.0-alpha1'
compile 'com.android.support:design:26.0.0-alpha1'
compile 'com.android.support:support-v4:26.0.0-alpha1'
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.preference:preference:1.0.0'
}
......@@ -20,10 +20,10 @@ package fr.mobdev.blooddonation.custom_object;
import java.util.List;
import androidx.annotation.NonNull;
import fr.mobdev.blooddonation.R;
import fr.mobdev.blooddonation.enums.DrawerItemType;
import android.content.Context;
import android.support.annotation.NonNull;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
......
......@@ -19,13 +19,15 @@
package fr.mobdev.blooddonation.dialog;
import java.util.Calendar;
import androidx.appcompat.app.AlertDialog;
import androidx.fragment.app.DialogFragment;
import fr.mobdev.blooddonation.Database;
import fr.mobdev.blooddonation.NewDonationListener;
import fr.mobdev.blooddonation.R;
import fr.mobdev.blooddonation.enums.DonationType;
import fr.mobdev.blooddonation.objects.Donation;
import android.annotation.SuppressLint;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
......@@ -36,7 +38,7 @@ import android.widget.EditText;
import android.widget.Spinner;
@SuppressLint("InflateParams")
public class AddDonationDialog extends android.app.DialogFragment {
public class AddDonationDialog extends DialogFragment {
private int siteId;
private NewDonationListener listener;
......
......@@ -23,6 +23,9 @@ import java.util.Calendar;
import java.util.List;
import java.util.Locale;
import java.util.TimeZone;
import androidx.appcompat.app.AlertDialog;
import androidx.fragment.app.DialogFragment;
import fr.mobdev.blooddonation.Database;
import fr.mobdev.blooddonation.R;
import fr.mobdev.blooddonation.RegisterListener;
......@@ -30,9 +33,7 @@ import fr.mobdev.blooddonation.enums.DonationType;
import fr.mobdev.blooddonation.objects.BloodSite;
import fr.mobdev.blooddonation.objects.Donation;
import android.annotation.SuppressLint;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.LayoutInflater;
......
......@@ -22,14 +22,15 @@ import java.text.DateFormat;
import java.util.List;
import java.util.Locale;
import java.util.TimeZone;
import androidx.appcompat.app.AlertDialog;
import androidx.fragment.app.DialogFragment;
import fr.mobdev.blooddonation.Database;
import fr.mobdev.blooddonation.R;
import fr.mobdev.blooddonation.enums.SiteType;
import fr.mobdev.blooddonation.objects.BloodSite;
import android.annotation.SuppressLint;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.Uri;
......
......@@ -20,9 +20,11 @@ package fr.mobdev.blooddonation.dialog;
import java.util.ArrayList;
import java.util.HashMap;
import androidx.appcompat.app.AlertDialog;
import androidx.fragment.app.DialogFragment;
import fr.mobdev.blooddonation.R;
import android.annotation.SuppressLint;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.content.DialogInterface.OnShowListener;
......@@ -38,7 +40,7 @@ import android.widget.Spinner;
import android.widget.TextView;
@SuppressLint("InflateParams")
public class PostDonationDialog extends android.app.DialogFragment {
public class PostDonationDialog extends DialogFragment {
private boolean changeMode;
private int depId;
......
......@@ -18,7 +18,6 @@
package fr.mobdev.blooddonation.fragment;
import android.app.Fragment;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
......@@ -28,6 +27,7 @@ import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.fragment.app.Fragment;
import fr.mobdev.blooddonation.R;
public class AboutFragment extends Fragment {
......
......@@ -20,7 +20,6 @@ package fr.mobdev.blooddonation.fragment;
import android.app.AlertDialog;
import android.app.Fragment;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.LayoutInflater;
......@@ -30,12 +29,14 @@ import android.widget.AdapterView;
import android.widget.ListView;
import android.widget.TextView;
import java.text.DateFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.TimeZone;
import androidx.fragment.app.Fragment;
import fr.mobdev.blooddonation.Database;
import fr.mobdev.blooddonation.NewDonationListener;
import fr.mobdev.blooddonation.R;
......
......@@ -18,9 +18,7 @@
package fr.mobdev.blooddonation.fragment;
import android.app.Fragment;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
......@@ -28,6 +26,8 @@ import android.widget.TextView;
import java.util.HashMap;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import fr.mobdev.blooddonation.Database;
import fr.mobdev.blooddonation.R;
......
......@@ -18,7 +18,6 @@
package fr.mobdev.blooddonation.fragment;
import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
......@@ -33,6 +32,7 @@ import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import androidx.fragment.app.Fragment;
import fr.mobdev.blooddonation.Database;
import fr.mobdev.blooddonation.R;
......
......@@ -18,11 +18,12 @@
package fr.mobdev.blooddonation.fragment;
import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.fragment.app.Fragment;
import fr.mobdev.blooddonation.R;
public class LicencesFragment extends Fragment {
......
......@@ -19,7 +19,6 @@
package fr.mobdev.blooddonation.fragment;
import android.Manifest;
import android.app.Fragment;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.location.Address;
......@@ -29,9 +28,6 @@ import android.location.LocationListener;
import android.location.LocationManager;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.annotation.Nullable;
import android.support.v4.app.ActivityCompat;
import android.support.v4.util.LongSparseArray;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
......@@ -60,6 +56,11 @@ import java.util.Locale;
import java.util.Map;
import java.util.TimeZone;
import androidx.annotation.Nullable;
import androidx.collection.LongSparseArray;
import androidx.core.app.ActivityCompat;
import androidx.fragment.app.Fragment;
import fr.mobdev.blooddonation.BuildConfig;
import fr.mobdev.blooddonation.Database;
import fr.mobdev.blooddonation.NetworkListener;
import fr.mobdev.blooddonation.NetworkManager;
......
/*
* Copyright (C) 2017 Anthony Chomienne, anthony@mob-dev.fr
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package fr.mobdev.blooddonation.fragment;
import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
......@@ -17,29 +34,13 @@ import java.util.List;
import java.util.Locale;
import java.util.TimeZone;
import androidx.fragment.app.Fragment;
import fr.mobdev.blooddonation.Database;
import fr.mobdev.blooddonation.R;
import fr.mobdev.blooddonation.dialog.InformationDialog;
import fr.mobdev.blooddonation.objects.BloodSite;
/*
* Copyright (C) 2017 Anthony Chomienne, anthony@mob-dev.fr
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
public class NotificationFragment extends Fragment{
public class NotificationFragment extends Fragment {
private List<Long> notificationsIds;
private List<Long> readedNotifications;
......
......@@ -22,6 +22,8 @@ import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import androidx.preference.Preference;
import androidx.preference.PreferenceFragmentCompat;
import fr.mobdev.blooddonation.Database;
import fr.mobdev.blooddonation.R;
import android.content.SharedPreferences;
......@@ -29,11 +31,8 @@ import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.location.Address;
import android.location.Geocoder;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.Preference.OnPreferenceClickListener;
import android.preference.PreferenceFragment;
public class PrefFragment extends PreferenceFragment implements OnSharedPreferenceChangeListener {
public class PrefFragment extends PreferenceFragmentCompat implements OnSharedPreferenceChangeListener {
private OnEditPersonnalInfoListener onEditPersonnalInfoListener;
......@@ -49,7 +48,7 @@ public class PrefFragment extends PreferenceFragment implements OnSharedPreferen
addPreferencesFromResource(R.xml.preferences);
Preference pref = findPreference("info_change");
pref.setOnPreferenceClickListener(new OnPreferenceClickListener() {
pref.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
......@@ -61,6 +60,11 @@ public class PrefFragment extends PreferenceFragment implements OnSharedPreferen
getPreferenceManager().getSharedPreferences().registerOnSharedPreferenceChangeListener(this);
}
@Override
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
}
@Override
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences,String key) {
if(key.equals("deactivate_localisation"))
......
......@@ -25,6 +25,8 @@ import java.util.List;
import java.util.Locale;
import java.util.TimeZone;
import androidx.core.app.NotificationCompat;
import androidx.core.app.TaskStackBuilder;
import fr.mobdev.blooddonation.Database;
import fr.mobdev.blooddonation.NetworkListener;
import fr.mobdev.blooddonation.NetworkManager;
......@@ -44,8 +46,6 @@ import android.content.SharedPreferences;
import android.graphics.BitmapFactory;
import android.location.Location;
import android.preference.PreferenceManager;
import android.support.v4.app.NotificationCompat;
import android.support.v4.app.TaskStackBuilder;
import com.car2go.maps.model.LatLng;
......
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout
<androidx.drawerlayout.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
......@@ -11,24 +11,24 @@
tools:openDrawer="start"
>
<android.support.design.widget.CoordinatorLayout
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<android.support.design.widget.AppBarLayout
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.PopupOverlay">
<android.support.v7.widget.Toolbar
<androidx.appcompat.widget.Toolbar
android:id="@+id/history_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay"
/>
</android.support.design.widget.AppBarLayout>
</com.google.android.material.appbar.AppBarLayout>
<!-- The main content view -->
<RelativeLayout
......@@ -48,11 +48,11 @@
android:layout_height="match_parent"/>
</RelativeLayout>
</android.support.design.widget.CoordinatorLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
<!-- The navigation drawer -->
<android.support.design.widget.NavigationView
<com.google.android.material.navigation.NavigationView
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
......@@ -60,4 +60,4 @@
android:fitsSystemWindows="true"
app:menu="@menu/main_drawer" />
</android.support.v4.widget.DrawerLayout>
\ No newline at end of file
</androidx.drawerlayout.widget.DrawerLayout>
\ No newline at end of file
......@@ -6,7 +6,7 @@
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context=".NotificationsActivity">
tools:context=".activity.MainActivity">
<ListView
android:layout_width="match_parent"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment