当前位置: 首页>>代码示例>>Java>>正文


Java AlphabetIndexer.setCursor方法代码示例

本文整理汇总了Java中android.widget.AlphabetIndexer.setCursor方法的典型用法代码示例。如果您正苦于以下问题:Java AlphabetIndexer.setCursor方法的具体用法?Java AlphabetIndexer.setCursor怎么用?Java AlphabetIndexer.setCursor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.widget.AlphabetIndexer的用法示例。


在下文中一共展示了AlphabetIndexer.setCursor方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: index

import android.widget.AlphabetIndexer; //导入方法依赖的package包/类
public Cursor index(Cursor cursor){
	if(cursor != null){
		mRowStates = new int[cursor.getCount()];
		mAlphaIndexer = new AlphabetIndexer(cursor, 
		    		1, 
		    		mAlphabet);
		mAlphaIndexer.setCursor(cursor);
        Arrays.fill(mRowStates, STATE_UNKNOWN);
	} else {
		mRowStates = new int[0];
		mAlphaIndexer = null;
	}
    if(mRowStates.length > 0)
        mRowStates[0] = STATE_LABELED;
    return cursor;
}
 
开发者ID:SanaMobile,项目名称:sana.mobile,代码行数:17,代码来源:PatientListFragment.java

示例2: swapCursor

import android.widget.AlphabetIndexer; //导入方法依赖的package包/类
@Override
public Cursor swapCursor(Cursor newCursor) {
    Cursor oldCursor = super.swapCursor(newCursor);

    // Create an indexer for the first time, indexing on domain.
    if (newCursor != null) {
        mAlphabetIndexer = new AlphabetIndexer(newCursor, newCursor.getColumnIndex(Secret.DOMAIN), ALPHABET);
    }
    // Update an existing indexer with the latest cursor.
    if (mAlphabetIndexer != null) {
        mAlphabetIndexer.setCursor(newCursor);
    }

    return oldCursor;
}
 
开发者ID:cpoppema,项目名称:pass-mobile-android,代码行数:16,代码来源:SecretsAdapter.java

示例3: swapCursor

import android.widget.AlphabetIndexer; //导入方法依赖的package包/类
@Override
public Cursor swapCursor(Cursor newCursor) {
    if(newCursor != null && !newCursor.isClosed()){

        indexer = new AlphabetIndexer(newCursor,
                newCursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME),
                " ABCDEFGHIJKLMNOPQRTSUVWXYZ0123456789");
    }else{
        indexer.setCursor(newCursor);
    }
    return super.swapCursor(newCursor);
}
 
开发者ID:Ioane5,项目名称:GeoSMS-Release,代码行数:13,代码来源:ContactsCursorAdapter.java

示例4: init

import android.widget.AlphabetIndexer; //导入方法依赖的package包/类
private void init(Cursor c) {
    if (c == null) {
        return;
    }
    //mWrapper = new PatientWrapper(c);
    //c.setNotificationUri(context.getContentResolver(), Patients.CONTENT_URI);
    mRowStates = new int[c.getCount()];
    Arrays.fill(mRowStates, STATE_UNKNOWN);
    if(mRowStates.length > 0)
        mRowStates[0] = STATE_LABELED;
    mAlphaIndexer = new AlphabetIndexer(c, 
            1, 
            mAlphabet);
    mAlphaIndexer.setCursor(c);
}
 
开发者ID:SanaMobile,项目名称:sana.mobile,代码行数:16,代码来源:PatientListFragment.java

示例5: SpeciesGroupListCursorAdapter

import android.widget.AlphabetIndexer; //导入方法依赖的package包/类
public SpeciesGroupListCursorAdapter(Context context, Cursor c, int flags) {
	super(context, c, flags);

	mAlphabetIndexer = new AlphabetIndexer(c,
			c.getColumnIndex(FieldGuideDatabase.SPECIES_GROUP),
			" ABCDEFGHIJKLMNOPQRTSUVWXYZ");
	mAlphabetIndexer.setCursor(c);
}
 
开发者ID:museumsvictoria,项目名称:mv-fieldguide-android,代码行数:9,代码来源:SpeciesGroupListCursorAdapter.java

示例6: SpeciesCursorAdapter

import android.widget.AlphabetIndexer; //导入方法依赖的package包/类
public SpeciesCursorAdapter(Context context, Cursor c, int flags) {
	super(context, c, flags);

	mAlphabetIndexer = new AlphabetIndexer(c,
			c.getColumnIndex(FieldGuideDatabase.SPECIES_GROUP),
			" ABCDEFGHIJKLMNOPQRTSUVWXYZ");
	mAlphabetIndexer.setCursor(c);
}
 
开发者ID:museumsvictoria,项目名称:mv-fieldguide-android,代码行数:9,代码来源:SpeciesGroupListFragment.java

示例7: AlphabetIndexerCursorAdapter

import android.widget.AlphabetIndexer; //导入方法依赖的package包/类
public AlphabetIndexerCursorAdapter(Bundle savedInstanceState, Context context, Cursor cursor) {
    super(savedInstanceState, context, R.layout.mca__simple_list_item_checkable_1, cursor, FROM, TO, 0);

    // Sets a new cursor as the data set and resets the cache of indices.
    int columnIndex = cursor.getColumnIndex(BuildingsContract.NAME);
    alphabetIndexer = new AlphabetIndexer(cursor, columnIndex, " ABCDEFGHIJKLMNOPQRTSUVWXYZ");
    alphabetIndexer.setCursor(cursor);
}
 
开发者ID:ManuelPeinado,项目名称:MultiChoiceAdapter,代码行数:9,代码来源:AlphabetIndexerCursorAdapter.java

示例8: SpeciesListCursorAdapter

import android.widget.AlphabetIndexer; //导入方法依赖的package包/类
public SpeciesListCursorAdapter(Context context, Cursor c, int flags) {
	super(context, c, flags);
	
	mAlphabetIndexer = new AlphabetIndexer(c, c.getColumnIndex(FieldGuideDatabase.SPECIES_LABEL), " ABCDEFGHIJKLMNOPQRTSUVWXYZ");
       mAlphabetIndexer.setCursor(c);
}
 
开发者ID:museumsvictoria,项目名称:mv-fieldguide-android,代码行数:7,代码来源:SpeciesListCursorAdapter.java


注:本文中的android.widget.AlphabetIndexer.setCursor方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。