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


Java Orientation.BOTTOM_TOP属性代码示例

本文整理汇总了Java中android.graphics.drawable.GradientDrawable.Orientation.BOTTOM_TOP属性的典型用法代码示例。如果您正苦于以下问题:Java Orientation.BOTTOM_TOP属性的具体用法?Java Orientation.BOTTOM_TOP怎么用?Java Orientation.BOTTOM_TOP使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在android.graphics.drawable.GradientDrawable.Orientation的用法示例。


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

示例1: makeHeaderView

protected View makeHeaderView(int headerHeight, float headerRadius) {
	LayoutParams headerParams = new LayoutParams(LayoutParams.FILL_PARENT, headerHeight);
	
	TextView header = new TextView(getContext());
	
	if(colors != null) {
		GradientDrawable headerBG = new GradientDrawable(Orientation.BOTTOM_TOP, new int[]{colors.getColor(Colors.AUTH_PANEL_BOTTOM), colors.getColor(Colors.AUTH_PANEL_TOP)});
		headerBG.setCornerRadii(new float[]{headerRadius, headerRadius, headerRadius, headerRadius, 0.0f, 0.0f, 0.0f, 0.0f});

		CompatUtils.setBackgroundDrawable(header, headerBG);
	}

	if(localizationService != null) {
		header.setText(localizationService.getString(I18NConstants.SHARE_HEADER));
	}

	header.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 18);
	header.setTextColor(Color.WHITE);
	header.setGravity(Gravity.CENTER_HORIZONTAL | Gravity.CENTER_VERTICAL);
	header.setLayoutParams(headerParams);
	
	return header;
}
 
开发者ID:dylanmaryk,项目名称:InsanityRadio-Android,代码行数:23,代码来源:SharePanelView.java

示例2: makeImage

@Override
protected ImageView makeImage() {
	defaultProfilePicture = drawables.getDrawable(Socialize.DEFAULT_USER_ICON);
	profilePicture = new ImageView(getContext());
	
	int imageSize = displayUtils.getDIP(64);
	int imagePadding = displayUtils.getDIP(4);
	
	LayoutParams imageLayout = new LinearLayout.LayoutParams(imageSize,imageSize);
	
	GradientDrawable imageBG = new GradientDrawable(Orientation.BOTTOM_TOP, new int[] {Color.WHITE, Color.WHITE});
	imageBG.setStroke(2, Color.BLACK);
	imageBG.setAlpha(64);
	
	profilePicture.setLayoutParams(imageLayout);
	profilePicture.setPadding(imagePadding, imagePadding, imagePadding, imagePadding);

	CompatUtils.setBackgroundDrawable(profilePicture, imageBG);

	profilePicture.setScaleType(ScaleType.CENTER_CROP);
	
	return profilePicture;
}
 
开发者ID:dylanmaryk,项目名称:InsanityRadio-Android,代码行数:23,代码来源:ProfilePictureEditView.java

示例3: initResourcesIfNecessary

/**
 * Initializes resources
 */
private void initResourcesIfNecessary() {
    if (centerDrawable == null) {
        centerDrawable = getContext().getResources().getDrawable(R.drawable.wheel_val);
    }

    if (topShadow == null) {
        topShadow = new GradientDrawable(Orientation.TOP_BOTTOM, SHADOWS_COLORS);
    }

    if (bottomShadow == null) {
        bottomShadow = new GradientDrawable(Orientation.BOTTOM_TOP, SHADOWS_COLORS);
    }

    setBackgroundResource(R.drawable.wheel_bg);
}
 
开发者ID:LegendKe,项目名称:MyTravelingDiary,代码行数:18,代码来源:WheelView.java

示例4: initResourcesIfNecessary

/**
 * Initializes resources
 */
private void initResourcesIfNecessary() {
    if (centerDrawable == null) {
        centerDrawable = getContext().getResources().getDrawable(wheelForeground);
    }

    if (topShadow == null) {
        topShadow = new GradientDrawable(Orientation.TOP_BOTTOM, SHADOWS_COLORS);
    }

    if (bottomShadow == null) {
        bottomShadow = new GradientDrawable(Orientation.BOTTOM_TOP, SHADOWS_COLORS);
    }

    setBackgroundResource(wheelBackground);
}
 
开发者ID:absentm,项目名称:myapplication,代码行数:18,代码来源:WheelView.java

示例5: initResourcesIfNecessary

/**
 * Initializes resources
 */
private void initResourcesIfNecessary() {
	if (centerDrawable == null) {
		centerDrawable = getContext().getResources().getDrawable(wheelForeground);
	}

	if (topShadow == null) {
		topShadow = new GradientDrawable(Orientation.TOP_BOTTOM, SHADOWS_COLORS);
	}

	if (bottomShadow == null) {
		bottomShadow = new GradientDrawable(Orientation.BOTTOM_TOP, SHADOWS_COLORS);
	}

	setBackgroundResource(wheelBackground);
}
 
