settings

Saving user color settings of a clicked Button in WPF

雨燕双飞 提交于 2019-12-01 11:18:03
I have a little problem with saving some properties of my Buttons. The Buttons are small and with a variety of colors. When i press one button, some specified colors are changing... and i want to save them for the next start up. The textbox values i can save them but this ...i can't. Code: public MainWindow() { InitializeComponent(); //blueColor.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)); //this.Property = Properties.Settings.Default.userColor; } private void blueColor_Click(object sender, RoutedEventArgs e) { var bc = new BrushConverter(); Main.Background = (Brush)bc.ConvertFrom("

User Settings - Android

落花浮王杯 提交于 2019-12-01 10:55:45
How to make in app changes persist so that when app relaunches all settings remain same(like if from app i have selected vibration then when app is not running if my phone is ringer mode when app relaunches it sets itself to vibration)? There's actually multiple ways to persist changes. The Android documentation covers all of them in more detail, but essentially these are the five ways. Easiest is SharedPreferences , probably. Shared Preferences Store private primitive data in key-value pairs. Internal Storage Store private data on the device memory. External Storage Store public data on the

Disable window and transition settings

梦想与她 提交于 2019-12-01 10:53:50
问题 So what I need to do is toggle window and/or transition animations on and off in code, to have the same effect of going Settings > Display > Animations > Disable all animations. The way I am familiar with changing device settings is by using a ContentResolver within the Settings.System.putInt() method as follows: ContentResolver cr = getContentResolver(); Settings.System.putInt(cr, Settings.System.WINDOW_ANIMATION_SCALE, 0); As described in the documentation 'Setting to 0 will disable all ...

To know date and time settings in device from an iPhone application

狂风中的少年 提交于 2019-12-01 09:06:41
问题 I want to know whether the user has set their device to automatically set the date and time in the Settings.app in iPhone. I need this information because I want to make user to access some informations in the app only for a day, which he can access again only on second day. But an smart user can change the date and access the information. So I want to check whether they set the date/time automatically for the device or not. Is there any way for doing so. Please suggest any other alternate

Changing ringer volume during ringing

安稳与你 提交于 2019-12-01 08:12:09
I'd like to change the ringer volume during ringing. Code below sets it during ringing (it is changed in system settings) but it doesn't come to effect with actual ringing (only the next ring call will use new value). Can I force this changes to make them effect Immediately? AudioManager audio = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); audio.setStreamVolume(AudioManager.STREAM_RING, volume, AudioManager.FLAG_ALLOW_RINGER_MODES | AudioManager.FLAG_PLAY_SOUND); After some research and tests I've found that volume change is possible only in very early stage of incomming

How to turn off Auto-Brightness programmatically?

南楼画角 提交于 2019-12-01 07:48:31
问题 I was wondering if there is a method to toggle the "Auto-Brightness" option to the OFF position on iOS devices and if so, what is it? 回答1: Brightness can be adjusted when you are inside the app and it is available inside the UIScreen class - Here's the documentation - http://developer.apple.com/library/ios/#documentation/uikit/reference/UIScreen_Class/Reference/UIScreen.html#//apple_ref/occ/instp/UIScreen/brightness But Apple's official public APIs do not allow an iOS app to access General

Changing product thumbnail sizes in WooCommerce 3.3

我的未来我决定 提交于 2019-12-01 06:36:43
I'm having some issues changing product thumbnail/image sizes in WooCommerce 3.3. I used to be able to do this in Admin under WooCommerce > Settings > Products > Display. But I don't see the display tab anymore. Has this functionality been moved or is there any other way to change image sizes now? In WooCommerce version 3.3 this settings are now located in the customizer and have been deeply enhanced. See this related documentation: WC 3.3 Image size improvements 来源: https://stackoverflow.com/questions/48192408/changing-product-thumbnail-sizes-in-woocommerce-3-3

Maven: Set the settings.xml location in the pom.xml?

杀马特。学长 韩版系。学妹 提交于 2019-12-01 06:33:02
Is it possible to set the location of the settings.xml file inside the pom.xml file. I know you can do it from the command line typing mvn -s location/of/settings.xml , but I wanted to know if I can set that within the pom.xml so I don't have to keep typing through command line. No. And that's probably a horrible idea, from a security standpoint. It'd allow the creator of a pom to bypass all your settings.xml settings. If you do the mvn -s location/of/settings.xml you will at least know it happened. But if you just randomly build a project, who knows how malicious that project's creator was.

Enable Location/GPS settings without using Play Services API

我是研究僧i 提交于 2019-12-01 05:33:01
As most of you might already known there is a new Location Settings Dialog API in Google Play Services. For those who don't know here is the screenshot of Maps app which used Dialog API in action. It is kinda unfair that google only added that API inside their play services. On the other hand, I think if they could do it, there would be a workaround to do it. That's why I am asking this question. Any information is appreciated. (Note: There was an exploit which let developers to enable and disable gps/location setting programmatically. However those tricks available on SO no longer works.

Changing ringer volume during ringing

安稳与你 提交于 2019-12-01 04:44:14
问题 I'd like to change the ringer volume during ringing. Code below sets it during ringing (it is changed in system settings) but it doesn't come to effect with actual ringing (only the next ring call will use new value). Can I force this changes to make them effect Immediately? AudioManager audio = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); audio.setStreamVolume(AudioManager.STREAM_RING, volume, AudioManager.FLAG_ALLOW_RINGER_MODES | AudioManager.FLAG_PLAY_SOUND); 回答1: After