當前位置: 首頁>>代碼示例>>Java>>正文


Java ListView.setTextFilterEnabled方法代碼示例

本文整理匯總了Java中android.widget.ListView.setTextFilterEnabled方法的典型用法代碼示例。如果您正苦於以下問題:Java ListView.setTextFilterEnabled方法的具體用法?Java ListView.setTextFilterEnabled怎麽用?Java ListView.setTextFilterEnabled使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.widget.ListView的用法示例。


在下文中一共展示了ListView.setTextFilterEnabled方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: init

import android.widget.ListView; //導入方法依賴的package包/類
/**
 * Function to init activity view
 */
private void init() {

    //init views
    adapter = new TranslationAdapter(this);
    translationManagmentList = (ListView) findViewById(R.id.download);
    translationManagmentList.setOnItemClickListener(this);
    translationManagmentList.setTextFilterEnabled(true);
    translationManagmentList.setEmptyView(findViewById(R.id.progressBar3));
    translationManagmentList.setAdapter(adapter);

    //async thread to load translations
    new TafaseerLists().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}
 
開發者ID:fekracomputers,項目名稱:QuranAndroid,代碼行數:17,代碼來源:TranslationsActivity.java

示例2: onCreate

import android.widget.ListView; //導入方法依賴的package包/類
@Override
public void onCreate(Bundle icicle) {
    super.onCreate(icicle);
    setVolumeControlStream(AudioManager.STREAM_MUSIC);

    setContentView(R.layout.weekpicker);
    ListView mWeeks = getListView();
    mWeeks.setTextFilterEnabled(true);
    setTitle(R.string.weekpicker_title);
}
 
開發者ID:89luca89,項目名稱:ThunderMusic,代碼行數:11,代碼來源:WeekSelector.java

示例3: initView

import android.widget.ListView; //導入方法依賴的package包/類
private void initView() {
        searchView=(SearchView)findViewById(R.id.search_view);
        tv_tip=(TextView)findViewById(R.id.tv_tip);
        tv_clear=(TextView)findViewById(R.id.tv_clear);
        listview=(ListView)findViewById(R.id.listView);
        listview.setTextFilterEnabled(true);
}
 
開發者ID:xdstudent,項目名稱:ZhiHuIndex-master,代碼行數:8,代碼來源:SearchActivity.java

示例4: onCreate

import android.widget.ListView; //導入方法依賴的package包/類
/******************************************************************
** Activity life cycle
******************************************************************/

@Override
public void onCreate(Bundle icicle) {
    super.onCreate(icicle);
    Log.d(TAG, "onCreate : intent=" + getIntent());
    
    requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);

    if (icicle != null) {
        // Restore former activity state
        mListState = icicle.getParcelable(LIST_STATE_KEY);
        mListHasFocus = icicle.getBoolean(FOCUS_KEY);
    }
    
    if (Intent.ACTION_GET_CONTENT.equals(getIntent().getAction())) {
        mBaseUri = VideoStore.Video.Media.EXTERNAL_CONTENT_URI;
    } else {
        mBaseUri = getIntent().getData();
        if (mBaseUri == null) {
            Log.e(TAG, "No data URI given to GET_CONTENT action");
            setResult(RESULT_CANCELED);
            finish();
            return;
        }
    }

    setContentView(R.layout.video_picker);

    final ListView listView = getListView();
    listView.setItemsCanFocus(false);
    listView.setTextFilterEnabled(true);
    listView.setOnItemClickListener(this);

    mAdapter = new VideoListAdapter(this, listView,
            R.layout.video_picker_item, new String[] {},
            new int[] {});

    setListAdapter(mAdapter);
    
    // We manually save/restore the listview state
    listView.setSaveEnabled(false);

    mQueryHandler = new QueryHandler(this);

    mProgressContainer = findViewById(R.id.progressContainer);
    mListContainer = findViewById(R.id.listContainer);
    mCancelButton = findViewById(R.id.cancelButton);
    mCancelButton.setOnClickListener(this);
   
    // If there is a currently selected Uri, then try to determine who it is.
    if (mSelectedUri != null) {
        Uri.Builder builder = mSelectedUri.buildUpon();
        String path = mSelectedUri.getEncodedPath();
        int idx = path.lastIndexOf('/');
        if (idx >= 0) {
            path = path.substring(0, idx);
        }
        builder.encodedPath(path);
        Uri baseSelectedUri = builder.build();
        if (DBG) Log.v(TAG, "Selected Uri: " + mSelectedUri);
        if (DBG) Log.v(TAG, "Selected base Uri: " + baseSelectedUri);
        if (DBG) Log.v(TAG, "Base Uri: " + mBaseUri);
        if (baseSelectedUri.equals(mBaseUri)) {
            // If the base Uri of the selected Uri is the same as our
            // content's base Uri, then use the selection!
            mSelectedId = ContentUris.parseId(mSelectedUri);
        }
    }

    doQuery(false, null);
}
 
