Java Code Examples for android.widget.TextView.setDuplicateParentStateEnabled()

The following are Jave code examples for showing how to use setDuplicateParentStateEnabled() of the android.widget.TextView class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: MobileMedia   File: UnderLinePageIndicator.java   View Source Code Vote up 6 votes
public TabView(Context context) {
			super(context, null, 0);

			setOrientation(LinearLayout.VERTICAL);

			text = new TextView(context, null, R.attr.vpiTabPageIndicatorStyle);
			text.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));
			text.setDuplicateParentStateEnabled(true);
			text.setSingleLine(true);
			text.setTextSize(18);
			text.setTextColor(unSelectedTextColor);
			addView(text);

			view = new View(context);
			view.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, 5));
//			view.setBackgroundColor(selectedTextColor);
			view.setBackgroundColor(Color.TRANSPARENT);
			view.setVisibility(View.GONE);

			addView(view);

			setPadding((int) Config.dp2px(5), 0, (int) Config.dp2px(5), 0);
		}
 
Example 2
Project: qmui   File: QMUIDialogMenuItemView.java   View Source Code Vote up 5 votes
public static TextView createItemTextView(Context context){
	TextView tv = new TextView(context);
	tv.setTextColor(QMUIResHelper.getAttrColor(context, R.attr.qmui_dialog_menu_item_text_color));
	tv.setGravity(Gravity.CENTER_VERTICAL | Gravity.LEFT);
	tv.setTextSize(TypedValue.COMPLEX_UNIT_PX, QMUIResHelper.getAttrDimen(context, R.attr.qmui_dialog_content_list_item_text_size));
	tv.setSingleLine(true);
	tv.setEllipsize(TextUtils.TruncateAt.MIDDLE);
	tv.setDuplicateParentStateEnabled(false);
	return tv;
}
 
Example 3
Project: DateRangePicker   File: DefaultDayViewAdapter.java   View Source Code Vote up 5 votes
@Override
public void makeCellView(CalendarCellView parent) {
    TextView textView = new TextView(
            new ContextThemeWrapper(parent.getContext(), R.style.CalendarCell_CalendarDate));
    textView.setDuplicateParentStateEnabled(true);
    parent.addView(textView);
    parent.setDayOfMonthTextView(textView);
}
 
Example 4
Project: DateRangePickerLibrary   File: DefaultDayViewAdapter.java   View Source Code Vote up 5 votes
@Override
public void makeCellView(CalendarCellView parent) {
    TextView textView = new TextView(
            new ContextThemeWrapper(parent.getContext(), R.style.CalendarCell_CalendarDate));
    textView.setDuplicateParentStateEnabled(true);
    parent.addView(textView);
    parent.setDayOfMonthTextView(textView);
}
 
Example 5
Project: QMUI_Android   File: QMUIDialogMenuItemView.java   View Source Code Vote up 5 votes
public static TextView createItemTextView(Context context) {
    TextView tv = new TextView(context);
    tv.setTextColor(QMUIResHelper.getAttrColor(context, R.attr.qmui_dialog_menu_item_text_color));
    tv.setGravity(Gravity.CENTER_VERTICAL | Gravity.LEFT);
    tv.setTextSize(TypedValue.COMPLEX_UNIT_PX, QMUIResHelper.getAttrDimen(context, R.attr.qmui_dialog_content_list_item_text_size));
    tv.setSingleLine(true);
    tv.setEllipsize(TextUtils.TruncateAt.MIDDLE);
    tv.setDuplicateParentStateEnabled(false);
    return tv;
}