Tag: 背景

应用程序转到后台后,每n分钟获取一次用户位置

我正在尝试实施本文中给出的build议。 不幸的是,我不清楚这些步骤。 我尝试实施这些build议,但即使在启动和停止locationServices后,backgroundTimeRemaining仍在继续减less。 这是我开发它的方式: – (void)applicationDidEnterBackground:(UIApplication *)application { UIApplication* app = [UIApplication sharedApplication]; bgTask = [app beginBackgroundTaskWithExpirationHandler:^{ [app endBackgroundTask:bgTask]; bgTask = UIBackgroundTaskInvalid; }]; // Start the long-running task and return immediately. dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ // Do the work associated with the task. self.timer = nil; [self initTimer]; }); } initTimer: – (void)initTimer { // Create […]

背景和背景颜色有什么区别?

使用background和background-color指定背景颜色有什么区别? 片段#1 body { background-color: blue; } 片段#2 body { background: blue; }

将图像作为JPanel的背景

我是Java新手,目前正在用graphics创build一个游戏。 我有这个类从JFrame延伸。 在这个类中,我有许多JPanel需要一个图像作为背景。 据我所知,为了能够在JPanel中绘制图像,我需要一个从JPanel扩展而来的单独的类,并且该类的paintComponent方法将完成这项工作。 但是我不想为每个JPanel单独做一个类,我有太多它们; 事实上我只关心背景。 我该怎么做? 它是与一个匿名的内部类? 怎么样? 为了更好的理解我提供了一些代码: public GUI extends JFrame { private JPanel x; … public GUI() { x = new JPanel(); // put an image background to x }

JFrame背景图像

我正在创build一个GUI,虽然很简单,但我想要一个背景图像(2048 X 2048)填充整个窗口,并在左上angular放置一个正方形,偶尔可以加载64 X 64图像。 在此先感谢任何人帮助:)编辑:我已经知道如何使JFrame设置大小,它的图像加载我需要帮助。

捕获窗体外的鼠标/键盘事件(在后台运行的应用程序)

我有一个应用程序在后台运行(最小化/任务托盘)。 我需要能够检测鼠标活动(点击,移动)以及键盘活动。 考虑到我的窗口不是“专注”的限制,这样做的最好方法是什么?

更改android菜单的背景颜色

我试图将标准浅灰色改为浅绿色。 似乎没有一个简单的方法来做到这一点(例如通过Android主题),但我已经find了解决方法,在这个页面上http://tinyurl.com/342dgn3 。 笔者似乎消失了,有人可以帮我整合这个代码吗? 我不明白我需要实现LayoutInflater工厂类。

如何让我的AVPlayer在应用程序在后台播放?

我已经完成了我的功课…一直在这里阅读,文档,谷歌search,stackoverflowing …但仍然没有运气让我的声音棒,当用户使应用程序进入后台。 到目前为止我所做的:将UIBackgroundModes,audio添加到plist文件。 首先这个代码: radioAudio = [[AVAudioSession alloc] init]; [radioAudio setCategory:AVAudioSessionCategoryPlayback error:nil]; [radioAudio setActive:YES error:nil]; 那么这个: NSString *radioURL = @"http://xxx.xxx.xxx/radio.m3u"; radioPlayer = [[AVPlayer playerWithURL:[NSURL URLWithString:radioURL]] retain]; 但只要用户点击主页button,我的声音就会消失。 我也发现这个,但没有添加cuase一些我读过的东西说这是不需要的; newTaskId = [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:NULL]; if (newTaskId != UIBackgroundTaskInvalid && bgTaskId != UIBackgroundTaskInvalid) [[UIApplication sharedApplication] endBackgroundTask: bgTaskId]; bgTaskId = newTaskId; 现在我不知道该怎么去让我的AVPlayer让广播歌曲,而用户在电话上做其他的东西。 我正在用4.2testingiPhone 4。 build设4.0。 任何人有什么build议我应该做的?

如何设置自定义的ActionBar颜色/样式?

我在我的项目中使用Android Navigation bar ,我想将操作栏中的顶部颜色更改为红色,我该怎么做? 我有这样的事情 我想要这样的东西, 我怎么能做到这一点?

在Outlook中如何使通讯背景图像?

我正在尝试制作简报,我有一些图像作为背景和文字。 这很容易,但我需要这个工作在Ms Outlook 。 我曾经尝试过: 1。 <td width="100" height="100" style="background: url('someurl');">text</td> 2。 <td width="100" height="100" background="someurl">text</td> 3。 <td width="100" height="100"> <div style="width: 0px; height:0px; position: relative;"> <div style="width: 100px; height: 100px; position: absolute; background: url('someurl')"> text </div> </div> </td> 但是在outlook方面没有什么效果。 我不知道如何解决它。 我正在使用Outlook 2007。 任何帮助,将不胜感激。

预加载CSS图像

我有一个隐藏的联系表单,部署点击一个button。 它的字段被设置为CSS背景图像,并且它们总是比切换的div晚出现。 我在<head>部分使用了这个代码片段,但没有运气(在清除caching之后): <script> $(document).ready(function() { pic = new Image(); pic2 = new Image(); pic3 = new Image(); pic.src="<?php bloginfo('template_directory'); ?>http://img.dovov.cominputs/input1.png"; pic2.src="<?php bloginfo('template_directory'); ?>http://img.dovov.cominputs/input2.png"; pic3.src="<?php bloginfo('template_directory'); ?>http://img.dovov.cominputs/input3.png"; }); </script> 我使用jQuery作为我的库,如果我可以用它来解决这个问题,这将是很酷的。 感谢您的尽pipe。