当前位置: 首页>>代码示例>>Java>>正文


Java R类代码示例

本文整理汇总了Java中com.flyco.bannersamples.R的典型用法代码示例。如果您正苦于以下问题:Java R类的具体用法?Java R怎么用?Java R使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


R类属于com.flyco.bannersamples包,在下文中一共展示了R类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreateItemView

import com.flyco.bannersamples.R; //导入依赖的package包/类
@Override
public View onCreateItemView(int position) {
    View inflate = View.inflate(context, R.layout.adapter_simple_guide, null);
    ImageView iv = ViewFindUtils.find(inflate, R.id.iv);
    TextView tv_jump = ViewFindUtils.find(inflate, R.id.tv_jump);

    final Integer resId = list.get(position);
    tv_jump.setVisibility(position == list.size() - 1 ? VISIBLE : GONE);

    Glide.with(context)
            .load(resId)
            .into(iv);

    tv_jump.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View v) {
            if (onJumpClickL != null)
                onJumpClickL.onJumpClick();
        }
    });

    return inflate;
}
 
开发者ID:nearor,项目名称:FlycoBanner,代码行数:24,代码来源:SimpleGuideBanner.java

示例2: onCreateItemView

import com.flyco.bannersamples.R; //导入依赖的package包/类
@Override
public View onCreateItemView(int position) {
    View inflate = View.inflate(context, R.layout.adapter_simple_image, null);
    ImageView iv = ViewFindUtils.find(inflate, R.id.iv);

    final BannerItem item = list.get(position);
    int itemWidth = dm.widthPixels;
    int itemHeight = (int) (itemWidth * 360 * 1.0f / 640);
    iv.setScaleType(ImageView.ScaleType.CENTER_CROP);
    iv.setLayoutParams(new LinearLayout.LayoutParams(itemWidth, itemHeight));

    String imgUrl = item.imgUrl;

    if (!TextUtils.isEmpty(imgUrl)) {
        Glide.with(context)
                .load(imgUrl)
                .override(itemWidth, itemHeight)
                .centerCrop()
                .placeholder(colorDrawable)
                .into(iv);
    } else {
        iv.setImageDrawable(colorDrawable);
    }

    return inflate;
}
 
开发者ID:nearor,项目名称:FlycoBanner,代码行数:27,代码来源:SimpleImageBanner.java

示例3: sib_res

import com.flyco.bannersamples.R; //导入依赖的package包/类
private void sib_res() {
        SimpleImageBanner sib = ViewFindUtils.find(decorView, R.id.sib_res);

        sib
//                .setIndicatorStyle(SimpleImageBanner.STYLE_DRAWABLE_RESOURCE)
//                .setIndicatorSelectorRes(R.mipmap.banner_dot_unselect, R.mipmap.banner_dot_select)
                .setSource(DataProvider.getList())
                .startScroll();

        sib.setOnItemClickL(new SimpleImageBanner.OnItemClickL() {
            @Override
            public void onItemClick(int position) {
                T.showShort(context, "position--->" + position);
            }
        });
    }
 
开发者ID:nearor,项目名称:FlycoBanner,代码行数:17,代码来源:BannerHomeActivity.java

示例4: sib_corner_rectangle

import com.flyco.bannersamples.R; //导入依赖的package包/类
private void sib_corner_rectangle() {
        SimpleImageBanner sib = ViewFindUtils.find(decorView, R.id.sib_corner_rectangle);
        sib
//                .setIndicatorWidth(10)
//                .setIndicatorHeight(4)
//                .setIndicatorCornerRadius(2)
                .setSource(DataProvider.getList())
                .startScroll();

        sib.setOnItemClickL(new SimpleImageBanner.OnItemClickL() {
            @Override
            public void onItemClick(int position) {
                T.showShort(context, "position--->" + position);
            }
        });
    }
 
开发者ID:nearor,项目名称:FlycoBanner,代码行数:17,代码来源:BannerHomeActivity.java

示例5: sib_anim2

import com.flyco.bannersamples.R; //导入依赖的package包/类
private void sib_anim2() {
        SimpleImageBanner sib = ViewFindUtils.find(decorView, R.id.sib_anim2);
        sib
//                .setIndicatorWidth(10)
//                .setIndicatorHeight(4)
//                .setIndicatorCornerRadius(2)
                .setSelectAnimClass(RotateEnter.class)
                .setUnselectAnimClass(NoAnimExist.class)
                .setSource(DataProvider.getList())
                .startScroll();

        sib.setOnItemClickL(new SimpleImageBanner.OnItemClickL() {
            @Override
            public void onItemClick(int position) {
                T.showShort(context, "position--->" + position);
            }
        });
    }
 
