Java Code Examples for android.widget.LinearLayout#getTag()
The following examples show how to use
android.widget.LinearLayout#getTag() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AddActivity.java From ClassSchedule with Apache License 2.0 | 5 votes |
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()); } }); }
Example 2
Source File: RowDividerAgent.java From Shield with MIT License | 5 votes |
@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; }
Example 3
Source File: RowDividerAgent.java From Shield with MIT License | 5 votes |
@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; }
Example 4
Source File: DefaultDividerAgent.java From Shield with MIT License | 5 votes |
@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; }
Example 5
Source File: DefaultDividerAgent.java From Shield with MIT License | 5 votes |
@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; }
Example 6
Source File: SectionDividerAgent.java From Shield with MIT License | 5 votes |
@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; }
Example 7
Source File: SectionDividerAgent.java From Shield with MIT License | 5 votes |
@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; }