本文整理汇总了Java中com.daimajia.slider.library.R类的典型用法代码示例。如果您正苦于以下问题:Java R类的具体用法?Java R怎么用?Java R使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
R类属于com.daimajia.slider.library包,在下文中一共展示了R类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getView
import com.daimajia.slider.library.R; //导入依赖的package包/类
@Override
public View getView() {
View v = LayoutInflater.from(getContext()).inflate(R.layout.render_type_default,null);
ImageView target = (ImageView)v.findViewById(R.id.daimajia_slider_image);
bindEventAndShow(v, target);
return v;
}
开发者ID:yaozs,项目名称:AndroidImageSlider-glide,代码行数:8,代码来源:DefaultSliderView.java
示例2: getView
import com.daimajia.slider.library.R; //导入依赖的package包/类
@Override
public View getView() {
View v = LayoutInflater.from(getContext()).inflate(R.layout.render_type_text,null);
ImageView target = (ImageView)v.findViewById(R.id.daimajia_slider_image);
TextView description = (TextView)v.findViewById(R.id.description);
description.setText(getDescription());
bindEventAndShow(v, target);
return v;
}
开发者ID:yaozs,项目名称:AndroidImageSlider-glide,代码行数:10,代码来源:TextSliderView.java
示例3: onPrepareCurrentItemLeaveScreen
import com.daimajia.slider.library.R; //导入依赖的package包/类
@Override
public void onPrepareCurrentItemLeaveScreen(View current) {
View descriptionLayout = current.findViewById(R.id.description_layout);
if(descriptionLayout!=null){
current.findViewById(R.id.description_layout).setVisibility(View.INVISIBLE);
}
}
开发者ID:yaozs,项目名称:AndroidImageSlider-glide,代码行数:8,代码来源:DescriptionAnimation.java
示例4: onPrepareNextItemShowInScreen
import com.daimajia.slider.library.R; //导入依赖的package包/类
/**
* When next item is coming to show, let's hide the description layout.
* @param next
*/
@Override
public void onPrepareNextItemShowInScreen(View next) {
View descriptionLayout = next.findViewById(R.id.description_layout);
if(descriptionLayout!=null){
next.findViewById(R.id.description_layout).setVisibility(View.INVISIBLE);
}
}
开发者ID:yaozs,项目名称:AndroidImageSlider-glide,代码行数:12,代码来源:DescriptionAnimation.java
示例5: onNextItemAppear
import com.daimajia.slider.library.R; //导入依赖的package包/类
/**
* When next item show in ViewPagerEx, let's make an animation to show the
* description layout.
* @param view
*/
@Override
public void onNextItemAppear(View view) {
View descriptionLayout = view.findViewById(R.id.description_layout);
if(descriptionLayout!=null){
float layoutY = ViewHelper.getY(descriptionLayout);
view.findViewById(R.id.description_layout).setVisibility(View.VISIBLE);
ValueAnimator animator = ObjectAnimator.ofFloat(
descriptionLayout,"y",layoutY + descriptionLayout.getHeight(),
layoutY).setDuration(500);
animator.start();
}
}
开发者ID:yaozs,项目名称:AndroidImageSlider-glide,代码行数:20,代码来源:DescriptionAnimation.java
示例6: getView
import com.daimajia.slider.library.R; //导入依赖的package包/类
@Override
public View getView() {
View v = LayoutInflater.from(getContext()).inflate(R.layout.render_type_default,null);
SimpleDraweeView target = (SimpleDraweeView)v.findViewById(R.id.daimajia_slider_image);
bindEventAndShow(v, target);
return v;
}
开发者ID:glassLake,项目名称:AndroidImageSliderByFresco,代码行数:8,代码来源:DefaultSliderView.java
示例7: getView
import com.daimajia.slider.library.R; //导入依赖的package包/类
@Override
public View getView() {
View v = LayoutInflater.from(getContext()).inflate(R.layout.render_type_text,null);
SimpleDraweeView target = (SimpleDraweeView)v.findViewById(R.id.daimajia_slider_image);
TextView description = (TextView)v.findViewById(R.id.description);
description.setText(getDescription());
bindEventAndShow(v, target);
return v;
}
开发者ID:glassLake,项目名称:AndroidImageSliderByFresco,代码行数:10,代码来源:TextSliderView.java
示例8: PagerIndicator
import com.daimajia.slider.library.R; //导入依赖的package包/类
public PagerIndicator(Context context, AttributeSet attrs) {
super(context, attrs);
mContext = context;
final TypedArray attributes = context.obtainStyledAttributes(attrs,R.styleable.PagerIndicator,0,0);
int visibility = attributes.getInt(R.styleable.PagerIndicator_visibility,IndicatorVisibility.Visible.ordinal());
for(IndicatorVisibility v : IndicatorVisibility.values()){
if(v.ordinal() == visibility){
mVisibility = v;
break;
}
}
int shape = attributes.getInt(R.styleable.PagerIndicator_shape, Shape.Oval.ordinal());
for(Shape s: Shape.values()){
if(s.ordinal() == shape){
mIndicatorShape = s;
break;
}
}
mUserSetSelectedIndicatorResId = attributes.getResourceId(R.styleable.PagerIndicator_selected_drawable,
0);
mUserSetUnSelectedIndicatorResId = attributes.getResourceId(R.styleable.PagerIndicator_unselected_drawable,
0);
mDefaultSelectedColor = attributes.getColor(R.styleable.PagerIndicator_selected_color, Color.rgb(255, 255, 255));
mDefaultUnSelectedColor = attributes.getColor(R.styleable.PagerIndicator_unselected_color, Color.argb(33,255,255,255));
mDefaultSelectedWidth = attributes.getDimension(R.styleable.PagerIndicator_selected_width,(int)pxFromDp(6));
mDefaultSelectedHeight = attributes.getDimensionPixelSize(R.styleable.PagerIndicator_selected_height,(int)pxFromDp(6));
mDefaultUnSelectedWidth = attributes.getDimensionPixelSize(R.styleable.PagerIndicator_unselected_width,(int)pxFromDp(6));
mDefaultUnSelectedHeight = attributes.getDimensionPixelSize(R.styleable.PagerIndicator_unselected_height,(int)pxFromDp(6));
mSelectedGradientDrawable = new GradientDrawable();
mUnSelectedGradientDrawable = new GradientDrawable();
mPadding_left = attributes.getDimensionPixelSize(R.styleable.PagerIndicator_padding_left,(int)pxFromDp(3));
mPadding_right = attributes.getDimensionPixelSize(R.styleable.PagerIndicator_padding_right,(int)pxFromDp(3));
mPadding_top = attributes.getDimensionPixelSize(R.styleable.PagerIndicator_padding_top,(int)pxFromDp(0));
mPadding_bottom = attributes.getDimensionPixelSize(R.styleable.PagerIndicator_padding_bottom,(int)pxFromDp(0));
mSelectedPadding_Left = attributes.getDimensionPixelSize(R.styleable.PagerIndicator_selected_padding_left,(int)mPadding_left);
mSelectedPadding_Right = attributes.getDimensionPixelSize(R.styleable.PagerIndicator_selected_padding_right,(int)mPadding_right);
mSelectedPadding_Top = attributes.getDimensionPixelSize(R.styleable.PagerIndicator_selected_padding_top,(int)mPadding_top);
mSelectedPadding_Bottom = attributes.getDimensionPixelSize(R.styleable.PagerIndicator_selected_padding_bottom,(int)mPadding_bottom);
mUnSelectedPadding_Left = attributes.getDimensionPixelSize(R.styleable.PagerIndicator_unselected_padding_left,(int)mPadding_left);
mUnSelectedPadding_Right = attributes.getDimensionPixelSize(R.styleable.PagerIndicator_unselected_padding_right,(int)mPadding_right);
mUnSelectedPadding_Top = attributes.getDimensionPixelSize(R.styleable.PagerIndicator_unselected_padding_top,(int)mPadding_top);
mUnSelectedPadding_Bottom = attributes.getDimensionPixelSize(R.styleable.PagerIndicator_unselected_padding_bottom,(int)mPadding_bottom);
mSelectedLayerDrawable = new LayerDrawable(new Drawable[]{mSelectedGradientDrawable});
mUnSelectedLayerDrawable = new LayerDrawable(new Drawable[]{mUnSelectedGradientDrawable});
setIndicatorStyleResource(mUserSetSelectedIndicatorResId,mUserSetUnSelectedIndicatorResId);
setDefaultIndicatorShape(mIndicatorShape);
setDefaultSelectedIndicatorSize(mDefaultSelectedWidth,mDefaultSelectedHeight,Unit.Px);
setDefaultUnselectedIndicatorSize(mDefaultUnSelectedWidth,mDefaultUnSelectedHeight,Unit.Px);
setDefaultIndicatorColor(mDefaultSelectedColor, mDefaultUnSelectedColor);
setIndicatorVisibility(mVisibility);
attributes.recycle();
}
开发者ID:yaozs,项目名称:AndroidImageSlider-glide,代码行数:69,代码来源:PagerIndicator.java
注:本文中的com.daimajia.slider.library.R类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论