本文整理汇总了Java中me.gujun.android.taggroup.TagGroup类的典型用法代码示例。如果您正苦于以下问题:Java TagGroup类的具体用法?Java TagGroup怎么用?Java TagGroup使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TagGroup类属于me.gujun.android.taggroup包,在下文中一共展示了TagGroup类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import me.gujun.android.taggroup.TagGroup; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_post);
ButterKnife.bind(this);
// 初始化工具栏
setSupportActionBar(toolbar);
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
ActionBar ab = getSupportActionBar();
if (ab != null)
ab.setDisplayHomeAsUpEnabled(true);
// 实例化控件
editTitle.validate("\\w{5,}", "标题长度不能少于5个字");
tagGroup.setOnTagClickListener(new TagGroup.OnTagClickListener() {
@Override
public void onTagClick(String tag) {
topics.remove(tag);
tagGroup.setTags(topics);
}
});
}
示例2: ViewHolder
import me.gujun.android.taggroup.TagGroup; //导入依赖的package包/类
ViewHolder(View itemView) {
super(itemView);
this.title = (TextView) itemView.findViewById(R.id.title);
this.subtitle = (TextView) itemView.findViewById(R.id.library_count);
this.permissionGroupDangerous =
(TagGroup) itemView.findViewById(R.id.permission_group_dangerous);
this.permissionGroupNormal = (TagGroup) itemView.findViewById(R.id.permission_group_normal);
}
示例3: onCreate
import me.gujun.android.taggroup.TagGroup; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_tag_editor);
mTagsManager = TagsManager.getInstance(getApplicationContext());
String[] tags = mTagsManager.getTags();
mTagGroup = (TagGroup) findViewById(R.id.tag_group);
mTagGroup.setTags(tags);
}
示例4: TopicViewHolder
import me.gujun.android.taggroup.TagGroup; //导入依赖的package包/类
public TopicViewHolder(View view) {
super(view);
ButterKnife.bind(this, view);
tagGroup.setOnTagClickListener(new TagGroup.OnTagClickListener() {
@Override
public void onTagClick(String tag) {
Intent intent = new Intent(mContext, TopicActivity.class);
intent.putExtra(Config.INT_TOPIC_NAME, tag);
intent.putExtra(Config.INT_TOPIC_ID, reverseIndex.get(tag));
mContext.startActivity(intent);
}
});
}
示例5: TopicViewHolder
import me.gujun.android.taggroup.TagGroup; //导入依赖的package包/类
public TopicViewHolder(View view) {
super(view);
ButterKnife.bind(this, view);
tagGroup.setOnTagClickListener(new TagGroup.OnTagClickListener() {
@Override
public void onTagClick(String tag) {
Intent intent = new Intent(mContext, TopicActivity.class);
intent.putExtra(Config.INT_TOPIC_ID, reverseIndex.get(tag));
intent.putExtra(Config.INT_TOPIC_NAME, tag);
mContext.startActivity(intent);
}
});
}
示例6: init
import me.gujun.android.taggroup.TagGroup; //导入依赖的package包/类
private void init() {
rootView = LayoutInflater.from(getContext()).inflate(R.layout.view_member_detail_header, this);
profileImageView = (ImageView) rootView.findViewById(R.id.profile_image);
favoriteIcon = (ImageView) rootView.findViewById(R.id.favorite_icon);
nameMainTextView = (TextView) rootView.findViewById(R.id.name_main);
nameSubTextView = (TextView) rootView.findViewById(R.id.name_sub);
birthdayTextView = (TextView) rootView.findViewById(R.id.birthday);
bloodTypeTextView = (TextView) rootView.findViewById(R.id.blood_type);
constellationTextView = (TextView) rootView.findViewById(R.id.constellation);
heightTextView = (TextView) rootView.findViewById(R.id.height);
tags = (TagGroup) rootView.findViewById(R.id.tags);
}
示例7: onCreate
import me.gujun.android.taggroup.TagGroup; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mTagsManager = TagsManager.getInstance(getApplicationContext());
String[] tags = mTagsManager.getTags();
mPromptText = (TextView) findViewById(R.id.tv_prompt);
mPromptText.setVisibility((tags == null || tags.length == 0) ? View.VISIBLE : View.GONE);
mPromptText.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
launchTagEditorActivity();
}
});
mDefaultTagGroup = (TagGroup) findViewById(R.id.tag_group);
mSmallTagGroup = (TagGroup) findViewById(R.id.tag_group_small);
mLargeTagGroup = (TagGroup) findViewById(R.id.tag_group_large);
mBeautyTagGroup = (TagGroup) findViewById(R.id.tag_group_beauty);
mBeautyInverseTagGroup = (TagGroup) findViewById(R.id.tag_group_beauty_inverse);
if (tags != null && tags.length > 0) {
mDefaultTagGroup.setTags(tags);
mSmallTagGroup.setTags(tags);
mLargeTagGroup.setTags(tags);
mBeautyTagGroup.setTags(tags);
mBeautyInverseTagGroup.setTags(tags);
}
MyTagGroupOnClickListener tgClickListener = new MyTagGroupOnClickListener();
mDefaultTagGroup.setOnClickListener(tgClickListener);
mSmallTagGroup.setOnClickListener(tgClickListener);
mLargeTagGroup.setOnClickListener(tgClickListener);
mBeautyTagGroup.setOnClickListener(tgClickListener);
mBeautyInverseTagGroup.setOnClickListener(tgClickListener);
mDefaultTagGroup.setOnTagClickListener(mTagClickListener);
mSmallTagGroup.setOnTagClickListener(mTagClickListener);
mLargeTagGroup.setOnTagClickListener(mTagClickListener);
mBeautyTagGroup.setOnTagClickListener(mTagClickListener);
mBeautyInverseTagGroup.setOnTagClickListener(mTagClickListener);
}