android.widget.LinearLayout#getTag ( )源码实例Demo

下面列出了android.widget.LinearLayout#getTag ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: ClassSchedule   文件: AddActivity.java
private void clickLocationItem(final LinearLayout locationItem) {
    PopupWindowDialog dialog = new PopupWindowDialog();

    CourseV2 courseV2 = null;
    Object obj = locationItem.getTag();
    // has tag data
    if (obj != null && obj instanceof CourseV2) {
        courseV2 = (CourseV2) obj;
    } else {
        throw new RuntimeException("Course data tag not be found");
    }

    dialog.showSelectTimeDialog(this, courseV2, new PopupWindowDialog.SelectTimeCallback() {
        @Override
        public void onSelected(CourseV2 course) {
            StringBuilder builder = new StringBuilder();
            builder.append("周").append(Constant.WEEK_SINGLE[course.getCouWeek() - 1])
                    .append(" 第").append(course.getCouStartNode()).append("-")
                    .append(course.getCouStartNode() + course.getCouNodeCount() - 1).append("节");
            if (!TextUtils.isEmpty(course.getCouLocation())) {
                builder.append("【").append(course.getCouLocation()).append("】");
            }

            ((TextView) locationItem.findViewById(R.id.tv_text))
                    .setText(builder.toString());
        }
    });
}
 
源代码2 项目: Shield   文件: RowDividerAgent.java
@Override
public View onCreateHeaderView(ViewGroup parent, int headerViewType) {
    LinearLayout rootView = (LinearLayout) createShowView();
    if (rootView != null && (rootView.getTag() instanceof ItemViewHolder)) {
        TextView containView = ((ItemViewHolder) rootView.getTag()).textView;
        containView.setText("Header, divider");
        containView.setTextColor(getContext().getResources().getColor(android.R.color.holo_green_dark));
        containView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 18);
    }
    return rootView;
}
 
源代码3 项目: Shield   文件: RowDividerAgent.java
@Override
public View onCreateFooterView(ViewGroup parent, int footerViewType) {
    LinearLayout rootView = (LinearLayout) createShowView();
    if (rootView != null && (rootView.getTag() instanceof ItemViewHolder)) {
        TextView containView = ((ItemViewHolder) rootView.getTag()).textView;
        containView.setTextColor(getContext().getResources().getColor(android.R.color.holo_green_dark));
        containView.setText("Footer, divider");
        containView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 18);
    }
    return rootView;
}
 
源代码4 项目: Shield   文件: DefaultDividerAgent.java
@Override
public View onCreateHeaderView(ViewGroup parent, int headerViewType) {
    LinearLayout rootView = (LinearLayout) createShowView();
    if (rootView != null && (rootView.getTag() instanceof ItemViewHolder)) {
        TextView containView = ((ItemViewHolder) rootView.getTag()).textView;
        containView.setText("Header, divider");
        containView.setTextColor(getContext().getResources().getColor(android.R.color.holo_green_dark));
        containView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 18);
    }
    return rootView;
}
 
源代码5 项目: Shield   文件: DefaultDividerAgent.java
@Override
public View onCreateFooterView(ViewGroup parent, int footerViewType) {
    LinearLayout rootView = (LinearLayout) createShowView();
    if (rootView != null && (rootView.getTag() instanceof ItemViewHolder)) {
        TextView containView = ((ItemViewHolder) rootView.getTag()).textView;
        containView.setTextColor(getContext().getResources().getColor(android.R.color.holo_green_dark));
        containView.setText("Footer, divider");
        containView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 18);
    }
    return rootView;
}
 
源代码6 项目: Shield   文件: SectionDividerAgent.java
@Override
public View onCreateHeaderView(ViewGroup parent, int headerViewType) {
    LinearLayout rootView = (LinearLayout) createShowView();
    if (rootView != null && (rootView.getTag() instanceof ItemViewHolder)) {
        TextView containView = ((ItemViewHolder) rootView.getTag()).textView;
        containView.setText("Header, divider");
        containView.setTextColor(getContext().getResources().getColor(android.R.color.holo_green_dark));
        containView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 18);
        return rootView;
    }
    return null;
}
 
源代码7 项目: Shield   文件: SectionDividerAgent.java
@Override
public View onCreateFooterView(ViewGroup parent, int footerViewType) {
    LinearLayout rootView = (LinearLayout) createShowView();
    if (rootView != null && (rootView.getTag() instanceof ItemViewHolder)) {
        TextView containView = ((ItemViewHolder) rootView.getTag()).textView;
        containView.setTextColor(getContext().getResources().getColor(android.R.color.holo_green_dark));
        containView.setText("Footer, divider");
        containView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 18);
        return rootView;
    }
    return null;
}