customdialog

How can I add an image to a custom WiX dialog?

时光总嘲笑我的痴心妄想 提交于 2019-12-03 23:55:58
I have tried modifying the set of WixVariables in my Product.wxs like so: <WixVariable Id="MainLogoBmp" Value="Resources/Images/weblabel.jpg" /> <WixVariable Id="WixUIBannerBmp" Value="Resources/Images/installer_banner.jpg" /> (The first part is what I tried, the one below it is an example of the stock variable that works) ...and then referencing the variable with !(wix.MainLogoBmp): <Control Id="Bitmap" Type="Bitmap" X="0" Y="0" Width="258" Height="185" TabSkip="no" Text="!(wix.MainLogoBmp)" /> ...but when I try to compile this I get the following error: Error 17 ICE17: Bitmap: 'Resources

How to center layout inside of Android Dialog?

浪尽此生 提交于 2019-12-03 20:45:03
问题 I am trying to create a custom Dialog, and have its content centered, but it is always ending up left-aligned. Here is aboutdialog.xml: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:a="http://schemas.android.com/apk/res/android" a:orientation="vertical" a:id="@+id/AboutDialogLayout" a:layout_width="fill_parent" a:layout_height="fill_parent" a:layout_gravity="center_horizontal" a:gravity="center_horizontal"> <ImageView a:id="@+id/imageView1" a:src="@drawable/pricebook" a:layout

Dialog.setTitle not showing a title

强颜欢笑 提交于 2019-12-03 17:36:47
问题 I am trying to add a custom title to my Dialog, however whenever I run my application it doesn't show a title. My code for creating the dialog is final Dialog passwordDialog = new Dialog(this); passwordDialog.setContentView(R.layout.admin_password_dialog); passwordDialog.setTitle("Enter An Administrative Password"); passwordDialog.show(); And my layout file is <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width

How to create custom dialog box with two button in android?

主宰稳场 提交于 2019-12-03 07:54:30
问题 How to generate custom dialog box in android like this, I want just like this. How to generate it. please give me suggestion. i have used below code for dialog box, what is the problem in my code? I have not identify it. please share me any Idea. <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@android:color/transparent">

Dialog.setTitle not showing a title

十年热恋 提交于 2019-12-03 05:44:07
I am trying to add a custom title to my Dialog, however whenever I run my application it doesn't show a title. My code for creating the dialog is final Dialog passwordDialog = new Dialog(this); passwordDialog.setContentView(R.layout.admin_password_dialog); passwordDialog.setTitle("Enter An Administrative Password"); passwordDialog.show(); And my layout file is <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <Button android:id="@+id/btn_confirmPassword"

How do I show only one Dialog at a time?

一笑奈何 提交于 2019-11-30 18:15:51
My Android application shows an AlertDialog on a button click. When I click on the button more than once more than one Dialog is created. How can I fix this? Here is my code: button.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { dialog = new AlertDialog.Builder(context); dialog.show(); } }); You can create a global flag (boolean) that is set to true if a dialog is shown? If the user click ok, yes, no or anything the dialog is closed and you set the flag to false. So something like: boolean dialogShown; If(dialogShown) { return; } else { dialogShown = true;

Dialog box disappears during orientation change in fragment

穿精又带淫゛_ 提交于 2019-11-29 16:14:50
So I am not a very experience Android programmer, so please be gentle with me :) I am trying to create an app that uses fragements and from within one of these fragments I am calling a custom dialog box. //create dialog final Dialog dialog = new Dialog(getActivity()); dialog.setCancelable(false); dialog.setContentView(R.layout.fragment_update_dialog); //set up data in dialog here Button bUpdate = (Button) dialog.findViewById(R.id.bDialogUpdate); bUpdate.setOnClickListener(new OnClickListener() { //define onclick listener code here }); dialog.show(); This code works fine and I have no issues

Android - AlertDialog styling

坚强是说给别人听的谎言 提交于 2019-11-29 14:08:15
问题 I have an alert dialog in the app as shown below. I want the title and the line which separates the title - message body to be in orange colour. how can i do this? What i tried is using custom style as shown below. But this did not work. <style name="AboutDialog" parent="@android:style/Theme.Dialog"> <item name="android:textColor">#E5492A</item> </style> my alert dialog code: AlertDialog.Builder alertDialog = new AlertDialog.Builder( new ContextThemeWrapper(MainActivity.context, R.style

How to update data in a Custom Dialog

試著忘記壹切 提交于 2019-11-29 12:55:55
The user at the moment clicks on a row which contains data and a Dialog with text fields is displayed. I want the user to update the strings by using this Dialog. How can I do this? I have an update method already in my Database Class, but I'm not sure how to implement the update in the Dialog Database Class package ie.example.artur.projectrepeat; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import android.database.sqlite.SQLiteQueryBuilder; /

Custom Dialog Boxes to show image, text and setTitle

痞子三分冷 提交于 2019-11-29 08:09:16
I have a little glitch in my program I've been trying to figure out what it is I'm missing. In my .java file, I have a gridview of images where I setOnItemsClickListener on items in the gridview. I have 2 xml files, one for the .java and the other is set as contentview to popup window on click on any of the gridview items. I want it that whenever user clicks on item in gridview, the custom dialog box pops up, to show the image clicked, plus a brief description on the image. So far, the dialog pops out quite alright, but no details are passed unto this dialog box. THis is my activity_first.xml