diff options
author | stefan-niedermann <info@niedermann.it> | 2019-02-06 19:47:20 +0300 |
---|---|---|
committer | stefan-niedermann <info@niedermann.it> | 2019-02-06 19:47:20 +0300 |
commit | 2b7ee5886c74ea14b426011a2df7dc46f3cc60c8 (patch) | |
tree | be560c7ce7c0024985aeced878c969100297f0fe /app | |
parent | 3733ada12fb541557a74c85b3d8cece9bfd5f10e (diff) |
Migrate to `androidx`
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/it/niedermann/owncloud/notes/android/fragment/BaseNoteFragment.java | 17 | ||||
-rw-r--r-- | app/src/main/java/it/niedermann/owncloud/notes/util/DisplayUtils.java | 3 |
2 files changed, 9 insertions, 11 deletions
diff --git a/app/src/main/java/it/niedermann/owncloud/notes/android/fragment/BaseNoteFragment.java b/app/src/main/java/it/niedermann/owncloud/notes/android/fragment/BaseNoteFragment.java index 8a425089..aee5bc9e 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/android/fragment/BaseNoteFragment.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/android/fragment/BaseNoteFragment.java @@ -6,16 +6,8 @@ import android.app.FragmentManager; import android.content.Intent; import android.os.Build; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.view.MenuItemCompat; -import android.support.v4.view.ViewCompat; -import android.support.v7.widget.SearchView; -import android.support.v7.widget.ShareActionProvider; import android.text.SpannableString; import android.text.TextUtils; -import androidx.annotation.Nullable; -import androidx.core.view.MenuItemCompat; -import androidx.appcompat.widget.ShareActionProvider; import android.util.Log; import android.view.Menu; import android.view.MenuInflater; @@ -25,6 +17,11 @@ import android.view.ViewTreeObserver; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.annotation.Nullable; +import androidx.appcompat.widget.SearchView; +import androidx.appcompat.widget.ShareActionProvider; +import androidx.core.view.MenuItemCompat; +import androidx.core.view.ViewCompat; import it.niedermann.owncloud.notes.R; import it.niedermann.owncloud.notes.model.CloudNote; import it.niedermann.owncloud.notes.model.DBNote; @@ -158,7 +155,7 @@ public abstract class BaseNoteFragment extends Fragment implements CategoryDialo prepareFavoriteOption(itemFavorite); searchMenuItem = menu.findItem(R.id.search); - searchView = (android.support.v7.widget.SearchView) searchMenuItem.getActionView(); + searchView = (SearchView) searchMenuItem.getActionView(); if (!TextUtils.isEmpty(searchQuery) && isNew) { searchMenuItem.expandActionView(); @@ -169,7 +166,7 @@ public abstract class BaseNoteFragment extends Fragment implements CategoryDialo } - final LinearLayout searchEditFrame = searchView.findViewById(android.support.v7.appcompat.R.id + final LinearLayout searchEditFrame = searchView.findViewById(R.id .search_edit_frame); searchEditFrame.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() { diff --git a/app/src/main/java/it/niedermann/owncloud/notes/util/DisplayUtils.java b/app/src/main/java/it/niedermann/owncloud/notes/util/DisplayUtils.java index 431b3ed9..53d58bac 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/util/DisplayUtils.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/util/DisplayUtils.java @@ -20,7 +20,6 @@ package it.niedermann.owncloud.notes.util; import android.graphics.Typeface; -import android.support.annotation.ColorInt; import android.text.Spannable; import android.text.TextUtils; import android.text.style.CharacterStyle; @@ -30,6 +29,8 @@ import android.text.style.StyleSpan; import java.util.regex.Matcher; import java.util.regex.Pattern; +import androidx.annotation.ColorInt; + public class DisplayUtils { public static Spannable searchAndColor(String text, Spannable spannable, String searchText, @ColorInt int color) { |