Move ExactCalculator to androidx.
Bug: 76692459
Test: make -j ExactCalculator and run on emulator
Change-Id: I6d52a233696d41d43fdaabf6863f359c79e4b4f7
diff --git a/Android.mk b/Android.mk
index ab9ff51..e4796b9 100644
--- a/Android.mk
+++ b/Android.mk
@@ -31,8 +31,8 @@
LOCAL_PROGUARD_FLAG_FILES := proguard.flags
LOCAL_STATIC_JAVA_LIBRARIES := cr
-LOCAL_STATIC_ANDROID_LIBRARIES += android-support-v4
-LOCAL_STATIC_ANDROID_LIBRARIES += android-support-v7-gridlayout
-LOCAL_STATIC_ANDROID_LIBRARIES += android-support-v7-recyclerview
+LOCAL_STATIC_ANDROID_LIBRARIES += androidx.legacy_legacy-support-v4
+LOCAL_STATIC_ANDROID_LIBRARIES += androidx.gridlayout_gridlayout
+LOCAL_STATIC_ANDROID_LIBRARIES += androidx.recyclerview_recyclerview
include $(BUILD_PACKAGE)
diff --git a/res/layout/fragment_history.xml b/res/layout/fragment_history.xml
index e5fe50e..c3c5b62 100644
--- a/res/layout/fragment_history.xml
+++ b/res/layout/fragment_history.xml
@@ -35,7 +35,7 @@
android:theme="@android:style/ThemeOverlay.Material.Dark.ActionBar"
android:title="@string/title_history" />
- <android.support.v7.widget.RecyclerView
+ <androidx.recyclerview.widget.RecyclerView
android:id="@+id/history_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
diff --git a/res/layout/pad_advanced_3x5.xml b/res/layout/pad_advanced_3x5.xml
index ece7003..cf38fe6 100644
--- a/res/layout/pad_advanced_3x5.xml
+++ b/res/layout/pad_advanced_3x5.xml
@@ -15,7 +15,7 @@
limitations under the License.
-->
-<android.support.v7.widget.GridLayout
+<androidx.gridlayout.widget.GridLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/pad_advanced"
@@ -205,4 +205,4 @@
app:layout_row="4"
app:layout_column="2" />
-</android.support.v7.widget.GridLayout>
+</androidx.gridlayout.widget.GridLayout>
diff --git a/res/layout/pad_advanced_4x4.xml b/res/layout/pad_advanced_4x4.xml
index 70a520e..dd5a792 100644
--- a/res/layout/pad_advanced_4x4.xml
+++ b/res/layout/pad_advanced_4x4.xml
@@ -15,7 +15,7 @@
limitations under the License.
-->
-<android.support.v7.widget.GridLayout
+<androidx.gridlayout.widget.GridLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/pad_advanced"
@@ -205,4 +205,4 @@
app:layout_row="3"
app:layout_column="3" />
-</android.support.v7.widget.GridLayout>
+</androidx.gridlayout.widget.GridLayout>
diff --git a/res/layout/pad_advanced_5x3.xml b/res/layout/pad_advanced_5x3.xml
index 95a0fc1..21ed723 100644
--- a/res/layout/pad_advanced_5x3.xml
+++ b/res/layout/pad_advanced_5x3.xml
@@ -15,7 +15,7 @@
limitations under the License.
-->
-<android.support.v7.widget.GridLayout
+<androidx.gridlayout.widget.GridLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/pad_advanced"
@@ -205,4 +205,4 @@
app:layout_row="2"
app:layout_column="4" />
-</android.support.v7.widget.GridLayout>
+</androidx.gridlayout.widget.GridLayout>
diff --git a/res/layout/pad_numeric.xml b/res/layout/pad_numeric.xml
index 2f301e8..5810984 100644
--- a/res/layout/pad_numeric.xml
+++ b/res/layout/pad_numeric.xml
@@ -15,7 +15,7 @@
limitations under the License.
-->
-<android.support.v7.widget.GridLayout
+<androidx.gridlayout.widget.GridLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/pad_numeric"
@@ -109,4 +109,4 @@
app:layout_row="3"
app:layout_column="2" />
-</android.support.v7.widget.GridLayout>
+</androidx.gridlayout.widget.GridLayout>
diff --git a/res/layout/pad_operator_one_col.xml b/res/layout/pad_operator_one_col.xml
index 3a6473a..3484972 100644
--- a/res/layout/pad_operator_one_col.xml
+++ b/res/layout/pad_operator_one_col.xml
@@ -15,7 +15,7 @@
limitations under the License.
-->
-<android.support.v7.widget.GridLayout
+<androidx.gridlayout.widget.GridLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/pad_operator"
@@ -74,4 +74,4 @@
app:layout_row="4"
app:layout_column="0" />
-</android.support.v7.widget.GridLayout>
+</androidx.gridlayout.widget.GridLayout>
diff --git a/res/layout/pad_operator_two_col.xml b/res/layout/pad_operator_two_col.xml
index e056ba5..b819162 100644
--- a/res/layout/pad_operator_two_col.xml
+++ b/res/layout/pad_operator_two_col.xml
@@ -15,7 +15,7 @@
limitations under the License.
-->
-<android.support.v7.widget.GridLayout
+<androidx.gridlayout.widget.GridLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/pad_operator"
@@ -81,4 +81,4 @@
app:layout_row="3"
app:layout_column="1" />
-</android.support.v7.widget.GridLayout>
+</androidx.gridlayout.widget.GridLayout>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 5f4a9f6..3cf2e38 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -68,7 +68,7 @@
<item name="android:textAllCaps">false</item>
<item name="android:textColor">@color/pad_button_text_color</item>
- <!-- Attributes from android.support.v7.gridlayout -->
+ <!-- Attributes from androidx.appcompat.gridlayout -->
<item name="layout_gravity">fill</item>
<item name="layout_rowWeight">1</item>
<item name="layout_columnWeight">1</item>
diff --git a/src/com/android/calculator2/AlertDialogFragment.java b/src/com/android/calculator2/AlertDialogFragment.java
index fdb7427..3939a73 100644
--- a/src/com/android/calculator2/AlertDialogFragment.java
+++ b/src/com/android/calculator2/AlertDialogFragment.java
@@ -23,8 +23,8 @@
import android.app.FragmentManager;
import android.content.DialogInterface;
import android.os.Bundle;
-import android.support.annotation.Nullable;
-import android.support.annotation.StringRes;
+import androidx.annotation.Nullable;
+import androidx.annotation.StringRes;
import android.view.LayoutInflater;
import android.widget.TextView;
diff --git a/src/com/android/calculator2/Calculator.java b/src/com/android/calculator2/Calculator.java
index b3d79eb..392447c 100644
--- a/src/com/android/calculator2/Calculator.java
+++ b/src/com/android/calculator2/Calculator.java
@@ -44,10 +44,10 @@
import android.graphics.Rect;
import android.net.Uri;
import android.os.Bundle;
-import android.support.annotation.NonNull;
-import android.support.annotation.StringRes;
-import android.support.v4.content.ContextCompat;
-import android.support.v4.view.ViewPager;
+import androidx.annotation.NonNull;
+import androidx.annotation.StringRes;
+import androidx.core.content.ContextCompat;
+import androidx.viewpager.widget.ViewPager;
import android.text.Editable;
import android.text.SpannableStringBuilder;
import android.text.Spanned;
diff --git a/src/com/android/calculator2/CalculatorPadViewPager.java b/src/com/android/calculator2/CalculatorPadViewPager.java
index 9197342..0f430b0 100644
--- a/src/com/android/calculator2/CalculatorPadViewPager.java
+++ b/src/com/android/calculator2/CalculatorPadViewPager.java
@@ -18,8 +18,8 @@
import android.content.Context;
import android.graphics.Color;
-import android.support.v4.view.PagerAdapter;
-import android.support.v4.view.ViewPager;
+import androidx.viewpager.widget.PagerAdapter;
+import androidx.viewpager.widget.ViewPager;
import android.util.AttributeSet;
import android.util.Log;
import android.view.GestureDetector;
diff --git a/src/com/android/calculator2/CalculatorResult.java b/src/com/android/calculator2/CalculatorResult.java
index d2ba9a8..8fa698b 100644
--- a/src/com/android/calculator2/CalculatorResult.java
+++ b/src/com/android/calculator2/CalculatorResult.java
@@ -23,9 +23,9 @@
import android.content.Context;
import android.graphics.Rect;
import android.os.Build;
-import android.support.annotation.IntDef;
-import android.support.v4.content.ContextCompat;
-import android.support.v4.os.BuildCompat;
+import androidx.annotation.IntDef;
+import androidx.core.content.ContextCompat;
+import androidx.core.os.BuildCompat;
import android.text.Layout;
import android.text.Spannable;
import android.text.SpannableString;
diff --git a/src/com/android/calculator2/DragController.java b/src/com/android/calculator2/DragController.java
index 1716cc9..5b9b1c6 100644
--- a/src/com/android/calculator2/DragController.java
+++ b/src/com/android/calculator2/DragController.java
@@ -17,7 +17,7 @@
package com.android.calculator2;
import android.animation.ArgbEvaluator;
-import android.support.v7.widget.RecyclerView;
+import androidx.recyclerview.widget.RecyclerView;
import android.view.View;
import android.widget.TextView;
diff --git a/src/com/android/calculator2/DragLayout.java b/src/com/android/calculator2/DragLayout.java
index 3264b73..e34c4da 100644
--- a/src/com/android/calculator2/DragLayout.java
+++ b/src/com/android/calculator2/DragLayout.java
@@ -24,8 +24,8 @@
import android.graphics.Rect;
import android.os.Bundle;
import android.os.Parcelable;
-import android.support.v4.view.ViewCompat;
-import android.support.v4.widget.ViewDragHelper;
+import androidx.core.view.ViewCompat;
+import androidx.customview.widget.ViewDragHelper;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
diff --git a/src/com/android/calculator2/Evaluator.java b/src/com/android/calculator2/Evaluator.java
index 655aa70..eee9fa8 100644
--- a/src/com/android/calculator2/Evaluator.java
+++ b/src/com/android/calculator2/Evaluator.java
@@ -22,9 +22,9 @@
import android.os.AsyncTask;
import android.os.Handler;
import android.preference.PreferenceManager;
-import android.support.annotation.NonNull;
-import android.support.annotation.StringRes;
-import android.support.annotation.VisibleForTesting;
+import androidx.annotation.NonNull;
+import androidx.annotation.StringRes;
+import androidx.annotation.VisibleForTesting;
import android.text.Spannable;
import android.util.Log;
diff --git a/src/com/android/calculator2/HistoryAdapter.java b/src/com/android/calculator2/HistoryAdapter.java
index 629abe9..be50050 100644
--- a/src/com/android/calculator2/HistoryAdapter.java
+++ b/src/com/android/calculator2/HistoryAdapter.java
@@ -16,7 +16,7 @@
package com.android.calculator2;
-import android.support.v7.widget.RecyclerView;
+import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
diff --git a/src/com/android/calculator2/HistoryFragment.java b/src/com/android/calculator2/HistoryFragment.java
index c37241c..eb2a325 100644
--- a/src/com/android/calculator2/HistoryFragment.java
+++ b/src/com/android/calculator2/HistoryFragment.java
@@ -19,8 +19,8 @@
import android.animation.Animator;
import android.app.Fragment;
import android.os.Bundle;
-import android.support.v4.content.ContextCompat;
-import android.support.v7.widget.RecyclerView;
+import androidx.core.content.ContextCompat;
+import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View;
@@ -29,7 +29,7 @@
import java.util.ArrayList;
-import static android.support.v7.widget.RecyclerView.SCROLL_STATE_DRAGGING;
+import static androidx.recyclerview.widget.RecyclerView.SCROLL_STATE_DRAGGING;
public class HistoryFragment extends Fragment implements DragLayout.DragCallback {