dialog

Set custom dialog once into activity

房东的猫 提交于 2019-12-23 21:06:35
问题 I have listactivity consist of multiple row each row open activity which contain text and two button one of them open infinite gallery the other one open dialog ,and each dialog had different string , i have 20 row so i add dialog 20 times which is redundant , also its work fine but i think there is better approach than what i did , any help to get it will be appreciated , thanks MyDay class: public class MyDay extends Activity { final Context context = this; private Button button; TextView

How to add ActionListener to customize component

北慕城南 提交于 2019-12-23 20:06:26
问题 I created a component and want to add ActionListener to customize component. I want to create a component like JButton and show actionPerformed event in Events Dialog on design view. JBaseComponent class will be derived from JComponent . Code: public class JCButton extends JBaseComponent implements ActionListener,ItemSelectable,ChangeListener{ private JButton _button=new JButton(); private ActionEvent _actevent=new ActionEvent(this,ActionEvent.ACTION_PERFORMED,""); public JCButton() { super()

Android - on post execute in AsyncTask

北城余情 提交于 2019-12-23 19:53:31
问题 I currently have an asyncTask which on preexecute begins a loading bar, in background send something to a server, and on post execute dismisses the dialog and enables a button. However, my post execute is not executing due to doInBackground returning null. I'm trying to figure out what I can do do get the postExecute to run. any ideas? thanks code: class DatabaseAsync extends AsyncTask<Void,Void,Void>{ @Override protected void onPreExecute(){ dialog = ProgressDialog.show(MainFeedActivity.this

Android custom design Dialog prob without title bar

若如初见. 提交于 2019-12-23 19:16:02
问题 I using following xml to design a custom Dialog. <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:background="@drawable/wound_screener_bg" android:layout_height="match_parent" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:textStyle="bold" android:paddingTop="15dp" android:paddingRight="70dp" android:textColor="#5A5C5E" android:paddingLeft=

What's the best way to have reusable dialog boxes?

我与影子孤独终老i 提交于 2019-12-23 18:04:32
问题 What's the best way to create reusable dialog boxes in Android? Reading through the Dialog dev guide, I know I can use AlertDialog.Builder(this); in one of my Activity s, but what if I want to use this in multiple Activities? If this was some other class I would extend it, so MyDialog extends AlertDialog , but then I cannot use the Builder . Any suggestions? 回答1: Crate one class file like as AllMethod.java and add this code in that class file. public static void showAlert(Activity act, String

how to know the application is shutting down

家住魔仙堡 提交于 2019-12-23 17:41:18
问题 There is a WPF application. i want to log when the application is closed. but i cannot modify the application (some restriction, just because business). So i create an invisible form component live inside the existing application, add as a dll library, so the existing application do not need to be modified. but the issue is, how can my invisible component know the application is shutting down? is there some function or event handler i can use? Solution: there are some event can do that,

Last jQuery modal dialog z-index overrides initial modal z-index

旧城冷巷雨未停 提交于 2019-12-23 17:23:37
问题 I have a need to show 2 dialog modals at once. Due to the contents of the first dialog needing to use some absolute positioning and z-indexing, the z-index of the overlay is important to me. The problem I get is if I show a the first modal at z-index of 300, the overlay gets a z-index of 301. If I then show another modal with a z-index of 500, the new overlay gets a z-index of 501. If I close both of the modals and open the first modal again, instead of getting an overlay with z-index of 301,

Value of EditText in Custom Dialog

微笑、不失礼 提交于 2019-12-23 16:23:24
问题 I have ListActivity , onClick of each item a Custom Dialog appears. Custom Dialog contains spinner and EditText Now i am not able to get the value of EditText, while debug value of EditText is coming as blank or "". protected void onListItemClick(ListView l, View v, int position, long id) { super.onListItemClick(l, v, position, id); positionList=position; HashMap<String,Object>temp =(HashMap<String ,Object>)list.get(position); LayoutInflater inflater = (LayoutInflater) CommonScreen6.this

Netbeans GUI preview is different from Runtime view

左心房为你撑大大i 提交于 2019-12-23 16:13:11
问题 I'm developing a simple Java application using NetBeans and its GUI editor. I'm stuck on creating a simple dialog: runtime it looks different from what I designed and from what is previewed in the editor. Basically, clicking on a button make my dialog appears. private void jButton1MouseReleased(java.awt.event.MouseEvent evt) { PanelDialogNuovoCliente pan = new PanelDialogNuovoCliente(); JDialog jd=new JDialog(); jd.setTitle("Nuovo Cliente"); jd.setMinimumSize(new Dimension(500, 400)); jd

ImageView in a Custom Dialog - fill_parent does not work and my dialog is small

♀尐吖头ヾ 提交于 2019-12-23 16:01:34
问题 I have a simple request: I have to put some pictures (some small resolution, some big resolution) in a dialog and display them fullscreen. I tried this: Dialog dialog = new Dialog(getActivity()); dialog.setContentView(R.layout.custom_dialog); int picId = Integer.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("_id"))); dialog.setTitle(webcamCursor.getString(webcamCursor .getColumnIndex("City"))); image = (ImageView) dialog.findViewById(R.id.image); image.setImageResource(R