开发者ID:nearor,项目名称:FlycoBanner,代码行数:19,代码来源:BannerHomeActivity.java

示例6: onCreateItemView

import com.flyco.bannersamples.R; //导入依赖的package包/类
@Override
public View onCreateItemView(int position) {
    View inflate = View.inflate(mContext, R.layout.adapter_simple_guide, null);
    ImageView iv = ViewFindUtils.find(inflate, R.id.iv);
    TextView tv_jump = ViewFindUtils.find(inflate, R.id.tv_jump);

    final Integer resId = mDatas.get(position);
    tv_jump.setVisibility(position == mDatas.size() - 1 ? VISIBLE : GONE);

    Glide.with(mContext)
            .load(resId)
            .into(iv);

    tv_jump.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View v) {
            if (onJumpClickL != null)
                onJumpClickL.onJumpClick();
        }
    });

    return inflate;
}
 
开发者ID:H07000223,项目名称:FlycoBanner_Master,代码行数:24,代码来源:SimpleGuideBanner.java

示例7: onCreateItemView

import com.flyco.bannersamples.R; //导入依赖的package包/类
@Override
public View onCreateItemView(int position) {
    View inflate = View.inflate(mContext, R.layout.adapter_simple_image, null);
    ImageView iv = ViewFindUtils.find(inflate, R.id.iv);

    final BannerItem item = mDatas.get(position);
    int itemWidth = mDisplayMetrics.widthPixels;
    int itemHeight = (int) (itemWidth * 360 * 1.0f / 640);
    iv.setScaleType(ImageView.ScaleType.CENTER_CROP);
    iv.setLayoutParams(new LinearLayout.LayoutParams(itemWidth, itemHeight));

    String imgUrl = item.imgUrl;

    if (!TextUtils.isEmpty(imgUrl)) {
        Glide.with(mContext)
                .load(imgUrl)
                .override(itemWidth, itemHeight)
                .centerCrop()
                .placeholder(colorDrawable)
                .into(iv);
    } else {
        iv.setImageDrawable(colorDrawable);
    }

    return inflate;
}
 
开发者ID:H07000223,项目名称:FlycoBanner_Master,代码行数:27,代码来源:SimpleImageBanner.java

示例8: onCreateView

import com.flyco.bannersamples.R; //导入依赖的package包/类
@Override
public View onCreateView() {
    View inflate = View.inflate(context, R.layout.dialog_banner, null);
    sib = ViewFindUtils.find(inflate, R.id.sib);

    return inflate;
}
 
开发者ID:nearor,项目名称:FlycoBanner,代码行数:8,代码来源:BannerDialog.java

示例9: onCreateItemView

import com.flyco.bannersamples.R; //导入依赖的package包/类
@Override
public View onCreateItemView(int position) {
    View inflate = View.inflate(context, R.layout.adapter_simple_text, null);
    TextView tv = ViewFindUtils.find(inflate, R.id.tv);
    tv.setText(list.get(position));

    return inflate;
}
 
开发者ID:nearor,项目名称:FlycoBanner,代码行数:9,代码来源:SimpleTextBanner.java

示例10: geUsertGuides

import com.flyco.bannersamples.R; //导入依赖的package包/类
public static ArrayList<Integer> geUsertGuides() {
    ArrayList<Integer> list = new ArrayList<>();
    list.add(R.mipmap.guide_img_1);
    list.add(R.mipmap.guide_img_2);
    list.add(R.mipmap.guide_img_3);
    list.add(R.mipmap.guide_img_4);

    return list;
}
 
开发者ID:nearor,项目名称:FlycoBanner,代码行数:10,代码来源:DataProvider.java

示例11: sib_simple_usage

import com.flyco.bannersamples.R; //导入依赖的package包/类
private void sib_simple_usage() {
    SimpleImageBanner sib = ViewFindUtils.find(decorView, R.id.sib_simple_usage);

    sib
            .setSource(DataProvider.getList())
            .startScroll();

    sib.setOnItemClickL(new SimpleImageBanner.OnItemClickL() {
        @Override
        public void onItemClick(int position) {
            T.showShort(context, "position--->" + position);
        }
    });
}
 
