Questions tagged [background]

Background typically refers to the rendering behind a container element's contents - usually on a web page, Windows form or other UI presentation medium.

In CSS, the background property is a shorthand property for setting the individual background property values in a single place in the style sheet. This includes the image, color, tiling and position.

In Windows Presentation Foundation (WPF), the background attribute can be defined for any visual UI object. It should be noted that WPF applications use a background thread for handling rendering and repainting.

Desktop applications such as those written in .NET and Java may have colors or images used to fill the window of a particular frame or form.

For information about background threading, see the multithreading wiki.

14810 questions
79
votes
7 answers

how to add background image to activity?

using theme or ImageView ?
Vladimir Berezkin
  • 3,580
  • 4
  • 27
  • 33
77
votes
8 answers

Android : change button text and background color

How can I change both text and background colors when my button is pressed, with xml ? To change text color I can do :
Maelig
  • 2,046
  • 4
  • 24
  • 49
76
votes
8 answers

Transparent control over PictureBox

In my C# Form I have a Label that displays a download percentage in the download event: this.lblprg.Text = overallpercent.ToString("#0") + "%"; The Label control's BackColor property is set to be transparent and I want it to be displayed over a…
Derezzed
  • 1,093
  • 3
  • 11
  • 15
76
votes
14 answers

How to Lazy Load div background images

As many of you know it is widely used to lazy load images. Now i want to use this as lazy load div background images. How can i do that ? I am currently able to use http://www.appelsiini.net/projects/lazyload that plugin So i need to modify it in a…
Furkan Gözükara
  • 22,964
  • 77
  • 205
  • 342
75
votes
4 answers

What is the difference between src and background of ImageView

I am a puzzled about using src or background for an ImageView. I know the former means the content of this ImageView and the latter means the background of the ImageView. But how to decide which one to use? I don't see the difference.
peter_feng
  • 855
  • 2
  • 7
  • 11
75
votes
2 answers

How to debug Google Chrome background script?

I have very simple extension: manifest.json { "name": "historyCleaner", "version": "0.1.1", "manifest_version": 1, "description": "This is my first Chrome extension", "background": { "scripts": ["cleaner.js"] }, "permissions": [ …
ciembor
  • 7,189
  • 13
  • 59
  • 100
74
votes
10 answers

How to fill background image of an UIView

I have an UIView and I set a background image in this way: self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"sfond-appz.png"]]; My problem is that back-image is not centered inside the view, but it's replayed some…
Jayyrus
  • 12,961
  • 41
  • 132
  • 214
71
votes
5 answers

setBackgroundResource() discards my XML layout attributes

I have a view which is used as an item in a ListView. In my custom adapter, I change the background of the view using View.setBackgroundResource() depending on the item's position in the list. (I have separate assets for the first and last items in…
Graham Borland
  • 60,055
  • 21
  • 138
  • 179
70
votes
12 answers

android animation is not finished in onAnimationEnd

It seems that an android animation is not truly finished when the onAnimationEnd event is fired although animation.hasEnded is set to true. I want my view to change it's background drawable on the end of it's ScaleAnimation which it does, but you…
ShadowMare
  • 2,087
  • 2
  • 25
  • 27
70
votes
5 answers

Greyscale Background Css Images

I've searched a lot on the web but I cannot find a cross browser solution to fade a css backgrund image to greyscale and back. The only working solution is to apply CSS3 filter greyscale: -webkit-filter: grayscale(100%); but this works just with…
bluantinoo
  • 1,829
  • 3
  • 19
  • 25
69
votes
9 answers

How to set a background image in Xcode using swift?

How can I set a background image for my main view controller in Xcode 6 using swift? I know that you can do this in the assistant editor as below: override func viewDidLoad() { super.viewDidLoad() view.backgroundColor =…
GuiGui23
  • 4,035
  • 4
  • 19
  • 17
69
votes
3 answers

SVG transparent background web

I am trying to change the background of this SVG code to transparent without success. I'm new to SVG and somehow I can't find the solution on google; can anybody help? demo:http://jsfiddle.net/kougiland/SzfSJ/1/
Gildas.Tambo
  • 22,173
  • 7
  • 50
  • 78
69
votes
1 answer

Android: how to create a background from pattern?

I have a pattern (.png image 4x4px) and have to fill the layout with it. Does anyone know how to do this? If I simply select the drawable as a background the image, it is stretched; instead it needs to be repeated along the x and y axis.
Niko Gamulin
  • 66,025
  • 95
  • 221
  • 286
68
votes
7 answers

iPhone - Backgrounding to poll for events

For quite a while I'd been looking into a way in my iPhone app to poll every X minutes to check the data counters. After much reading of the Background Execution documentation and a few trial apps I'd dismissed this as impossible without abusing the…
NeilInglis
  • 3,431
  • 4
  • 30
  • 31
68
votes
8 answers

Check if color is dark or light in Android

as per title, my question is: Does Android provide any way to analyze/determine if a color (that will be obviously dynamic for the purpose) is light or dark?
iGio90
  • 3,251
  • 7
  • 30
  • 43