Popup's in Android

Put your problem here if it does not fit any of the other categories.

Popup's in Android

Postby srinuv28 » Mon Nov 16, 2009 9:28 am

Hi Friends..

Any one help on Popup's in android,
how to implement popup's in Android,
My requirement is ExpandableListView is there when I select on child, I will show popup with three different messages.

pls looking into attached file.


Thanks
Srinu
Attachments
popup.jpg
popup.jpg (35.47 KiB) Viewed 969 times
srinuv28
Developer
Developer
 
Posts: 36
Joined: Wed Nov 04, 2009 4:04 am

Top

Postby FreakDev » Mon Nov 16, 2009 12:55 pm

you can create layout with theme "Dialog", and if you'd like to customize this theme (extending it) you'll may be interested in this topic
FreakDev
Junior Developer
Junior Developer
 
Posts: 12
Joined: Sun Nov 15, 2009 3:42 pm

Postby qlimax » Mon Nov 16, 2009 1:38 pm

sorry but I dont understand your question...
is the picture the result you expect? what 's the behaviour that you expect from the app?
and... what do you mean as "popup"? I'm sure that with some more details we can help you :)
¯`·.¸¸.><((((º>¯`·.¸¸. ><((((º>
User avatar
qlimax
Master Developer
Master Developer
 
Posts: 271
Joined: Mon Aug 31, 2009 10:54 am
Location: Swiss

Postby srinuv28 » Tue Nov 17, 2009 3:32 am

Hi..

In ExpandableList when I select child then I will show popup with Send SMS, Send offline message messages

pls help on this...

Thanx
srinuv28
Developer
Developer
 
Posts: 36
Joined: Wed Nov 04, 2009 4:04 am

Postby Kur1310 » Tue Nov 17, 2009 7:03 am

Hey just put an itemclickListener on that expandable list view..And in that listener create an alert dialog with your needing entries....I'm putting my project's code snippet... And also see the screenshots...


/* MySettings.java */

[syntax="java"]
OnItemClickListener itemclicked = new OnItemClickListener(){

@Override
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
long arg3) {
final String profileName = listEntries.get(arg2).getName();
final int selId = arg2;

new AlertDialog.Builder(MySettings.this)
.setTitle("Options")
.setItems(R.array.select_dialog_items3, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
switch(which){
case 0:
// for activation
break;
case 1:
//for personalisation
break;
case 2:
//cancel
break;
}
}
})
.create()
.show();
}
};
Attachments
Screenshot-1.png
pop-up appear on clicking any profile from the list
Screenshot-1.png (50.75 KiB) Viewed 903 times
Screenshot.png
List showing the profiles
Screenshot.png (46.57 KiB) Viewed 903 times
-Kur
Kur1310
Junior Developer
Junior Developer
 
Posts: 20
Joined: Wed Oct 28, 2009 10:50 am

Postby Kur1310 » Tue Nov 17, 2009 8:29 am

And one thing i forgot to tell is that for expandable listview u have set onChildClickListener instead of itemclickListener.
I'm sure this solution will work for u .....
-Kur
Kur1310
Junior Developer
Junior Developer
 
Posts: 20
Joined: Wed Oct 28, 2009 10:50 am

Top

Postby srinuv28 » Tue Nov 17, 2009 9:48 am

Thanx...
srinuv28
Developer
Developer
 
Posts: 36
Joined: Wed Nov 04, 2009 4:04 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 24 guests