How can I show an intent in a new Dialog? [duplicate]
Possible Duplicate:
Android Activity as a dialog
I have a little problem with an intent that call an Activity that show a chart. I want to show the activity in a new Dialog, how can I make it?
this is the code that call the Activity:
Intent intent = ChartFactory.getBarChartIntent(
chartproject.this, buildBarDataset(titles, values),
renderer, Type.STACKED);
chartproject.this.startActivity(intent);
You only need to make change in AndroidManifest.xml as shown below,
<activity android:name=".className"
android:label="Choose Category..."
android:windowSoftInputMode="stateAlwaysVisible|adjustPan"
android:theme="@android:style/Theme.Dialog"> </activity>
where,
className: main class name of activity that you want to show in dialog.
that's it. you will have your activity as dialog.
精彩评论