WPF showing dialog before main window

Here’s the full solution that worked for me: In App.xaml, I remove the StartupUri stuff, and add a Startup handler: <Application x:Class=”MyNamespace.App” xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation” xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml” Startup=”ApplicationStart”> </Application> In App.xaml.cs, I define the handler as follows: public partial class App { private void ApplicationStart(object sender, StartupEventArgs e) { //Disable shutdown when the dialog closes Current.ShutdownMode = ShutdownMode.OnExplicitShutdown; … Read more

Android dialog width

I had the same problem. I used following code to make dialog fill_parent and it worked fine. public class SharePost extends Dialog { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.adaptor_contentsharepost); LayoutParams params = getWindow().getAttributes(); params.height = LayoutParams.FILL_PARENT; getWindow().setAttributes((android.view.WindowManager.LayoutParams) params); } } layout <LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android” android:orientation=”vertical” android:id=”@+id/dialogWidth” android:layout_width=”match_parent” android:layout_height=”match_parent”> contents here </LinearLayout>

Adding a property to an Html template gives error “Object does not allow properties to be added or changed”

Instead of createHtmlOutputFromFile(filename) use createTemplateFromFile(filename) The above because the first returns a HtmlOutput object which not allow to add properties while the second returns a HtmalTemplate which allows to add properties. Reference https://developers.google.com/apps-script/guides/html/templates

Popup over incoming-call screen

If you want to keep the Call activity still clickable, but not have any controls on your overlay, you can do this by calling getWindow().addFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE); getWindow().addFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL); In the onCreate() method of the activity that is shown over the call. The layout parameters useable together with this are: android:windowBackground=”@android:color/transparent” android:windowIsTranslucent=”true” android:windowAnimationStyle=”@android:style/Animation.Translucent”

Alternative to “FLAG_BLUR_BEHIND” in Android?

ok , there is probably no alternative that uses the API , unless maybe i’ve forgetting anything. i can however use dimming , which is cool too, as written here: WindowManager.LayoutParams lp = dialog.getWindow().getAttributes(); lp.dimAmount=0.0f; dialog.getWindow().setAttributes(lp); dialog.getWindow().addFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND);

Adding a vertical scrollbar to an AlertDialog in Android?

In order for a view to scrollable, it must be nested inside of a ScrollView container: <ScrollView> <LinearLayout android:orientation=”vertical” android:scrollbars=”vertical” android:scrollbarAlwaysDrawVerticalTrack=”true”> <TextView /> <Button /> </LinearLayout> </ScrollView> Note that a ScrollView container can only have one child layout view. It is not possible, for example, to place a TextView and Button in a ScrollView without … Read more