開發者ID:archos-sa,項目名稱:aos-Video,代碼行數:75,代碼來源:VideoPicker.java

示例5: onCreate

import android.widget.ListView; //導入方法依賴的package包/類
@Override
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);

        getWindow().setFlags(LayoutParams.FLAG_NOT_TOUCH_MODAL, LayoutParams.FLAG_NOT_TOUCH_MODAL);
        getWindow().setFlags(LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH, LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH);

        // Notify the application that the activity has started
        CustomApplication app = (CustomApplication)getApplication();
        app.setAutoScraperActive(true);
        mScraper = new Scraper(this);

        // Check if the intent which created this activity contains a folder path
        Uri folderUri = getIntent().getData();
        if (folderUri != null) {
            mFolderMode = true;
            // FIXME: this is broken for smb:// files
            mFolderPath = folderUri.getPath();
            if (DBG) Log.d(TAG, "onCreate : search in folder " + mFolderPath);
        }
        else {
            mFolderMode = false;
            mFolderPath = null;
            if (DBG) Log.d(TAG, "onCreate : search in the full database");
        }

        setContentView(R.layout.auto_scraper_main);

        mMainView = findViewById(R.id.main_view);
        mAbortButton = (Button)findViewById(R.id.abort_button);
        mAbortButton.setOnClickListener(this);
        mExitButton = (Button)findViewById(R.id.exit_button);
        mExitButton.setOnClickListener(this);

        mListView = (ListView) findViewById(R.id.list_items);
        mListView.setTextFilterEnabled(true);
        mListView.setCacheColorHint(0);
        mListView.setSelector(R.drawable.list_selector_no_background);
        mListView.setOnCreateContextMenuListener(this);
        mListView.setOnScrollListener(this);
        mListView.setOnKeyListener(this);

        mActivityFileCursor = getFileListCursor();
        getColumnIndices(mActivityFileCursor);
        buildFileProperties(mActivityFileCursor);
        mAdapterFileCursor = buildAdapterCursor(mActivityFileCursor);

        mAdapter = new AutoScraperAdapter(getApplication(), this,
                                          R.layout.auto_scraper_item,
                                          mAdapterFileCursor);
        mListView.setAdapter(mAdapter);
/*
        if (!mListView.isInTouchMode()) {
            // The application is remotely controlled => set the focus by default
            // on the Cancel button so that the user can abort the task with a 
            // single click instead of navigating the full ListView
            mAbortButton.requestFocus();
        }
*/
        mEmptyView = buildEmptyView();
        mListView.setEmptyView(mEmptyView);
        updateControlButtons(false);
        if (mFileCount > 0) {
            mMainView.setVisibility(View.VISIBLE);
        }
        else {
            mMainView.setVisibility(View.GONE);
        }

        mIsLargeScreen = getResources().getConfiguration().isLayoutSizeAtLeast(Configuration.SCREENLAYOUT_SIZE_LARGE)|| TVUtils.isTV(this);

        PowerManager pm = (PowerManager)getSystemService(Context.POWER_SERVICE);
        mWakeLock = pm.newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK | PowerManager.ON_AFTER_RELEASE, "AutoScraperActivity");
    }
 
開發者ID:archos-sa,項目名稱:aos-Video,代碼行數:75,代碼來源:AutoScraperActivity.java


注:本文中的android.widget.ListView.setTextFilterEnabled方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。