gradient

How to make a color gradient in a SeekBar?

一曲冷凌霜 提交于 2019-11-29 02:45:18
I want to use a SeekBar (i.e. old school Java Slider) into a color gradient picker. I have seen some examples like this but they all require making new classes and such. There has got to be a way to modify or override the original classes. Or just replace the background with a gradient. JPM I figured it out here is how you do it. You create a standard seekbar in your XML. <SeekBar android:id="@+id/seekbar_font" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_margin="10px" android:layout_below="@id/color_font_text" android:max="100" android:progress="50"><

Pure CSS3 text color gradient - Is it possible?

≡放荡痞女 提交于 2019-11-29 01:05:05
Is there a way to create a cross-browser, pure CSS3 text color gradient? So, no png's. No 'webkit' only. EDIT: To be more precise: It's CSS3 only, and it's for text, not box gradients. EDIT: I found this solution , but it's only for webkit. There is no cross-browser way to do this outside webkit because only webkit currently has a background-clip: text , and this extension to background-clip is not on standards track (as far as I am aware). If you want to relax your CSS3 requirement, you can accomplish the same effect cross-browser with Canvas (or SVG), but then you're talking about HTML5

How do you make a gradient background in css?

末鹿安然 提交于 2019-11-28 23:01:50
Is there any way to create a gradient background using nothing but CSS? You can see an example of what I want to achieve on this website . Ghost Answer Use this in your CSS: background-image: -o-linear-gradient(bottom, rgb(254,133,107) 24%, rgb(35,171,17) 62%); background-image: -moz-linear-gradient(bottom, rgb(254,133,107) 24%, rgb(35,171,17) 62%); background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.24, rgb(254,133,107)), color-stop(0.62, rgb(35,171,17))); background-image: -webkit-linear-gradient(bottom, rgb(254,133,107) 24%, rgb(35,171,17) 62%); background-image:

IE8 gradient filter not working if a background color exists

旧街凉风 提交于 2019-11-28 23:00:52
问题 I'm trying to use the following CSS styles. They are working on most browsers, including ie7. However in ie8, the transparent background does not show and instead I get the background color which I would like to leave set as a fallback color. section.rgba{ background-color: #B4B490; background-color: rgba(200, 0, 104, 0.4); filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#99B4B490',EndColorStr='#99B4B490'); -ms-filter: "progid:DXImageTransform.Microsoft.gradient

Line rasterisation: Cover all pixels, regardless of line gradient?

穿精又带淫゛_ 提交于 2019-11-28 22:49:44
问题 Basically, I want to use a line algo to determine which cells to check for collisions for my raycaster. Bresenham isn't great for this as it uses a unified-thickness approach, meaning that it ignores cells that aren't at least half-covering the line. Not great at all, because it means that some segments of my line aren't being checked for intersections with the cells, leading to errors. I can't seem to find any "thick-line" algorithms, can anyone help me find one? Green: What I would like.

How to set gradient as the text color of a TextView? [duplicate]

倾然丶 夕夏残阳落幕 提交于 2019-11-28 21:53:58
This question already has an answer here: Text with gradient in Android 8 answers I have a file containing a gradient( textgradient.xml ) in my drawable folder. I need to put this gradient as the text color of a TextView through Java. How to do that? Rachita Nanda This links solves your query: Text with gradient in Android It used LinearGradient class to create a shader ,which is set on the text view It doesn't appear possible to extend TextView to draw text with a gradient. It is, however, possible to achieve this effect by creating a canvas and drawing on it. First we need to declare our

Fixed gradient background with css

核能气质少年 提交于 2019-11-28 21:33:04
问题 I would like for my page to have a gradient background flowing from top to bottom. I want the background to act like a fixed image in that the gradient stretches from the top of the current browser viewport to the bottom and looks the same as you scroll up and down the page. In other words, it does not repeat when you scroll. It stays fixed in place. So what I want is this: and after scrolling to the bottom you see this Notice that the gradient looks exactly the same on the bottom of the page

SVG “fill: url(#…)” behaving strangely in Firefox

家住魔仙堡 提交于 2019-11-28 21:16:35
I have the following SVG graphic: <svg width='36' height='30'> <defs> <linearGradient id="normal-gradient" x1="0%" y1="0%" x2="0%" y2="100%"> <stop offset="0%" style="stop-color:rgb(81,82,84); stop-opacity:.4"/> <stop offset="100%" style="stop-color:rgb(81,82,84); stop-opacity:1"/> </linearGradient> <linearGradient id="rollover-gradient" x1="0%" y1="0%" x2="0%" y2="100%"> <stop offset="0%" style="stop-color:rgb(0,105,23); stop-opacity:.5"/> <stop offset="100%" style="stop-color:rgb(0,105,23); stop-opacity:1"/> </linearGradient> <linearGradient id="active-gradient" x1="0%" y1="0%" x2="0%" y2=

How can you create a CSS3 gradient in Opera?

吃可爱长大的小学妹 提交于 2019-11-28 20:45:20
I can create CSS gradients in IE6/7/8/9/FF3.6+ and Chrome (see below). My question is: How would one create a gradient in Opera? .gradient{ /*Mozilla Firefox 3.6*/ background-image: -moz-linear-gradient(top, #dcdcdc, #c6c6c6); /*Webkit aka Google Chrome*/ background-image: -webkit-gradient(linear,left bottom,left top,color-stop(0, #c6c6c6),color-stop(1, #dcdcdc)); /*Internet Explorer 6,7 and 8*/ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#dcdcdc', endColorstr='#c6c6c6'); /*Internet Explorer 8 only*/ -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='

Imageview set color filter to gradient

喜夏-厌秋 提交于 2019-11-28 20:09:38
问题 I have a white image that I'd like to color with a gradient. Instead of generating a bunch of images each colored with a specific gradient, I'd like to do this in code (not xml). To change an image's color, I use imageView.setColorFilter(Color.GREEN); And this works fine. But how can I apply a gradient color instead of a solid color? LinearGradient doesn't help, because setColorFilter can't be applied to Shader objects. EDIT : This is the image I have: This is what I want: And this is what I