Start a new Activity without Disrupting Current Activity in Xamarin Android?










0















I have a Main Activity which displays a View which is Transparent, below is the code (Trying something like Snackbar which does not disrput the activity)



 [Activity(Label = "MainActivity", Theme = 
"@style/Theme.AppCompat.Transparent.NoActionBar", MainLauncher =true)]
public class MainActivity: Activity

//Transparent View
TestView testView;

protected override void OnCreate(Bundle savedInstanceState)

base.OnCreate(savedInstanceState);
testView = new TestView(this);
SetContentView(testView);





I Want the activity not to Disrupt the current Activity



For Example:
I have a youtube video playing



enter image description here



I want the video to be played while I start my App activity, but that doesn't happen and it stops the video



enter image description here



how to achieve it? should I use Threads? but how?










share|improve this question
























  • When you open an Activity, the previous Activity will execute onStop() method, stop video will be a normal behavior, why do you need to continue playing it?

    – Diana Li
    Nov 15 '18 at 7:17











  • I want to do something on the current activity without stopping the previous activity, so I can still watch the video and do something on current activity.

    – VINNUSAURUS
    Nov 15 '18 at 8:10






  • 2





    @VINNUSAURUS I think for what you want to do you need to review fragments docs.microsoft.com/en-us/xamarin/android/platform/fragments

    – Andres Castro
    Nov 15 '18 at 19:15











  • You may be able to do what you want by just adding Views to the existing Activity. If you transition to a new Activity this will definitely cause some interruption.

    – David Wasser
    Nov 15 '18 at 20:06















0















I have a Main Activity which displays a View which is Transparent, below is the code (Trying something like Snackbar which does not disrput the activity)



 [Activity(Label = "MainActivity", Theme = 
"@style/Theme.AppCompat.Transparent.NoActionBar", MainLauncher =true)]
public class MainActivity: Activity

//Transparent View
TestView testView;

protected override void OnCreate(Bundle savedInstanceState)

base.OnCreate(savedInstanceState);
testView = new TestView(this);
SetContentView(testView);





I Want the activity not to Disrupt the current Activity



For Example:
I have a youtube video playing



enter image description here



I want the video to be played while I start my App activity, but that doesn't happen and it stops the video



enter image description here



how to achieve it? should I use Threads? but how?










share|improve this question
























  • When you open an Activity, the previous Activity will execute onStop() method, stop video will be a normal behavior, why do you need to continue playing it?

    – Diana Li
    Nov 15 '18 at 7:17











  • I want to do something on the current activity without stopping the previous activity, so I can still watch the video and do something on current activity.

    – VINNUSAURUS
    Nov 15 '18 at 8:10






  • 2





    @VINNUSAURUS I think for what you want to do you need to review fragments docs.microsoft.com/en-us/xamarin/android/platform/fragments

    – Andres Castro
    Nov 15 '18 at 19:15











  • You may be able to do what you want by just adding Views to the existing Activity. If you transition to a new Activity this will definitely cause some interruption.

    – David Wasser
    Nov 15 '18 at 20:06













0












0








0








I have a Main Activity which displays a View which is Transparent, below is the code (Trying something like Snackbar which does not disrput the activity)



 [Activity(Label = "MainActivity", Theme = 
"@style/Theme.AppCompat.Transparent.NoActionBar", MainLauncher =true)]
public class MainActivity: Activity

//Transparent View
TestView testView;

protected override void OnCreate(Bundle savedInstanceState)

base.OnCreate(savedInstanceState);
testView = new TestView(this);
SetContentView(testView);





I Want the activity not to Disrupt the current Activity



For Example:
I have a youtube video playing



enter image description here



I want the video to be played while I start my App activity, but that doesn't happen and it stops the video



enter image description here



how to achieve it? should I use Threads? but how?










share|improve this question
















I have a Main Activity which displays a View which is Transparent, below is the code (Trying something like Snackbar which does not disrput the activity)



 [Activity(Label = "MainActivity", Theme = 
"@style/Theme.AppCompat.Transparent.NoActionBar", MainLauncher =true)]
public class MainActivity: Activity