开发者ID:nearor,项目名称:FlycoBanner,代码行数:15,代码来源:BannerHomeActivity.java

示例12: sib_the_most_comlex_usage

import com.flyco.bannersamples.R; //导入依赖的package包/类
private void sib_the_most_comlex_usage() {
        SimpleImageBanner sib = ViewFindUtils.find(decorView, R.id.sib_the_most_comlex_usage);
        sib
                /** methods in BaseIndicatorBanner */
//              .setIndicatorStyle(BaseIndicaorBanner.STYLE_CORNER_RECTANGLE)//set indicator style
//              .setIndicatorWidth(6)                               //set indicator width
//              .setIndicatorHeight(6)                              //set indicator height
//              .setIndicatorGap(8)                                 //set gap btween two indicators
//              .setIndicatorCornerRadius(3)                        //set indicator corner raduis
                .setSelectAnimClass(ZoomInEnter.class)              //set indicator select anim
                        /** methods in BaseBanner */
//              .setBarColor(Color.parseColor("#88000000"))         //set bootom bar color
//              .barPadding(5, 2, 5, 2)                             //set bottom bar padding
//              .setBarShowWhenLast(true)                           //set bottom bar show or not when the position is the last
//              .setTextColor(Color.parseColor("#ffffff"))          //set title text color
//              .setTextSize(12.5f)                                 //set title text size
//              .setTitleShow(true)                                 //set title show or not
//              .setIndicatorShow(true)                             //set indicator show or not
//              .setDelay(2)                                        //setDelay before start scroll
//              .setPeriod(10)                                      //scroll setPeriod
                .setSource(DataProvider.getList())                  //data source list
                .setTransformerClass(ZoomOutSlideTransformer.class) //set page transformer
                .startScroll();                                     //start scroll,the last method to call

        sib.setOnItemClickL(new SimpleImageBanner.OnItemClickL() {
            @Override
            public void onItemClick(int position) {
                T.showShort(context, "position--->" + position);
            }
        });
    }
 
开发者ID:nearor,项目名称:FlycoBanner,代码行数:32,代码来源:BannerHomeActivity.java

示例13: sib_rectangle

import com.flyco.bannersamples.R; //导入依赖的package包/类
private void sib_rectangle() {
        SimpleImageBanner sib = ViewFindUtils.find(decorView, R.id.sib_rectangle);
        sib
//                .setIndicatorCornerRadius(0)
                .setSource(DataProvider.getList())
                .startScroll();

        sib.setOnItemClickL(new SimpleImageBanner.OnItemClickL() {
            @Override
            public void onItemClick(int position) {
                T.showShort(context, "position--->" + position);
            }
        });
    }
 
开发者ID:nearor,项目名称:FlycoBanner,代码行数:15,代码来源:BannerHomeActivity.java

示例14: sib_indicator_right_with_text

import com.flyco.bannersamples.R; //导入依赖的package包/类
private void sib_indicator_right_with_text() {
    SimpleImageBanner sib = ViewFindUtils.find(decorView, R.id.sib_indicator_right_with_text);
    sib
            .setSource(DataProvider.getList())
            .startScroll();

    sib.setOnItemClickL(new SimpleImageBanner.OnItemClickL() {
        @Override
        public void onItemClick(int position) {
            T.showShort(context, "position--->" + position);
        }
    });
}
 
开发者ID:nearor,项目名称:FlycoBanner,代码行数:14,代码来源:BannerHomeActivity.java

示例15: sib_indicator_left_with_text

import com.flyco.bannersamples.R; //导入依赖的package包/类
private void sib_indicator_left_with_text() {
    SimpleImageBanner sib = ViewFindUtils.find(decorView, R.id.sib_indicator_left_with_text);
    sib
            .setSource(DataProvider.getList())
            .startScroll();

    sib.setOnItemClickL(new SimpleImageBanner.OnItemClickL() {
        @Override
        public void onItemClick(int position) {
            T.showShort(context, "position--->" + position);
        }
    });
}
 
开发者ID:nearor,项目名称:FlycoBanner,代码行数:14,代码来源:BannerHomeActivity.java


注:本文中的com.flyco.bannersamples.R类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。