styles

Android's floating windows coupled with FLAG_SHOW_WHEN_LOCKED fails

穿精又带淫゛_ 提交于 2019-12-22 04:55:16
问题 My app, shows a dialog box to the user before the lock screen. It's a simple Activity that contains DialogFragments (from the support library as this app runs on 2.2+). Since the actual activity that displayed those dialogs was not a floating window by Android's standards, getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED); worked fine. However, I was thinking I'd use an Activity that looks like a Dialog instead. All the Dialog themes (Holo, etc), though, have this item:

Setting backgroundImage style from a FileReader

旧街凉风 提交于 2019-12-22 04:13:08
问题 I am looking for a solution that allows me to take a file from a file upload input and preview it by setting the document.body.style.backgroundImage. The following code works to display a preview in an Image element: function setImage(id, target){ input = document.getElementById(id); if (input.files && input.files[0]) { var reader = new FileReader(); reader.onload = function (e) { target.src = e.target.result; }; reader.readAsDataURL(input.files[0]); } } Where id is the id of the <input type=

Using parents for drawable resources

a 夏天 提交于 2019-12-22 03:51:21
问题 When I define a style, it can be inherited from a parent style, e.g: <style name="DialogNoTitle" parent="@android:style/Theme.Dialog"> <item name="android:windowNoTitle">true</item> </style> Now I want to do the same with drawable resources, something like this: <shape xmlns:android="http://schemas.android.com/apk/res/android" name="ChildDrawable" parent="@drawable/ParentDrawable"> <solid android:color="@android:color/white"/> <corners android:radius="6dp"/> </shape> Is there a way to

Underline Label in WPF, using styles

谁都会走 提交于 2019-12-22 03:44:04
问题 I have the following style: <Style x:Key="ActionLabelStyle" TargetType="{x:Type Label}"> <Setter Property="Margin" Value="10,3" /> <Setter Property="Padding" Value="0" /> <Setter Property="TextBlock.TextWrapping" Value="Wrap" /> <Setter Property="FontFamily" Value="Calibri" /> <Style.Triggers> <MultiTrigger> <MultiTrigger.Conditions> <Condition Property="IsMouseOver" Value="True" /> <Condition Property="IsEnabled" Value="True" /> </MultiTrigger.Conditions> <Setter Property="Background" Value=

How to affect child control properties from a style

て烟熏妆下的殇ゞ 提交于 2019-12-22 03:43:52
问题 I'm creating a style that targets a button. The buttons that the style will be applied against have an image and a textblock in a stack panel inside of them. I'm looking to use a trigger to affect the properties of the child controls based upon certain condtions. I would like to use the button style to be able to affect the stackpanels orientation as well as the image's defined width. I've looked throught the various child control types that are available in the property intellisence of the

Is it valid HTML to have two <style> elements inside your HTML <head> tag?

微笑、不失礼 提交于 2019-12-22 03:41:32
问题 Is it valid to have two <style> tags inside of an HTML head tag? For example I am trying to write an HTML page for email clients with no external stylesheets added. Due to the way our template system works it is much easier for us to have <head> <style> .someStyle{} </style> <style> .someOtherStyle{} </style> </head> instead of this... <head> <style> .someStyle{} .someOtherStyle{} </style> </head> If option 2 is the only way of doing this I will do that but option 1 for various reasons works

Underline Label in WPF, using styles

早过忘川 提交于 2019-12-22 03:41:06
问题 I have the following style: <Style x:Key="ActionLabelStyle" TargetType="{x:Type Label}"> <Setter Property="Margin" Value="10,3" /> <Setter Property="Padding" Value="0" /> <Setter Property="TextBlock.TextWrapping" Value="Wrap" /> <Setter Property="FontFamily" Value="Calibri" /> <Style.Triggers> <MultiTrigger> <MultiTrigger.Conditions> <Condition Property="IsMouseOver" Value="True" /> <Condition Property="IsEnabled" Value="True" /> </MultiTrigger.Conditions> <Setter Property="Background" Value=

C# var keyword usage [duplicate]

本秂侑毒 提交于 2019-12-22 03:21:44
问题 This question already has answers here : Closed 10 years ago . Possible Duplicates: What to use: var or object name type? Use of var keyword in C# What’s the point of the var keyword? Should I always favour implictly typed local variables in C# 3.0? I have just installed a trial version of ReSharper to evaluate it for my company. One thing that I have noticed is it is suggesting that I change the following (made up example): string s = ""; to var s = ""; Is it best practice to use the var

Html emails <hr/> styling issue

孤人 提交于 2019-12-22 01:27:09
问题 I have a problem with e-mail clients reverting my styled <hr/> to one with just a solid line. The following is my mark-up, looks fine in Chrome and IE but Outlook always reverts the dotted line to a solid one. <hr style="background:none; border:dotted 1px #999999; border-width:1px 0 0 0; height:0; width:100%; margin:0px 0px 0px 0px; padding-top:10px;padding-bottom:10px;" ></hr> I have looked at Campaign Monitor but nothing particular to guide me there. All answers appreciated. 回答1: I would

How to create border bottom with 2 different color?

霸气de小男生 提交于 2019-12-22 01:16:54
问题 I need to create border bottom with two different color like below picture How do I create the CSS? 回答1: You can use css pseudo classes i.e :after or :before . h3 { margin: 0; padding-bottom: 7px; position: relative; border-bottom: 2px solid #ccc; } h3:before { position: absolute; background: brown; height: 2px; content: ''; width: 50px; bottom: -2px; left: 0; } <h3>Last Recent Post</h3> And you can use css gradient as well: h3 { margin: 0; padding-bottom: 7px; position: relative; } h3:before