I have a Dialog Fragment attached to the Main Activity and is there any way we can start another Activity from the DialogFragment by a button Click.
My Intent call withing DialogFragment:
Intent i= new Intent(getActivity(),SecondActivity.class);
startActivity(i);
Have Registered the Second Activity in
as below
<activity android:name=".SecondActivity"
android:label="@string/app_name"
android:theme="@android:style/Theme.Dialog">
<intent-filter>
<action android:name="com.example.testjsoncall.SecondActivity" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
Hope this helps you :)
Intent i= new Intent(context,SecondActivity.class);
context.startActivity(i);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With