本文整理汇总了Java中com.tokenautocomplete.TokenCompleteTextView.setAdapter方法的典型用法代码示例。如果您正苦于以下问题:Java TokenCompleteTextView.setAdapter方法的具体用法?Java TokenCompleteTextView.setAdapter怎么用?Java TokenCompleteTextView.setAdapter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.tokenautocomplete.TokenCompleteTextView
的用法示例。
在下文中一共展示了TokenCompleteTextView.setAdapter方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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);
}