当前位置: 首页>>代码示例>>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;未经允许,请勿转载。