Java Code Examples for android.support.v7.widget.AppCompatTextView#setVisibility()
The following examples show how to use
android.support.v7.widget.AppCompatTextView#setVisibility() .
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: IndexableLayout.java From IndexableRecyclerView with Apache License 2.0 | 6 votes |
private void initMDOverlay(int color) { mMDOverlay = new AppCompatTextView(mContext); mMDOverlay.setBackgroundResource(R.drawable.indexable_bg_md_overlay); ((AppCompatTextView) mMDOverlay).setSupportBackgroundTintList(ColorStateList.valueOf(color)); mMDOverlay.setSingleLine(); mMDOverlay.setTextColor(Color.WHITE); mMDOverlay.setTextSize(38); mMDOverlay.setGravity(Gravity.CENTER); int size = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 72, getResources().getDisplayMetrics()); LayoutParams params = new LayoutParams(size, size); params.rightMargin = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 33, getResources().getDisplayMetrics()); params.gravity = Gravity.END; mMDOverlay.setLayoutParams(params); mMDOverlay.setVisibility(INVISIBLE); addView(mMDOverlay); }
Example 2
Source File: DatePickerView.java From WheelPicker with Apache License 2.0 | 5 votes |
/** * 设置 item可见性 * * @param visibility 可见性值 * @param wheelView WheelView * @param textView labelView */ private void setItemVisibility(int visibility, WheelView wheelView, AppCompatTextView textView) { if (wheelView != null) { wheelView.setVisibility(visibility); } if (textView != null) { textView.setVisibility(visibility); } }
Example 3
Source File: IndexableStickyListView.java From SprintNBA with Apache License 2.0 | 5 votes |
private void initRightOverlayTextView(int color) { mTvRightOverlay = new AppCompatTextView(mContext); mTvRightOverlay.setBackgroundResource(R.drawable.bg_right_overlay); mTvRightOverlay.setSupportBackgroundTintList(ColorStateList.valueOf(color)); mTvRightOverlay.setTextColor(Color.WHITE); mTvRightOverlay.setTextSize(38); mTvRightOverlay.setGravity(Gravity.CENTER); int size = IndexBar.dp2px(mContext, 72); LayoutParams params = new LayoutParams(size, size); params.rightMargin = IndexBar.dp2px(mContext, 33); params.gravity = Gravity.RIGHT; mTvRightOverlay.setLayoutParams(params); mTvRightOverlay.setVisibility(INVISIBLE); }