本文整理汇总了Java中android.widget.LinearLayout.setEnabled方法的典型用法代码示例。如果您正苦于以下问题:Java LinearLayout.setEnabled方法的具体用法?Java LinearLayout.setEnabled怎么用?Java LinearLayout.setEnabled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.widget.LinearLayout
的用法示例。
在下文中一共展示了LinearLayout.setEnabled方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getView
import android.widget.LinearLayout; //导入方法依赖的package包/类
@Override
public View getView(final int position, View convertView, ViewGroup parent) {
if (convertView == null) {
convertView = mInflater.inflate(ResourceUtils
.getIdByName(context, "layout", "sobot_list_item_skill"), null);
}
sobot_ll_skill = (LinearLayout) convertView.findViewById(ResourceUtils
.getIdByName(context, "id", "sobot_ll_skill"));
sobot_tv_skill_name = (TextView) convertView.findViewById(ResourceUtils
.getIdByName(context, "id", "sobot_tv_skill_name"));
sobot_tv_status = (TextView) convertView.findViewById(ResourceUtils
.getIdByName(context, "id", "sobot_tv_status"));
ZhiChiGroupBase zhiChiSkillIModel = (ZhiChiGroupBase) list.get(position);
if (zhiChiSkillIModel != null && !TextUtils.isEmpty(zhiChiSkillIModel.getGroupName())) {
sobot_ll_skill.setVisibility(View.VISIBLE);
sobot_tv_skill_name.setText(zhiChiSkillIModel.getGroupName());
if (zhiChiSkillIModel.isOnline().equals("true")) {
sobot_ll_skill.setEnabled(true);
sobot_tv_skill_name.setTextColor(Color.parseColor("#000000"));
sobot_tv_status.setVisibility(View.GONE);
} else {
sobot_tv_status.setVisibility(View.VISIBLE);
if (msgFlag == ZhiChiConstant.sobot_msg_flag_open) {
sobot_tv_skill_name.setTextColor(Color.parseColor("#000000"));
sobot_ll_skill.setEnabled(true);
sobot_tv_status.setText(getResString("sobot_str_bottom_message"));
} else {
sobot_tv_skill_name.setTextColor(context.getResources().getColor(ResourceUtils.getIdByName(context, "color", "sobot_color_item_skill_offline")));
sobot_ll_skill.setEnabled(false);
sobot_tv_status.setText(getResString("sobot_str_bottom_offline"));
}
}
} else {
sobot_ll_skill.setVisibility(View.INVISIBLE);
sobot_tv_skill_name.setText("");
sobot_tv_status.setText("");
sobot_tv_status.setCompoundDrawables(null, null, null, null);
}
return convertView;
}