开发者ID:vondear,项目名称:RxTools,代码行数:18,代码来源:WheelView.java

示例6: initResourcesIfNecessary

/**
 * Initializes resources
 */
private void initResourcesIfNecessary() {
	if (centerDrawable == null) {
		centerDrawable = getContext().getResources().getDrawable(
				R.drawable.two_line);
	}

	if (topShadow == null) {
		topShadow = new GradientDrawable(Orientation.TOP_BOTTOM,
				SHADOWS_COLORS);
	}

	if (bottomShadow == null) {
		bottomShadow = new GradientDrawable(Orientation.BOTTOM_TOP,
				SHADOWS_COLORS);
	}

	setBackgroundResource(R.drawable.white);
}
 
开发者ID:BigAppOS,项目名称:BigApp_Discuz_Android,代码行数:21,代码来源:WheelView.java

示例7: initResourcesIfNecessary

/**
 * Initializes resources
 */
private void initResourcesIfNecessary() {
	if (centerDrawable == null) {
		centerDrawable = getContext().getResources().getDrawable(
				R.drawable.wheel_val);
	}

	if (topShadow == null) {
		topShadow = new GradientDrawable(Orientation.TOP_BOTTOM,
				SHADOWS_COLORS);
	}

	if (bottomShadow == null) {
		bottomShadow = new GradientDrawable(Orientation.BOTTOM_TOP,
				SHADOWS_COLORS);
	}

	setBackgroundResource(R.drawable.wheel_bg);
}
 
开发者ID:yndongyong,项目名称:fast-dev-library,代码行数:21,代码来源:WheelView.java

示例8: makeHeaderView

protected View makeHeaderView(int headerHeight, float headerRadius) {
	LayoutParams headerParams = new LayoutParams(LayoutParams.FILL_PARENT, headerHeight);
	
	TextView header = new TextView(getContext());
	
	if(colors != null) {
		GradientDrawable headerBG = new GradientDrawable(Orientation.BOTTOM_TOP, new int[]{colors.getColor(Colors.AUTH_PANEL_BOTTOM), colors.getColor(Colors.AUTH_PANEL_TOP)});
		headerBG.setCornerRadii(new float[]{headerRadius, headerRadius, headerRadius, headerRadius, 0.0f, 0.0f, 0.0f, 0.0f});

		CompatUtils.setBackgroundDrawable(header, headerBG);
	}

       if(localizationService != null) {
           header.setText(localizationService.getString(I18NConstants.AUTH_HEADER));
       }

	header.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 18);
	header.setTextColor(Color.WHITE);
	header.setGravity(Gravity.CENTER_HORIZONTAL | Gravity.CENTER_VERTICAL);
	header.setLayoutParams(headerParams);
	
	return header;
}
 
开发者ID:dylanmaryk,项目名称:InsanityRadio-Android,代码行数:23,代码来源:AuthPanelView.java

示例9: init

/**
 * Inits the.
 */
private void init() {
	l = new char[] {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K',
			'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
			'X', 'Y', 'Z', '#' };
	paint = new Paint();
	paint.setColor(Color.parseColor("#949494"));
	paint.setTypeface(Typeface.DEFAULT_BOLD);
	paint.setTextSize(22);
	paint.setAntiAlias(true);
	paint.setTextAlign(Paint.Align.CENTER);
	
	gradientDrawable = new GradientDrawable(Orientation.BOTTOM_TOP, new int []{0x99B0B0B0,0x99B0B0B0});
	gradientDrawable.setCornerRadius(30);

}
 
开发者ID:bangqu,项目名称:eshow-android,代码行数:18,代码来源:AbLetterFilterListView.java

示例10: init

protected void init(Context context, AttributeSet attrs) {
	Resources res = getResources();
	this.setCenterDrawable(res.getDrawable(R.drawable.wheel_val_light));
	this.setBackgroundResource(R.drawable.wheel_bg_light);

	GradientDrawable topShadow = new GradientDrawable(Orientation.TOP_BOTTOM, new int[] { 0x00000000, 0x00000000 });
	this.setTopShadowDrawable(topShadow);

	GradientDrawable bottomShadow = new GradientDrawable(Orientation.BOTTOM_TOP,
			new int[] { 0x00000000, 0x00000000 });
	this.setBottomShadowDrawable(bottomShadow);

	mTextColorValue = 0xFF000000;
	mTextColorItems = 0xFF888888;

	TEXT_SIZE = (int) AppUtil.sp2px(getContext(), 18);
	setFakeBoldText(false);
	setCyclic(true);
}
 
