Reputation: 928
I was just wondering if its possible to show the response of webservice, a json formated, to a custom dialog, example opening hours of a restaurant?
The problem is I have a listview and onClicklistener, it opens new activity and there I parsing data from webservice. inside the activity is a button where I getting hours from again from webservice. So I was wondering instead of opening new activity for hours, its possible to pars the json data to custom dialog/alert or sth like this? instead of a new activity?
Upvotes: 0
Views: 139
Reputation: 44571
If I understand you correctly, no. A Dialog
needs an Activity
. What you can do is create an Activity
and give it a Dialog Theme
. All you have to do is add
@android:theme="@android:style/Theme.Dialog"
to your <activity>
tag in your manifest
. This will give the look of a Dialog
with the functionality of an Activity
Upvotes: 1