|
this is my dialog
@Override
protected Dialog onCreateDialog(int id, Bundle args){
switch(id){
case 1:
return new AlertDialog.Builder(this)
.setIcon(R.drawable.ic_launcher)
.setTitle("Pick some")
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,int whichButton)
{
}
})
.setNegativeButton("cancel", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,int whichButton)
{
}
})
.setMultiChoiceItems(items, itemsChecked, new DialogInterface.OnMultiChoiceClickListener() {
public void onClick(DialogInterface dialog, int which,boolean isChecked) {
}
}
)
.create();
How can I detect when the dialog is load ?
i need to do something when the dialog is up and see it on the screen
* this is a multi-checkbox dialog, and i need to uncheck all.
thanks
modified 4-Oct-14 6:24am.
|
|
|
|
|
|
I just wrote what I tried. May have been wrong and that is not the way, that's why I turned to for help
|
|
|
|
|
OK, but you have an error message telling you what you have done wrong. You need to fix that before you can proceed.
|
|
|
|
|
I tried a few things but still not working
I have been really desperate, do not know how to solve it
|
|
|
|
|
Have you corrected the coding error that I pointed out to you? Or do you have some new problem?
|
|
|
|
|
no errors, i update my question.
|
|
|
|
|
|
goldsoft wrote: How can I detect when the dialog is load ? i need to do something when the dialog is up and see it on the screen Without more information as to your need/intent, this goes against Android's asynchronous (i.e., non-blocking) interface.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
thanks for the help,
what i need to do is uncheck all my multi checkBoxs
that i have in the dialog.
when i press the button and the dialog came up -
i need to uncheck all my checkBoxs
|
|
|
|
|
Hai there,
I have drawn a circle using canvas bitmap by taking linear layout, Now I want to swipe that circle so as to draw another circle in the same xml file and display.Kindly help!
|
|
|
|
|
Hi there,
I have extracted the json data, but now I need to set those values in options menu as menuitems. Please kindly help!
SubMenu submenu = menu.addSubMenu("Select");
submenu.add(a1);
submenu.add(a2);
submenu.add(a3);
submenu.add(a4);
submenu.add(a5);
The above code I used to add the values in options menu with onOptionsCreateMenu method. a1,a2,a3,a4,a5 are not strings those are extracted and stored in string so just I m added them but failed..!
|
|
|
|
|
Member 11108789 wrote: I m added them but failed You need to explain what "failed" means. Show the actual code, the values of your variables and any error messages, or a proper description of what happens.
|
|
|
|
|
The code for how I extracted from json:
if((jsonarray.get(0).toString()) != null){
JSONObject jsonobj = new JSONObject(jsonarray.get(0).toString());
Log.e("aptlist", jsonobj.toString());
JSONArray array1= jsonobj.getJSONArray(TAG_APTLIST);
String a1= array1.get(0).toString();
String a2= array1.get(1).toString();
String a3= array1.get(2).toString();
String a4= array1.get(3).toString();
String a5= array1.get(4).toString();
}
Now I want those a1,a2,a3,a4,a5 values in optionsmenu when I click.
I tried as below,but got error as NullPointException
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// TODO Auto-generated method stub
getMenuInflater().inflate(R.menu.main, menu);
SubMenu submenu = menu.addSubMenu("Select Apartment");
submenu.add(a1);
Log.e("msg from a1", a1.toString());
submenu.add(a2);
submenu.add(a3);
submenu.add(a4);
submenu.add(a5);
return true;
}
|
|
|
|
|
Member 11108789 wrote: but got error as NullPointException That just means you are trying to use a pointer that has not been initialised, but we cannot guess where it occurs. Use your debugger to trace through the code to identify which line is the problem.
|
|
|
|
|
Hey! how can we extract JSON object if it has a multiple values See below for an example
{"aptName":["AG01","AG02","AG03","AF01","AF02",],},
If it is {"aptName1:"11.765","aptName2:"16.327",} I m able to extract. But I need help for the above one.
and here is my URL: http://nuclious.com/monitoring/QuickAppDataQuery2.php?mobileNo=8123168934..Please check this and let me know how to extract the values. Note:I know how to extract if there is single value.
sunil
|
|
|
|
|
|
Thanks for your reply..
But all I need to extract multiple JSONArray values with only one JSONObject.
It would be great if you give an example for me..
Thanks in Advance!
|
|
|
|
|
|
Hi,
Sir , i am a android developer. please guide me calendar source code for google calendar in android.
|
|
|
|
|
|
I would start here.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Hi Guys,
I have been working on an open source MVVM framework for Android, and have just released it on Github. It is a development release, but is quite well documented. Those of you who are addicted to WPF goodness would really love the ability to do the same on Android.
Here it is on Github: RoboMVVM[^]
I am considering writing a tutorial about it on CodeProject soon when I have time for it. Meanwhile, please have a look and tell me what you think.
Regards,
Debdatta Basu
debdatta.basu91@gmail.com
|
|
|
|
|
This is not the place to advertise your work. Please wait until you have written your article and then submit it in the normal way.
|
|
|
|
|
This is not an advertisement. This is a request for comments an suggestions. Thank for yours. I just wish it were more helpful.
|
|
|
|