//Transparent View
TestView testView;

protected override void OnCreate(Bundle savedInstanceState)

base.OnCreate(savedInstanceState);
testView = new TestView(this);
SetContentView(testView);





I Want the activity not to Disrupt the current Activity



For Example:
I have a youtube video playing



enter image description here



I want the video to be played while I start my App activity, but that doesn't happen and it stops the video



enter image description here



how to achieve it? should I use Threads? but how?







android xamarin android-activity xamarin.forms xamarin.android






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 14 '18 at 10:51







VINNUSAURUS

















asked Nov 14 '18 at 10:37









VINNUSAURUSVINNUSAURUS

1941414




1941414












  • When you open an Activity, the previous Activity will execute onStop() method, stop video will be a normal behavior, why do you need to continue playing it?

    – Diana Li
    Nov 15 '18 at 7:17











  • I want to do something on the current activity without stopping the previous activity, so I can still watch the video and do something on current activity.

    – VINNUSAURUS
    Nov 15 '18 at 8:10






  • 2





    @VINNUSAURUS I think for what you want to do you need to review fragments docs.microsoft.com/en-us/xamarin/android/platform/fragments

    – Andres Castro
    Nov 15 '18 at 19:15











  • You may be able to do what you want by just adding Views to the existing Activity. If you transition to a new Activity this will definitely cause some interruption.

    – David Wasser
    Nov 15 '18 at 20:06

















  • When you open an Activity, the previous Activity will execute onStop() method, stop video will be a normal behavior, why do you need to continue playing it?

    – Diana Li
    Nov 15 '18 at 7:17











  • I want to do something on the current activity without stopping the previous activity, so I can still watch the video and do something on current activity.

    – VINNUSAURUS
    Nov 15 '18 at 8:10






  • 2





    @VINNUSAURUS I think for what you want to do you need to review fragments docs.microsoft.com/en-us/xamarin/android/platform/fragments

    – Andres Castro
    Nov 15 '18 at 19:15











  • You may be able to do what you want by just adding Views to the existing Activity. If you transition to a new Activity this will definitely cause some interruption.

    – David Wasser
    Nov 15 '18 at 20:06
















When you open an Activity, the previous Activity will execute onStop() method, stop video will be a normal behavior, why do you need to continue playing it?

– Diana Li
Nov 15 '18 at 7:17





When you open an Activity, the previous Activity will execute onStop() method, stop video will be a normal behavior, why do you need to continue playing it?

– Diana Li
Nov 15 '18 at 7:17













I want to do something on the current activity without stopping the previous activity, so I can still watch the video and do something on current activity.

– VINNUSAURUS
Nov 15 '18 at 8:10





I want to do something on the current activity without stopping the previous activity, so I can still watch the video and do something on current activity.

– VINNUSAURUS
Nov 15 '18 at 8:10




2




2





@VINNUSAURUS I think for what you want to do you need to review fragments docs.microsoft.com/en-us/xamarin/android/platform/fragments

– Andres Castro
Nov 15 '18 at 19:15





@VINNUSAURUS I think for what you want to do you need to review fragments docs.microsoft.com/en-us/xamarin/android/platform/fragments

– Andres Castro
Nov 15 '18 at 19:15













You may be able to do what you want by just adding Views to the existing Activity. If you transition to a new Activity this will definitely cause some interruption.

– David Wasser
Nov 15 '18 at 20:06





You may be able to do what you want by just adding Views to the existing Activity. If you transition to a new Activity this will definitely cause some interruption.

– David Wasser
Nov 15 '18 at 20:06












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53298202%2fstart-a-new-activity-without-disrupting-current-activity-in-xamarin-android%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53298202%2fstart-a-new-activity-without-disrupting-current-activity-in-xamarin-android%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Top Tejano songwriter Luis Silva dead of heart attack at 64

ReactJS Fetched API data displays live - need Data displayed static

政党