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


Java TokenCompleteTextView类代码示例

本文整理汇总了Java中com.tokenautocomplete.TokenCompleteTextView的典型用法代码示例。如果您正苦于以下问题:Java TokenCompleteTextView类的具体用法?Java TokenCompleteTextView怎么用?Java TokenCompleteTextView使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: onCreateEx

import com.tokenautocomplete.TokenCompleteTextView; //导入依赖的package包/类
protected void onCreateEx(Bundle icicle) {
    setContentView(R.layout.activity_post);
    m_postTo = (TokenCompleteTextView) findViewById(R.id.postTo);
    m_postCc = (TokenCompleteTextView) findViewById(R.id.postCc);

    if(icicle == null) {
        m_postTo.setPrefix(getString(R.string.post_to_label));
        m_postCc.setPrefix(getString(R.string.post_cc_label));
    }

    m_peopleAdapter = new PeopleAdapter(this);
    m_postTo.setAdapter(m_peopleAdapter);
    m_postCc.setAdapter(m_peopleAdapter);

    PersonTokenViewAdapter ad = new PersonTokenViewAdapter(this);
    m_postTo.setViewAdapter(ad);
    m_postCc.setViewAdapter(ad);
}
 
开发者ID:erincandescent,项目名称:Impeller,代码行数:19,代码来源:PostActivity.java

示例2: setCallsigns

import com.tokenautocomplete.TokenCompleteTextView; //导入依赖的package包/类
private void setCallsigns(CallSignResource[] data) {
    callSignsCompletion = (CallsignsCompletionView) findViewById(R.id.callSignSearchView);
    callSignsCompletion.setAdapter(generateAdapter(data));
    callSignsCompletion.setTokenListener(this);
    callSignsCompletion.setTokenClickStyle(TokenCompleteTextView.TokenClickStyle.Select);
    callSignsCompletion.allowDuplicates(false);
    callSignsCompletion.setThreshold(0);
    callSignsCompletion.setInputType(InputType.TYPE_CLASS_TEXT|InputType.TYPE_TEXT_VARIATION_FILTER|InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
    callSignsCompletion.performBestGuess(true);
}
 
开发者ID:DecentralizedAmateurPagingNetwork,项目名称:DAPNETApp,代码行数:11,代码来源:PostCallActivity.java

示例3: setTransmittergroups

import com.tokenautocomplete.TokenCompleteTextView; //导入依赖的package包/类
private void setTransmittergroups(TransmitterGroupResource[] data) {
    transmitterGroupCompletion = (TransmitterGroupCompletionView) findViewById(R.id.transmittergroupSearchView);
    transmitterGroupCompletion.setAdapter(generateAdapter(data));
    transmitterGroupCompletion.setTokenListener(new tokenTransmitter());
    transmitterGroupCompletion.setTokenClickStyle(TokenCompleteTextView.TokenClickStyle.Select);
    transmitterGroupCompletion.allowDuplicates(false);
    transmitterGroupCompletion.performBestGuess(true);
    transmitterGroupCompletion.setThreshold(1);
    transmitterGroupCompletion.setInputType(InputType.TYPE_CLASS_TEXT|InputType.TYPE_TEXT_VARIATION_FILTER|InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
    if (transmitterGroupCompletion.getObjects()==null||transmitterGroupCompletion.getObjects().size()==0){
        transmitterGroupCompletion.addObject(new TransmitterGroupResource("ALL"));
    }
}
 
开发者ID:DecentralizedAmateurPagingNetwork,项目名称:DAPNETApp,代码行数:14,代码来源:PostCallActivity.java

示例4: onCreateEx

import com.tokenautocomplete.TokenCompleteTextView; //导入依赖的package包/类
@Override
protected void onCreateEx(Bundle savedInstanceState) {
    setContentView(R.layout.activity_share);

    String objJSON = getIntent().getStringExtra(Constants.EXTRA_AS_OBJECT);
    if(objJSON == null) {
        finishActivity(RESULT_CANCELED);
        return;
    }

    try {
        m_object = new JSONObject(objJSON);
    } catch (JSONException e) {
        Log.e(TAG, "Receiving object", e);
        finishActivity(RESULT_CANCELED);
        return;
    }

    m_peopleAdapter = new PeopleAdapter(this);
    PersonTokenViewAdapter ad = new PersonTokenViewAdapter(this);

    m_postTo = (TokenCompleteTextView) findViewById(R.id.postTo);
    m_postCc = (TokenCompleteTextView) findViewById(R.id.postCc);

    m_postTo.setAdapter(m_peopleAdapter);
    m_postCc.setAdapter(m_peopleAdapter);
    m_postTo.setViewAdapter(ad);
    m_postCc.setViewAdapter(ad);

    findViewById(R.id.ok).setOnClickListener(this);
    findViewById(R.id.cancel).setOnClickListener(this);
}
 
开发者ID:erincandescent,项目名称:Impeller,代码行数:33,代码来源:ShareActivity.java


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