foreground

Changing the forecolor and backcolor of text in a textbox

限于喜欢 提交于 2019-12-12 10:52:06
问题 I'm making a C++ code editor application using VB.NET. I'd like to change the color of the keywords as the user types it. Also I'm looking for a way to highlight some lines of the code. Is there a way to change the forecolor and backcolour of a piece of text inside a textbox or a rich textbox? 回答1: I do not really know what you want to do so here are some options. If you want a step by step tutorial on how to write a syntax highlighting control, you can read these articles: Syntax

Android foreground service lose context

北城以北 提交于 2019-12-12 03:45:33
问题 I have a little problem understanding what's going on with a service lifecycle that I created. My Application declare and use a service "LocalisationSevice" which its goal is to start a location listener and add the updated location to an array. Simple as that. The service run foreground. The problem is that if I manually kill my application though the task switcher or eclipse the service will stay (GPS and notification are here in the notification area). Thats fine, it is what I want, if I

Opening my application from Google Play App crashes on exit

梦想与她 提交于 2019-12-12 03:04:45
问题 I have option to open my app Google Play page inside my app. When clicking open button in Google Play My app launches again. (From Splash screen) When I am exiting my app it crashed. I tried put singleTask flag to my Home activity. It actually worked fine. But arised another crash. So I need to know is: Is there any option to put flag in my Market calling Intent to notify that the app is already launched and just bring it front on clicking Open button? Here how am I calling GooglePlay app.

Android: Inconsistency in documentation. When may an app be killed?

匆匆过客 提交于 2019-12-11 21:29:53
问题 It's seems to me that these articles 1 and 2 are not consistent. Article [1] says that the app is only killable in certain parts of its life cycle. Article [2] says that it is. Which is right? [1] Look for the table and the word "killable". [2] Look for "They are killed only as a last resort" in the section on foreground processes. [Edit 1 start] Changed the way I did links. Thanks to the guy/girl who made me aware of this by editing my post. [Edit 2 end] 回答1: Article ** says that the app is

GroupBox header template

自作多情 提交于 2019-12-11 19:08:11
问题 My Groupbox template is defined as so <Style x:Key="{x:Type GroupBox}" TargetType="{x:Type GroupBox}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type GroupBox}"> <Border BorderThickness="1" BorderBrush="SomeColour" Background="SomeColour" CornerRadius="4"> <Grid SnapsToDevicePixels="true"> <Grid.RowDefinitions> <RowDefinition Height="auto" /> <RowDefinition Height="auto" /> </Grid.RowDefinitions> <ContentPresenter Grid.Row="0" ContentSource="Header" Margin="2

How to get the foreground activity instance?

▼魔方 西西 提交于 2019-12-11 16:15:51
问题 I want to create an service app which sends screen-touch events timely to foregound activity. The foregound activity is probably a 3pp application. My codes: public void myClickEvent(float x, float y) { long firstTime = SystemClock.uptimeMillis(); final MotionEvent firstEvent = MotionEvent.obtain(firstTime, firstTime, MotionEvent.ACTION_DOWN, x, y, 0); long secondTime = firstTime + 100; final MotionEvent secondEvent = MotionEvent.obtain(secondTime, secondTime, MotionEvent.ACTION_UP, x, y, 0);

How to detect if user actively relaunched the app by clicking the app icon?

淺唱寂寞╮ 提交于 2019-12-11 12:11:30
问题 I'd like to know if my app is coming foreground by user's clicking the app icon.(doesn't matter whether it's fresh start or becoming active from inactive) But not from incoming call, in-app-purchase or anything else. (I found applicationDidBecomeActive getting called during in-app-purchase process) 回答1: Step 1: When application is started and wasn't in the background before (suspended), application:didFinishLaunchingWithOptions: will execute first. This method carries launchOptions parameter

How to change label in ViewController when app enters the foreground

╄→гoц情女王★ 提交于 2019-12-11 09:51:25
问题 i want to change a label in my view controller when the app enters the foreground....: SalaryAppV4AppDelegate.h @interface SalaryAppV4AppDelegate : NSObject <UIApplicationDelegate, UITabBarControllerDelegate> { //---------------------------------------------- NSTimeInterval appEnteredBackground; NSTimeInterval appEnteredForeground; NSTimeInterval difference; NSString *times; //----------------------------------------------- SalaryAppV4AppDelegate.m - (void)applicationWillEnterForeground:

Notify when application comes to foreground

落花浮王杯 提交于 2019-12-11 06:24:06
问题 I have a service which has to monitor which application is in the foreground and based on the application do some functionality. I can get the list of foreground applications, using ActivityManager.getRunningAppProcesses(). But with this I cannot monitor when the foreground application changes. ex. when Application 1 which was foreground goes to background and a new Application 2 comes to foreground, the service should be notified about this. Are there any Broadcasting happening in Android,

WPF: ContentPresenter changing Foreground unexpectedly depending on where styles are located

梦想与她 提交于 2019-12-10 20:58:29
问题 I'm having an issue with the ContentPresenter behaving unexpectedly based on whether the styles are located in the Window. Resources or in a ResourceDictionary. Specifically, I'm setting the Foreground of the default TextBlock to Black, then setting the Foreground value in my default button style to White. If the styles exists on the page like this, they work fine: <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"