Android Open Source - FileManager Clear Search Suggestions






From Project

Back to project page FileManager.

License

The source code is released under:

GNU General Public License

If you think the Android project FileManager listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.ankur.coreutils;
/*from   ww w . j a  va  2 s.c  o m*/
import com.ankur.core.R;

import android.content.Context;
import android.preference.Preference;
import android.provider.SearchRecentSuggestions;
import android.util.AttributeSet;
import android.widget.Toast;

/* ClearSearchSuggestions
 *     The Special clear recent search suggestions
 *     Needs its own special class so you can just click on it */
public class ClearSearchSuggestions extends Preference {
  // This is the constructor called by the inflater
  public ClearSearchSuggestions(Context context, AttributeSet attrs) {
    super(context, attrs);
  }

  @Override
  protected void onClick() {
    SearchRecentSuggestions suggestions = new SearchRecentSuggestions(
        getContext(), SearchSuggestions.AUTHORITY,
        SearchSuggestions.MODE);
    suggestions.clearHistory();

    Toast.makeText(getContext(), R.string.suggestionscleared,
        Toast.LENGTH_SHORT).show();
    notifyChanged();
  }
}




Java Source Code List

com.ankur.core.AppManager.java
com.ankur.core.DirectoryInfo.java
com.ankur.core.EventHandler.java
com.ankur.core.FileUtils.java
com.ankur.core.InfoDialog.java
com.ankur.core.Main.java
com.ankur.core.Settings.java
com.ankur.coreutils.Bookmarks.java
com.ankur.coreutils.CheckBoxActivity.java
com.ankur.coreutils.ClearSearchSuggestions.java
com.ankur.coreutils.Compress.java
com.ankur.coreutils.Decompress.java
com.ankur.coreutils.ImagePreview.java
com.ankur.coreutils.LinuxShell.java
com.ankur.coreutils.SearchSuggestions.java
com.ankur.coreutils.VideoPreview.java