本文整理匯總了Java中com.odoo.widgets.slider.R類的典型用法代碼示例。如果您正苦於以下問題:Java R類的具體用法?Java R怎麽用?Java R使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
R類屬於com.odoo.widgets.slider包,在下文中一共展示了R類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: focusOnPagerDot
import com.odoo.widgets.slider.R; //導入依賴的package包/類
@SuppressLint("NewApi")
public void focusOnPagerDot(int position) {
for (int i = 0; i < mParent.getChildCount(); i++) {
GradientDrawable shapeBg = (GradientDrawable) mContext
.getResources().getDrawable(R.drawable.intro_slider_dot_bg);
View child = mParent.getChildAt(i);
LinearLayout.LayoutParams params;
if (i == position) {
params = new LinearLayout.LayoutParams(getHeightWidth(true),
getHeightWidth(true));
shapeBg.setColor(mContext.getResources().getColor(
color.theme_primary));
} else {
params = new LinearLayout.LayoutParams(getHeightWidth(false),
getHeightWidth(false));
shapeBg.setColor(mContext.getResources().getColor(
color.theme_primary_trans));
}
params.setMargins(getLeftRightMargine(), getTopBottomMargine(),
getLeftRightMargine(), getTopBottomMargine());
child.setLayoutParams(params);
child.setBackground(shapeBg);
child.invalidate();
}
}
示例2: getHeightWidth
import com.odoo.widgets.slider.R; //導入依賴的package包/類
private int getHeightWidth(boolean focused) {
if (focused)
return (int) mContext.getResources().getDimension(
R.dimen.dot_focused_height_width);
else
return (int) mContext.getResources().getDimension(
R.dimen.dot_normal_height_width);
}
示例3: init
import com.odoo.widgets.slider.R; //導入依賴的package包/類
private void init(Context context) {
mContext = context;
setOrientation(LinearLayout.VERTICAL);
addView(LayoutInflater.from(mContext).inflate(
R.layout.slider_default_view, this, false));
}
示例4: setItems
import com.odoo.widgets.slider.R; //導入依賴的package包/類
public void setItems(FragmentManager fragmentManager, List<SliderItem> items) {
mSlider = (SliderHelper) findViewById(R.id.default_view_helper);
mSlider.init(fragmentManager, items);
mSlider.initNavigator((ViewGroup) findViewById(R.id.footer_dot));
}
示例5: getTopBottomMargine
import com.odoo.widgets.slider.R; //導入依賴的package包/類
private int getTopBottomMargine() {
return (int) mContext.getResources().getDimension(
R.dimen.dot_top_bottom_margine);
}
示例6: getLeftRightMargine
import com.odoo.widgets.slider.R; //導入依賴的package包/類
private int getLeftRightMargine() {
return (int) mContext.getResources().getDimension(
R.dimen.dot_left_right_margine);
}