本文整理汇总了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);
}
示例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);
}
示例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"));
}
}
示例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);
}