开发者ID:wavinsun,项目名称:MUtils,代码行数:19,代码来源:WheelViewer.java

示例11: initialize

/**
     * Initialize.
     * 
     * @param context
     */
    private void initialize(Context context) {
        this.setVerticalScrollBarEnabled(false);
        this.setSlotInCenter(true);
        this.setOrientation(VERTICAL);
        this.setGravity(Gravity.CENTER_HORIZONTAL);
        this.setUnselectedAlpha(1.0f);

        // This lead the onDraw() will be called.
        this.setWillNotDraw(false);

        // The selector rectangle drawable.
        this.mSelectorDrawable = getContext().getResources().getDrawable(R.drawable.wheel_val);
        this.mTopShadow = new GradientDrawable(Orientation.TOP_BOTTOM, SHADOWS_COLORS);
        this.mBottomShadow = new GradientDrawable(Orientation.BOTTOM_TOP, SHADOWS_COLORS);

        // The default background.
//        this.setBackgroundResource(R.drawable.wheel_bg);

        // Disable the sound effect default.
        this.setSoundEffectsEnabled(true);
    }
 
开发者ID:liangchenhe55,项目名称:konkeWatch,代码行数:26,代码来源:WheelView.java

示例12: initialize

/**
 * Initialize.
 *
 * @param context
 */
private void initialize(Context context) {
    this.setVerticalScrollBarEnabled(false);
    this.setSlotInCenter(true);
    this.setOrientation(TosGallery.VERTICAL);
    this.setGravity(Gravity.CENTER_HORIZONTAL);
    this.setUnselectedAlpha(1.0f);

    // This lead the onDraw() will be called.
    this.setWillNotDraw(false);

    // The selector rectangle drawable.
    this.mSelectorDrawable = getContext().getResources().getDrawable(R.drawable.wheel_val);
    this.mTopShadow = new GradientDrawable(Orientation.TOP_BOTTOM, SHADOWS_COLORS);
    this.mBottomShadow = new GradientDrawable(Orientation.BOTTOM_TOP, SHADOWS_COLORS);

    // The default background.
    this.setBackgroundResource(R.drawable.wheel_bg);

    // Disable the sound effect default.
    this.setSoundEffectsEnabled(false);
}
 
开发者ID:rantianhua,项目名称:MoneyRecord,代码行数:26,代码来源:WheelView.java

示例13: initResourcesIfNecessary

/**
 * Initializes resources
 */
private void initResourcesIfNecessary() {

    if (topShadow == null) {
        topShadow = new GradientDrawable(Orientation.TOP_BOTTOM,
                SHADOWS_COLORS);
    }

    if (topBlurShadow == null) {
        topBlurShadow = new GradientDrawable(Orientation.TOP_BOTTOM,
                BLUR_SHADOWS_COLORS);
    }

    if (bottomBlurShadow == null) {
        bottomBlurShadow = new GradientDrawable(Orientation.BOTTOM_TOP,
                BLUR_SHADOWS_COLORS);
    }

    if (bottomShadow == null) {
        bottomShadow = new GradientDrawable(Orientation.BOTTOM_TOP,
                SHADOWS_COLORS);
    }

}
 
开发者ID:Kuloud,项目名称:Unity,代码行数:26,代码来源:WheelView.java

示例14: initResourcesIfNecessary

/**
 * Initializes resources
 */
private void initResourcesIfNecessary() {
	if (centerDrawable == null) {
		centerDrawable = getContext().getResources().getDrawable(R.drawable.wheel_val);
	}

	if (topShadow == null) {
		topShadow = new GradientDrawable(Orientation.TOP_BOTTOM, SHADOWS_COLORS);
	}

	if (bottomShadow == null) {
		bottomShadow = new GradientDrawable(Orientation.BOTTOM_TOP, SHADOWS_COLORS);
	}

	setBackgroundResource(R.drawable.wheel_bg);
}
 
开发者ID:bither,项目名称:bither-android,代码行数:18,代码来源:WheelView.java

示例15: initResourcesIfNecessary

/**
 * Initializes resources 
 */
private void initResourcesIfNecessary() {
	if (centerDrawable == null) {
		centerDrawable = getContext().getResources().getDrawable(R.drawable.wheel_val);
	}

	if (topShadow == null) {
		topShadow = new GradientDrawable(Orientation.TOP_BOTTOM, SHADOWS_COLORS);
	}

	if (bottomShadow == null) {
		bottomShadow = new GradientDrawable(Orientation.BOTTOM_TOP, SHADOWS_COLORS);
	}

	setBackgroundResource(R.drawable.wheel_bg);
}
 
开发者ID:weitsai,项目名称:iHelp-android,代码行数:18,代码来源:WheelView.java


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