本文整理汇总了Java中com.jess.arms.R类的典型用法代码示例。如果您正苦于以下问题:Java R类的具体用法?Java R怎么用?Java R使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
R类属于com.jess.arms包,在下文中一共展示了R类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: updateTabStyles
import com.jess.arms.R; //导入依赖的package包/类
private void updateTabStyles() {
for (int i = 0; i < mTabCount; i++) {
View tabView = mTabsContainer.getChildAt(i);
tabView.setPadding((int) mTabPadding, 0, (int) mTabPadding, 0);
TextView tv_tab_title = (TextView) tabView.findViewById(R.id.tv_tab_title);
tv_tab_title.setTextColor(i == mCurrentTab ? mTextSelectColor : mTextUnselectColor);
tv_tab_title.setTextSize(TypedValue.COMPLEX_UNIT_PX, mTextsize);
// tv_tab_title.setPadding((int) mTabPadding, 0, (int) mTabPadding, 0);
if (mTextAllCaps) {
tv_tab_title.setText(tv_tab_title.getText().toString().toUpperCase());
}
if (mTextBold == TEXT_BOLD_BOTH) {
tv_tab_title.getPaint().setFakeBoldText(true);
} else if (mTextBold == TEXT_BOLD_NONE) {
tv_tab_title.getPaint().setFakeBoldText(false);
}
}
}
开发者ID:devzwy,项目名称:NeiHanDuanZiTV,代码行数:20,代码来源:SegmentTabLayout.java
示例2: showMsg
import com.jess.arms.R; //导入依赖的package包/类
/**
* 显示未读消息
*
* @param position 显示tab位置
* @param num num小于等于0显示红点,num大于0显示数字
*/
public void showMsg(int position, int num) {
if (position >= mTabCount) {
position = mTabCount - 1;
}
View tabView = mTabsContainer.getChildAt(position);
MsgView tipView = (MsgView) tabView.findViewById(R.id.rtv_msg_tip);
if (tipView != null) {
UnreadMsgUtils.show(tipView, num);
if (mInitSetMap.get(position) != null && mInitSetMap.get(position)) {
return;
}
setMsgMargin(position, 2, 2);
mInitSetMap.put(position, true);
}
}
开发者ID:devzwy,项目名称:NeiHanDuanZiTV,代码行数:26,代码来源:SegmentTabLayout.java
示例3: notifyDataSetChanged
import com.jess.arms.R; //导入依赖的package包/类
/** 更新数据 */
public void notifyDataSetChanged() {
mTabsContainer.removeAllViews();
this.mTabCount = mTabEntitys.size();
View tabView;
for (int i = 0; i < mTabCount; i++) {
if (mIconGravity == Gravity.LEFT) {
tabView = View.inflate(mContext, R.layout.layout_tab_left, null);
} else if (mIconGravity == Gravity.RIGHT) {
tabView = View.inflate(mContext, R.layout.layout_tab_right, null);
} else if (mIconGravity == Gravity.BOTTOM) {
tabView = View.inflate(mContext, R.layout.layout_tab_bottom, null);
} else {
tabView = View.inflate(mContext, R.layout.layout_tab_top, null);
}
tabView.setTag(i);
addTab(i, tabView);
}
updateTabStyles();
}
开发者ID:devzwy,项目名称:NeiHanDuanZiTV,代码行数:23,代码来源:CommonTabLayout.java
示例4: SlidingTabLayout
import com.jess.arms.R; //导入依赖的package包/类
public SlidingTabLayout(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
setFillViewport(true);//设置滚动视图是否可以伸缩其内容以填充视口
setWillNotDraw(false);//重写onDraw方法,需要调用这个方法来清除flag
setClipChildren(false);
setClipToPadding(false);
this.mContext = context;
mTabsContainer = new LinearLayout(context);
addView(mTabsContainer);
obtainAttributes(context, attrs);
//get layout_height
String height = attrs.getAttributeValue("http://schemas.android.com/apk/res/android", "layout_height");
if (height.equals(ViewGroup.LayoutParams.MATCH_PARENT + "")) {
} else if (height.equals(ViewGroup.LayoutParams.WRAP_CONTENT + "")) {
} else {
int[] systemAttrs = {android.R.attr.layout_height};
TypedArray a = context.obtainStyledAttributes(attrs, systemAttrs);
mHeight = a.getDimensionPixelSize(0, ViewGroup.LayoutParams.WRAP_CONTENT);
a.recycle();
}
}
开发者ID:devzwy,项目名称:NeiHanDuanZiTV,代码行数:26,代码来源:SlidingTabLayout.java
示例5: updateTabStyles
import com.jess.arms.R; //导入依赖的package包/类
private void updateTabStyles() {
for (int i = 0; i < mTabCount; i++) {
View v = mTabsContainer.getChildAt(i);
// v.setPadding((int) mTabPadding, v.getPaddingTop(), (int) mTabPadding, v.getPaddingBottom());
TextView tv_tab_title = (TextView) v.findViewById(R.id.tv_tab_title);
if (tv_tab_title != null) {
tv_tab_title.setTextColor(i == mCurrentTab ? mTextSelectColor : mTextUnselectColor);
tv_tab_title.setTextSize(TypedValue.COMPLEX_UNIT_PX, mTextsize);
tv_tab_title.setPadding((int) mTabPadding, 0, (int) mTabPadding, 0);
if (mTextAllCaps) {
tv_tab_title.setText(tv_tab_title.getText().toString().toUpperCase());
}
if (mTextBold == TEXT_BOLD_BOTH) {
tv_tab_title.getPaint().setFakeBoldText(true);
} else if (mTextBold == TEXT_BOLD_NONE) {
tv_tab_title.getPaint().setFakeBoldText(false);
}
}
}
}
开发者ID:devzwy,项目名称:NeiHanDuanZiTV,代码行数:22,代码来源:SlidingTabLayout.java
示例6: showMsg
import com.jess.arms.R; //导入依赖的package包/类
/**
* 显示未读消息
*
* @param position 显示tab位置
* @param num num小于等于0显示红点,num大于0显示数字
*/
public void showMsg(int position, int num) {
if (position >= mTabCount) {
position = mTabCount - 1;
}
View tabView = mTabsContainer.getChildAt(position);
MsgView tipView = (MsgView) tabView.findViewById(R.id.rtv_msg_tip);
if (tipView != null) {
UnreadMsgUtils.show(tipView, num);
if (mInitSetMap.get(position) != null && mInitSetMap.get(position)) {
return;
}
setMsgMargin(position, 4, 2);
mInitSetMap.put(position, true);
}
}
开发者ID:devzwy,项目名称:NeiHanDuanZiTV,代码行数:25,代码来源:SlidingTabLayout.java
示例7: onViewCreated
import com.jess.arms.R; //导入依赖的package包/类
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
mEmptyTxt = (TextView) view.findViewById(R.id.empty_txt);
mRecycleView = (RecyclerView) view.findViewById(R.id.media_recycleview);
mLoadingView = (ProgressBar) view.findViewById(R.id.loading);
GridLayoutManager gridLayoutManager = new GridLayoutManager(getActivity(), GRID_COUNT);
gridLayoutManager.setSmoothScrollbarEnabled(true);
mRecycleView.setLayoutManager(gridLayoutManager);
mRecycleView.addItemDecoration(new SpacesItemDecoration(getResources().getDimensionPixelOffset(R.dimen.boxing_media_margin), GRID_COUNT));
mRecycleView.setAdapter(mMediaAdapter);
mRecycleView.addOnScrollListener(new ScrollListener());
mMediaAdapter.setOnMediaClickListener(new OnMediaClickListener());
mMediaAdapter.setOnCameraClickListener(new OnCameraClickListener());
view.findViewById(R.id.finish_txt).setOnClickListener(this);
}
开发者ID:devzwy,项目名称:NeiHanDuanZiTV,代码行数:17,代码来源:BoxingBottomSheetFragment.java
示例8: showMedia
import com.jess.arms.R; //导入依赖的package包/类
@Override
public void showMedia(@Nullable List<BaseMedia> medias, int totalCount) {
if (medias == null || totalCount <= 0) {
return;
}
mImages.addAll(medias);
mAdapter.notifyDataSetChanged();
checkSelectedMedia(mImages, mSelectedImages);
setupGallery();
if (mToolbar != null && mNeedAllCount) {
mToolbar.setTitle(getString(R.string.boxing_image_preview_title_fmt,
String.valueOf(++mPos), String.valueOf(totalCount)));
mNeedAllCount = false;
}
loadOtherPagesInAlbum(totalCount);
}
开发者ID:devzwy,项目名称:NeiHanDuanZiTV,代码行数:18,代码来源:BoxingViewActivity.java
示例9: getView
import com.jess.arms.R; //导入依赖的package包/类
@Override
public View getView(int position, View convertView, ViewGroup parent) {
String data= mDatas.get(position);
Holder holder=null;
View view =convertView;
if(view==null){
LayoutInflater inflater = LayoutInflater.from(parent.getContext());
view=inflater.inflate(R.layout.item_alertbutton, null);
holder=creatHolder(view);
view.setTag(holder);
}
else{
holder=(Holder) view.getTag();
}
holder.UpdateUI(parent.getContext(),data,position);
return view;
}
开发者ID:devzwy,项目名称:NeiHanDuanZiTV,代码行数:18,代码来源:AlertViewAdapter.java
示例10: onClick
import com.jess.arms.R; //导入依赖的package包/类
@Override
public void onClick(View v) {
int id = v.getId();
if (id == R.id.choose_ok_btn) {
onFinish(mMediaAdapter.getSelectedMedias());
} else if (id == R.id.choose_preview_btn) {
if (!mIsPreview) {
mIsPreview = true;
ArrayList<BaseMedia> medias = (ArrayList<BaseMedia>) mMediaAdapter.getSelectedMedias();
Boxing.get().withIntent(getActivity(), BoxingViewActivity.class, medias)
.start(this, BoxingViewFragment.IMAGE_PREVIEW_REQUEST_CODE, BoxingConfig.ViewMode.PRE_EDIT);
}
}
}
开发者ID:devzwy,项目名称:NeiHanDuanZiTV,代码行数:17,代码来源:BoxingViewFragment.java
示例11: showLoading
import com.jess.arms.R; //导入依赖的package包/类
public LoadingView showLoading(CharSequence msg, boolean cancleabl) {
mDialog = new Dialog(mContext);// TODO: 2017/8/28 内存泄露时这里也修改为弱引用
mDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
rootView = View.inflate(mContext, R.layout.dialogui_loading_horizontal, null);
mLinearLayout = (LinearLayout) rootView.findViewById(R.id.dialogui_ll_bg);
mProgressBar = (ProgressBar) rootView.findViewById(R.id.pb_bg);
mTextView = (TextView) rootView.findViewById(R.id.dialogui_tv_msg);
mTextView.setText(msg);
mLinearLayout.setBackgroundResource(R.drawable.dialogui_shape_wihte_round_corner);
mProgressBar.setIndeterminateDrawable(mContext.getResources().getDrawable(R.drawable.dialogui_shape_progress));
mTextView.setTextColor(mContext.getResources().getColor(R.color.text_black));
mDialog.setContentView(rootView);
if (mDialog != null) {
if (mDialog.isShowing()) {
mDialog.dismiss();
}
mDialog.setCancelable(cancleabl);
mDialog.setOnCancelListener(this);
mDialog.show();
}
return this;
}
开发者ID:devzwy,项目名称:NeiHanDuanZiTV,代码行数:26,代码来源:LoadingView.java
示例12: buildByType
import com.jess.arms.R; //导入依赖的package包/类
private void buildByType(BuildBean bean) {
Dialog dialog = new Dialog(bean.mContext);
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
bean.dialog = dialog;
View root = View.inflate(bean.mContext, R.layout.dialogui_loading_horizontal, null);
View llBg = (View) root.findViewById(R.id.dialogui_ll_bg);
ProgressBar pbBg = (ProgressBar) root.findViewById(R.id.pb_bg);
TextView tvMsg = (TextView) root.findViewById(R.id.dialogui_tv_msg);
tvMsg.setText(bean.msg);
if (bean.isWhiteBg) {
llBg.setBackgroundResource(R.drawable.dialogui_shape_wihte_round_corner);
pbBg.setIndeterminateDrawable(bean.mContext.getResources().getDrawable(R.drawable.dialogui_shape_progress));
tvMsg.setTextColor(bean.mContext.getResources().getColor(R.color.text_black));
} else {
llBg.setBackgroundResource(R.drawable.dialogui_shape_gray_round_corner);
pbBg.setIndeterminateDrawable(bean.mContext.getResources().getDrawable(R.drawable.dialogui_shape_progress_light));
tvMsg.setTextColor(Color.WHITE);
}
bean.dialog.setContentView(root);
}
开发者ID:devzwy,项目名称:NeiHanDuanZiTV,代码行数:22,代码来源:BuildBean.java
示例13: CircleImageView
import com.jess.arms.R; //导入依赖的package包/类
public CircleImageView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
super.setScaleType(SCALE_TYPE);
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.CircleImageView, defStyle, 0);
mBorderWidth = a.getDimensionPixelSize(R.styleable.CircleImageView_border_width, DEFAULT_BORDER_WIDTH);
mBorderColor = a.getColor(R.styleable.CircleImageView_border_color, Color.WHITE);
a.recycle();
mReady = true;
if (mSetupPending) {
setup();
mSetupPending = false;
}
}
开发者ID:devzwy,项目名称:NeiHanDuanZiTV,代码行数:19,代码来源:CircleImageView.java
示例14: onBindViewHolder
import com.jess.arms.R; //导入依赖的package包/类
@Override
public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
final AlbumViewHolder albumViewHolder = (AlbumViewHolder) holder;
albumViewHolder.mCoverImg.setImageResource(mDefaultRes);
final int adapterPos = holder.getAdapterPosition();
final AlbumEntity album = mAlums.get(adapterPos);
if (album != null && album.hasImages()) {
albumViewHolder.mNameTxt.setText(album.mBucketName);
ImageMedia media = (ImageMedia) album.mImageList.get(0);
if (media != null) {
BoxingMediaLoader.getInstance().displayThumbnail(albumViewHolder.mCoverImg, media.getPath(), 50, 50);
}
albumViewHolder.mLayout.setTag(adapterPos);
albumViewHolder.mLayout.setOnClickListener(this);
albumViewHolder.mCheckedImg.setVisibility(album.mIsSelected ? View.VISIBLE : View.GONE);
albumViewHolder.mSizeTxt.setText(albumViewHolder.mSizeTxt.
getResources().getString(R.string.boxing_album_images_fmt, album.mCount));
} else {
albumViewHolder.mNameTxt.setText(UNKNOW_ALBUM_NAME);
albumViewHolder.mSizeTxt.setVisibility(View.GONE);
}
}
开发者ID:devzwy,项目名称:NeiHanDuanZiTV,代码行数:24,代码来源:BoxingAlbumAdapter.java
示例15: onBindViewHolder
import com.jess.arms.R; //导入依赖的package包/类
@Override
public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
if (holder instanceof CameraViewHolder) {
CameraViewHolder viewHolder = (CameraViewHolder) holder;
viewHolder.mCameraLayout.setOnClickListener(mOnCameraClickListener);
viewHolder.mCameraImg.setImageResource(BoxingResHelper.getCameraRes());
} else {
int pos = position - mOffset;
final BaseMedia media = mMedias.get(pos);
final ImageViewHolder vh = (ImageViewHolder) holder;
vh.mItemLayout.setImageRes(mDefaultRes);
vh.mItemLayout.setTag(media);
vh.mItemLayout.setOnClickListener(mOnMediaClickListener);
vh.mItemLayout.setTag(R.id.media_item_check, pos);
vh.mItemLayout.setMedia(media);
vh.mItemChecked.setVisibility(mMultiImageMode ? View.VISIBLE : View.GONE);
if (mMultiImageMode && media instanceof ImageMedia) {
vh.mItemLayout.setChecked(((ImageMedia) media).isSelected());
vh.mItemChecked.setTag(R.id.media_layout, vh.mItemLayout);
vh.mItemChecked.setTag(media);
vh.mItemChecked.setOnClickListener(mOnCheckListener);
}
}
}
开发者ID:devzwy,项目名称:NeiHanDuanZiTV,代码行数:27,代码来源:BoxingMediaAdapter.java
示例16: initView
import com.jess.arms.R; //导入依赖的package包/类
private void initView() {
mAdapter = new ImagesAdapter(getSupportFragmentManager());
mOkBtn = (Button) findViewById(R.id.image_items_ok);
mGallery = (HackyViewPager) findViewById(R.id.pager);
mProgressBar = (ProgressBar) findViewById(R.id.loading);
mGallery.setAdapter(mAdapter);
mGallery.addOnPageChangeListener(new OnPagerChangeListener());
if (!mNeedEdit) {
View chooseLayout = findViewById(R.id.item_choose_layout);
chooseLayout.setVisibility(View.GONE);
} else {
setOkTextNumber();
mOkBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finishByBackPressed(false);
}
});
}
}
开发者ID:devzwy,项目名称:NeiHanDuanZiTV,代码行数:21,代码来源:BoxingViewActivity.java
示例17: AutoTabLayout
import com.jess.arms.R; //导入依赖的package包/类
public AutoTabLayout(Context context, AttributeSet attrs, int defStyleAttr)
{
super(context, attrs, defStyleAttr);
initTextSizeBaseWidth(context, attrs);
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.TabLayout,
defStyleAttr, R.style.Widget_Design_TabLayout);
int tabTextAppearance = a.getResourceId(R.styleable.TabLayout_tabTextAppearance,
R.style.TextAppearance_Design_Tab);
mTextSize = loadTextSizeFromTextAppearance(tabTextAppearance);
a.recycle();
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:15,代码来源:AutoTabLayout.java
示例18: loadTextSizeFromTextAppearance
import com.jess.arms.R; //导入依赖的package包/类
private int loadTextSizeFromTextAppearance(int textAppearanceResId)
{
TypedArray a = getContext().obtainStyledAttributes(textAppearanceResId,
R.styleable.TextAppearance);
try
{
if (!DimenUtils.isPxVal(a.peekValue(R.styleable.TextAppearance_android_textSize)))
return NO_VALID;
return a.getDimensionPixelSize(R.styleable.TextAppearance_android_textSize, NO_VALID);
} finally
{
a.recycle();
}
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:16,代码来源:AutoTabLayout.java
示例19: AutoTabLayout
import com.jess.arms.R; //导入依赖的package包/类
public AutoTabLayout(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
initTextSizeBaseWidth(context, attrs);
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.TabLayout,
defStyleAttr, R.style.Widget_Design_TabLayout);
int tabTextAppearance = a.getResourceId(R.styleable.TabLayout_tabTextAppearance,
R.style.TextAppearance_Design_Tab);
mTextSize = loadTextSizeFromTextAppearance(tabTextAppearance);
a.recycle();
}
开发者ID:Superingxz,项目名称:MoligyMvpArms,代码行数:14,代码来源:AutoTabLayout.java
示例20: initRecycleView
import com.jess.arms.R; //导入依赖的package包/类
private void initRecycleView() {
GridLayoutManager gridLayoutManager = new GridLayoutManager(getActivity(), GRID_COUNT);
gridLayoutManager.setSmoothScrollbarEnabled(true);
mRecycleView.setLayoutManager(gridLayoutManager);
mRecycleView.addItemDecoration(new SpacesItemDecoration(getResources().getDimensionPixelOffset(R.dimen.boxing_media_margin), GRID_COUNT));
mMediaAdapter.setOnCameraClickListener(new OnCameraClickListener());
mMediaAdapter.setOnCheckedListener(new OnMediaCheckedListener());
mMediaAdapter.setOnMediaClickListener(new OnMediaClickListener());
mRecycleView.setAdapter(mMediaAdapter);
mRecycleView.addOnScrollListener(new ScrollListener());
}
开发者ID:devzwy,项目名称:NeiHanDuanZiTV,代码行数:12,代码来源:BoxingViewFragment.java
注:本文中的com.jess.arms.R类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论