diff --git a/app/app-release.apk b/app/app-release.apk index 404372f..e4fb436 100644 Binary files a/app/app-release.apk and b/app/app-release.apk differ diff --git a/app/src/main/java/com/abhijitvalluri/android/fitnotifications/AppChoicesActivity.java b/app/src/main/java/com/abhijitvalluri/android/fitnotifications/AppChoicesActivity.java index 56a7a7a..097b9bc 100644 --- a/app/src/main/java/com/abhijitvalluri/android/fitnotifications/AppChoicesActivity.java +++ b/app/src/main/java/com/abhijitvalluri/android/fitnotifications/AppChoicesActivity.java @@ -84,6 +84,7 @@ protected void onPostExecute(Void result) { setupAdapter(); } } + @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -237,14 +238,6 @@ private AppSelection getAppSelection(String appPackageName) { private Void appListTask() { List packages = Func.getInstalledPackages(mPackageManager); - Collections.sort(packages, new Comparator() { - @Override - public int compare(ResolveInfo lhs, ResolveInfo rhs) { - return String.CASE_INSENSITIVE_ORDER.compare( - lhs.loadLabel(mPackageManager).toString(), - rhs.loadLabel(mPackageManager).toString()); - } - }); // getAppSelectionsSubList is also needed for the subsequent calls to contains() List appSelections = mAppSelectionsStore.getAppSelections(); @@ -402,6 +395,12 @@ private class ActivityAdapter extends RecyclerView.Adapter { public ActivityAdapter(List appSelectionsSubList) { mAppSelectionsSubList = appSelectionsSubList; + Collections.sort(mAppSelectionsSubList, new Comparator() { + @Override + public int compare(AppSelection lhs, AppSelection rhs) { + return String.CASE_INSENSITIVE_ORDER.compare(lhs.getAppName(), rhs.getAppName()); + } + }); } @Override diff --git a/app/src/main/java/com/abhijitvalluri/android/fitnotifications/HomeActivity.java b/app/src/main/java/com/abhijitvalluri/android/fitnotifications/HomeActivity.java index 6dbec14..4d6439b 100644 --- a/app/src/main/java/com/abhijitvalluri/android/fitnotifications/HomeActivity.java +++ b/app/src/main/java/com/abhijitvalluri/android/fitnotifications/HomeActivity.java @@ -96,7 +96,7 @@ protected void onCreate(Bundle savedInstanceState) { } if (mPreferences.getInt(getString(R.string.version_key), 0) < Constants.VERSION_CODE - && mPreferences.getInt(getString(R.string.version_key), 0) > 0) { + && mPreferences.getBoolean(getString(R.string.done_first_launch_key), false)) { // App has been updated AppSelectionsStore store = AppSelectionsStore.get(this); List appSelections = store.getAppSelections(); diff --git a/app/src/main/java/com/abhijitvalluri/android/fitnotifications/setup/AppIntroActivity.java b/app/src/main/java/com/abhijitvalluri/android/fitnotifications/setup/AppIntroActivity.java index fe442a9..b3723bf 100644 --- a/app/src/main/java/com/abhijitvalluri/android/fitnotifications/setup/AppIntroActivity.java +++ b/app/src/main/java/com/abhijitvalluri/android/fitnotifications/setup/AppIntroActivity.java @@ -370,6 +370,12 @@ public void onClick(View v) { setButtonNextFunction(BUTTON_NEXT_FUNCTION_NEXT_FINISH); } + @Override + public void onBackPressed() { + super.onBackPressed(); + overridePendingTransition(R.transition.right_in, R.transition.right_out); + } + @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { switch(requestCode) { diff --git a/app/src/main/res/layout-land/fragment_home.xml b/app/src/main/res/layout-land/fragment_home.xml index 5d37921..9a69d41 100644 --- a/app/src/main/res/layout-land/fragment_home.xml +++ b/app/src/main/res/layout-land/fragment_home.xml @@ -2,69 +2,90 @@ + android:layout_height="match_parent" + android:background="@color/white"> - + android:orientation="vertical" + android:background="@drawable/bottom_gray_border"> + + - + android:orientation="vertical" + android:background="@drawable/bottom_gray_border"> + + - + android:orientation="vertical" + android:background="@drawable/bottom_gray_border"> + + - - + android:orientation="vertical" + android:background="@drawable/bottom_gray_border"> + + diff --git a/app/src/main/res/layout/activity_app_settings.xml b/app/src/main/res/layout/activity_app_settings.xml index 43a0720..6614e33 100644 --- a/app/src/main/res/layout/activity_app_settings.xml +++ b/app/src/main/res/layout/activity_app_settings.xml @@ -1,93 +1,104 @@ - + - - - - + android:orientation="vertical" + android:padding="@dimen/activity_padding" + android:descendantFocusability="beforeDescendants" + android:focusable="true" + android:focusableInTouchMode="true"> - + - + - + - + - + - + -